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: Re: [PATCH] Add hypercall to mark superpages to improve performance
Date: Mon, 3 May 2010 17:29:14 +0100 [thread overview]
Message-ID: <C804B86A.130E4%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <C804B3BF.1309E%keir.fraser@eu.citrix.com>
On 03/05/2010 17:09, "Keir Fraser" <keir.fraser@eu.citrix.com> wrote:
>> It should be simple enough to also check superpage->count_info in those
>> places. So the total mappings of a page would be page->count_info +
>> superpage->count_info. Good thing you suggested we also have a count in the
>> superpage_info struct :)
>
> I think you're going to have trouble handling two separate reference counts,
> for superpages and single pages, in a race-free manner that is any better
> than checking/updating reference counts across all pages in a superpage on
> first superpage mapping.
For example: When making first superpage mapping, how do you know that all
pages belong to the relevant domain, without scanning every page_info? When
destructing last superpage mapping (or single-page mapping) how do you
safely check the 'other' reference count to decide whether the page is
freeable, without having races (last single-page and superpage mappings
could be destructed concurrently, need to ensure any given page gets freed
exactly once). And I could think of others no doubt... Just pointing out how
careful you have to be if you think you can avoid the naïve
refcount-updatign algorithms I suggested. I'd rather shoot down the obvious
races before you do the coding.
-- Keir
prev parent reply other threads:[~2010-05-03 16:29 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
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 [this message]
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=C804B86A.130E4%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).