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

[Xen-devel] [PATCH][RFC]Provide fast write emulation path to release sha

To: "Tim Deegan" <Tim.Deegan@xxxxxxxxxx>
Subject: [Xen-devel] [PATCH][RFC]Provide fast write emulation path to release shadow lock
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Tue, 22 Jan 2008 10:20:53 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 21 Jan 2008 18:21:25 -0800
Envelope-to: www-data@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/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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AchcnWoD2HwyRRLgQhmnxITKPeLsEw==
Thread-topic: [PATCH][RFC]Provide fast write emulation path to release shadow lock
Provide fast write emulation path to release shadow lock.

Basically we can consider shadow fault logic into two parts,
with 1st part to cover logistic work like validating guest
page table or fix shadow table, and the 2nd part for write
emulation.

However there's one scenario we can optimize to skip the
1st part. For previous successfully emulated virtual frame,
it's very likely approaching at write emulation logic again
if next adjacent shadow fault is hitting same virtual frame.
It's wasteful to re-walk 1st part which is already covered
by last shadow fault. In this case, actually we can jump to
emulation code early, without any lock acquisition until
final shadow validation for write emulation. By perfc counts
on 64bit SMP HVM guest, 89% of total shadow write emulation
are observed falling into this fast path when doing kernel
build in guest.

We also did series of tests on 32/32pae/32e: (host is 32e)
                   32       32pae       32e
----Linux----
kernel build   +1%    +0.86%    +1.9%
Specjbb        +0.9% +1.61%    +0.32%

----XP----
Sysbench     N/A     -0.05%     -0.32%(*)

* Sysbench score is not very stable on 32e guest, with up
to 6% variation observed in 5 rounds running. 32pae is
stable. 32 XP image was unfortunately corrupted at test 
cycle, so not test yet. Don't want to hold here from getting
early comments. :-)

I thought the performance gain should be straightforward
with this patch, and thus would like to know comment
like:
        - Is it a right direction?
        - Is there anything wrong or missed in patch?
        - Any more benchmarks should we test?

Signed-off-by Kevin Tian <kevin.tian@xxxxxxxxx>

Thanks,
Kevin

Attachment: fast_emul.patch
Description: fast_emul.patch

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