xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Keir Fraser <keir.fraser@eu.citrix.com>
To: Dave McCracken <dcm@mccr.org>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
	Xen Developers List <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] Add hypercall to mark superpages to improve performance
Date: Sun, 2 May 2010 16:54:56 -0700	[thread overview]
Message-ID: <C8035EE0.11A07%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <201005021634.56315.dcm@mccr.org>

On 02/05/2010 14:34, "Dave McCracken" <dcm@mccr.org> wrote:

> One outstanding issue I see is how to handle readonly mappings.  If we follow
> the model of regular page typecount, readonly mappings of superpages would not
> conflict with the "conflicts with superpage" type.  This means a subsequent
> attempt to change it to a read/write mapping could fail, just like with a
> regular page.  Or we could count all mappings of superpages as if they were
> read/write.

I'd keep an extra refcount in superpage_info to track read-only mappings (or
all superpage mappings, as page->count_info does for 4kB mappings). It's
trivial extra space and avoids having unexpected extra restrictions on
read-only superpage mappings.

> What are your thoughts?  It seems fairly simple and elegant to me, and at this
> point I don't see any big holes in it.

It does mean that creating/destroying pagetable pages causes an extra locked
read-modify-write cycle on a non-local cacheline (superpage_info refcount).
Would this be significant? Not sure. I guess we'd only be doing it for
guests with the superpage capability configured, and we could do some
performance comparisons with the capability enabled/disabled. I think
overall I quite like your suggestion.

 -- Keir

  reply	other threads:[~2010-05-02 23:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-28 14:33 [PATCH] Add hypercall to mark superpages to improve performance Dave McCracken
2010-04-28  6:58 ` Keir Fraser
2010-04-30 19:43   ` Dave McCracken
2010-04-30 21:30     ` Keir Fraser
2010-04-30 22:10       ` Keir Fraser
2010-04-30 21:34     ` Keir Fraser
2010-04-30 21:43       ` Dave McCracken
2010-04-30 22:03         ` Keir Fraser
2010-05-02 21:34           ` Dave McCracken
2010-05-02 23:54             ` Keir Fraser [this message]
2010-05-03  0:03               ` Keir Fraser
2010-05-03  1:55                 ` Dave McCracken
2010-05-03 16:09                   ` Keir Fraser
2010-05-03 16:29                     ` Keir Fraser

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=C8035EE0.11A07%keir.fraser@eu.citrix.com \
    --to=keir.fraser@eu.citrix.com \
    --cc=dcm@mccr.org \
    --cc=jeremy@goop.org \
    --cc=xen-devel@lists.xensource.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).