[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 0 of 3] x86/mm: Relieve contention of p2m lock on three hot paths

  • To: xen-devel@xxxxxxxxxxxxx
  • From: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
  • Date: Tue, 24 Apr 2012 15:34:10 -0400
  • Cc: "Zhang, Yang Z" <yang.z.zhang@xxxxxxxxx>, keir@xxxxxxx, andres@xxxxxxxxxxxxxx, tim@xxxxxxx
  • Delivery-date: Tue, 24 Apr 2012 19:28:56 +0000
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=lagarcavilla.org; h=content-type :mime-version:content-transfer-encoding:subject:message-id:date :from:to:cc; q=dns; s=lagarcavilla.org; b=eROu8z/1dIpL68q0Kn1Cbr RT+w3yQrmjJQxtwfr+THfQPX4tKu8jWG3u4JdkmWNzZhALcUFcudtdm08IQheVA/ R8zqX1H6N3P62GHMPm4in+enEG/HUFZ6A/dJcw2DgSuvJBduKE2w+WDl1fNF90Y6 pw6oIfCK7UCt9aB50uoQ8=
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

This series is motivated by recent scalability issues reported by Yhan Z Zang
from Intel.

The general pattern used is to perform a synchronized p2m query to take care of
paging in, PoD allocation or unsharing, and then take a reference to the
underlying page. The reference ensures the page can be safely mapped by the
caller as it won't be paged out. The p2m lock can then be relased and not held
while actual work is performed on the page. This reduces p2m locked critical
sections to a minimum.

The pattern is applied to page table walking and emulation of rep movs. By
checking for the bogus zero ram_gpa value on the general emulation function, we
also reduce contention derived from the p2m lock for that hot path.

Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>

 xen/arch/x86/mm/hap/guest_walk.c |   6 ++++-
 xen/arch/x86/hvm/emulate.c       |  27 +++++++---------------
 xen/arch/x86/hvm/emulate.c       |  48 +++++++++++++++++++++------------------
 3 files changed, 40 insertions(+), 41 deletions(-)

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.