WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

Re: [Xen-ia64-devel] [PATCH] fix I&D cache incoherency after vcpu migrat

To: Kouya SHIMURA <kouya@xxxxxxxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [PATCH] fix I&D cache incoherency after vcpu migration
From: Alex Williamson <alex.williamson@xxxxxx>
Date: Wed, 14 Feb 2007 11:16:29 -0700
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 14 Feb 2007 10:15:43 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200702131204.l1DC4GLt025348@xxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: HP OSLO R&D
References: <200702131204.l1DC4GLt025348@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, 2007-02-13 at 21:15 +0900, Kouya SHIMURA wrote:
> +static void flush_cache_for_context_switch(struct vcpu *next)
> +{
> +       extern cpumask_t cpu_cache_coherent_map;
> +       int cpu = smp_processor_id();
> +
> +       if (is_idle_vcpu(next) ||
> +           __test_and_clear_bit(cpu, &next->arch.cache_coherent_map))
> { 

Hi Kouya,

   Isn't this racey?  Why use the non-atomic __test_and_clear_bit() here
rather than the atomic version?  Thanks,

        Alex

-- 
Alex Williamson                             HP Open Source & Linux Org.


_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel