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-devel

Re: [Xen-devel] Re: [PATCH] EPT: Flush running cpus, add mask to flush

To: Jan Beulich <JBeulich@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH] EPT: Flush running cpus, add mask to flush when scheduled in
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Tue, 22 Sep 2009 09:07:17 +0100
Cc: Xiaohui Xin <Xiaohui.xin@xxxxxxxxx>, Xin Li <xin.b.li@xxxxxxxxx>, Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>, Paul Durrant <Paul.Durrant@xxxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 22 Sep 2009 01:08:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4AB893D60200007800016283@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Aco7U2IefpmgYxlZTsKZqbAUubl6tgACFEwB
Thread-topic: [Xen-devel] Re: [PATCH] EPT: Flush running cpus, add mask to flush when scheduled in
User-agent: Microsoft-Entourage/12.20.0.090605
On 22/09/2009 08:07, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:

> Passing a pointer to the global cpu mask looks racy here: What if a CPU
> disappears from domain_dirty_cpumask under your feet?

I'm fixing this race before I apply the patch.

> Also, merely using cpus_complement() here seem inefficient: It should be
> possible to accumulate the flush activity, and avoid re-flushing on a CPU
> which e.g. got flushed on the second from the last run through this code
> (and not dirtied afterwards). I.e. I'd think there should be cpus_andnot()
> here, and setting of the bits as CPUs get dirtied.

I don't see how that is possible, as domain_dirty_cpumask can have changed
arbitrarily since the previous invocation of ept_sync_domain(), as can the
EPT tables. We have to assume every CPU has potentially stale cached
mappings.

 -- Keir



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