xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andres Lagar-Cavilla <andres@lagarcavilla.org>
To: xen-devel@lists.xen.org
Cc: "Zhang, Yang Z" <yang.z.zhang@intel.com>,
	keir@xen.org, andres@gridcentric.ca, tim@xen.org
Subject: [PATCH 0 of 3] x86/mm: Relieve contention of p2m lock on three hot paths
Date: Tue, 24 Apr 2012 15:34:10 -0400	[thread overview]
Message-ID: <patchbomb.1335296050@xdev.gridcentric.ca> (raw)

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@lagarcavilla.org>

 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(-)

             reply	other threads:[~2012-04-24 19:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-24 19:34 Andres Lagar-Cavilla [this message]
2012-04-24 19:34 ` [PATCH 1 of 3] x86/mm: Relieve contention for p2m lock in gva_to_gfn Andres Lagar-Cavilla
2012-04-25 12:51   ` Tim Deegan
2012-04-25 15:33     ` Andres Lagar-Cavilla
2012-04-24 19:34 ` [PATCH 2 of 3] x86/emulate: Relieve contention of p2m lock in emulation of rep movs Andres Lagar-Cavilla
2012-04-25 12:54   ` Tim Deegan
2012-04-24 19:34 ` [PATCH 3 of 3] x86/emulation: No need to get_gfn on zero ram_gpa Andres Lagar-Cavilla
2012-04-25 13:11   ` Tim Deegan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=patchbomb.1335296050@xdev.gridcentric.ca \
    --to=andres@lagarcavilla.org \
    --cc=andres@gridcentric.ca \
    --cc=keir@xen.org \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.org \
    --cc=yang.z.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).