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/
Home Products Support Community News


Re: [Xen-devel] [PATCH] x86: remove use of per-domain lock frompage tabl

To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] x86: remove use of per-domain lock frompage table entry handling
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Tue, 22 Apr 2008 14:39:20 +0100
Delivery-date: Tue, 22 Apr 2008 06:39:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C433A6FC.1FDEF%keir.fraser@xxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <480DFDD8.76E4.0078.0@xxxxxxxxxx> <C433A6FC.1FDEF%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> Keir Fraser <keir.fraser@xxxxxxxxxxxxx> 22.04.08 15:30 >>>
>On 22/4/08 14:01, "Jan Beulich" <jbeulich@xxxxxxxxxx> wrote:
>> This is only a first step, the use of the domain lock in do_mmuext_op()
>> and do_set_gdt() still need looking at, as do the assertions of the
>> lock being held in create_grant_{pte,va}_mapping().
>> This change results in a 5% performance improvement for kernel builds
>> on dual-socket quad-core systems (which is what I used for reference
>> for both 32- and 64-bit). Along with that, the amount of time reported
>> as spent in the kernel gets reduced by almost 25% (the fraction of time
>> spent in the kernel is generally reported significantly higher under
>> Xen than with a native kernel).
>I'm pretty sure we don't need per-page locks.

If you want to make serialization by the caller part of the ABI - yes.
If not (and I think everything else would be wrong, as a malicious guest
could take advantage of that), then the window between reading of
the old entry and writing the new one must be protected against racing
updates, as otherwise the page type and reference counters could get
screwed up.


Xen-devel mailing list