From: Keir Fraser <keir.xen@gmail.com>
To: James Harper <james.harper@bendigoit.com.au>,
Tim Deegan <Tim.Deegan@citrix.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: slow xp hibernation revisited
Date: Sat, 04 Jun 2011 07:39:40 +0100 [thread overview]
Message-ID: <CA0F91BC.1B9A6%keir.xen@gmail.com> (raw)
In-Reply-To: <AEC6C66638C05B468B556EA548C1A77D01D5775F@trantor>
On 04/06/2011 05:54, "James Harper" <james.harper@bendigoit.com.au> wrote:
>> It's the !test_bit(address_offset>>XC_PAGE_SHIFT,
> entry->valid_mapping)
>> that is causing the if expression to be true. From what I can see so
>> far, the bit representing the pfn in entry->valid_mapping is 0 because
>> err[] returned for that pfn was -EINVAL.
>>
>> Maybe the test is superfluous? Is there a need to do the remap if all
>> the other variables in the expression are satisfied? If the remap was
>> already done and the page could not be mapped last time, what reasons
>> are there why it would succeed this time?
>>
>
> FWIW, removing the test_bit makes the hibernate go faster than my screen
> can refresh over a slow DSL connection and in a quick 30 second test
> doesn't appear to have any adverse effects.
>
> If there is a chance that a subsequent call to qemu_remap_bucket with
> identical parameters could successfully map a page that couldn't be
> mapped in the previous call, are there any optimisations that could be
> done? Maybe only attempt to map the page being accessed rather than all
> pages in the bucket if the other parameters are identical?
I'm guessing this happens because of frequent guest CPU access to non-RAM
during hibernate? Unfortunately really the qemu checks do make sense, I'd
say, since the memory map of the guest can be changed dynamically , and we
currently only flush the map_cache on XENMEM_decrease_reservation
hypercalls.
One fix would be for Xen to know which regions of non-RAM are actually
emulated device areas, and only forward those to qemu. It could then
quick-fail on the rest.
However, the easiest fix would be to only re-try to map the one pfn under
test. Reloading a whole bucket takes bloody ages as they are *huge*: 256kB
in 32-bit qemu; 4MB in 64-bit qemu. It might be easiest to do a test re-map
of the one page to a scratch area, then iff it succeeds, *then* call
qemu_remap_bucket(). Then you remap the bucket only if something really has
changed, and you don't have to mess too much with modifying the bucket
yourself outside of remap_bucket.
How does that sound?
-- Keir
> James
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2011-06-04 6:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-03 15:34 slow xp hibernation revisited James Harper
2011-06-03 15:43 ` Tim Deegan
2011-06-04 3:16 ` James Harper
2011-06-04 4:46 ` James Harper
2011-06-04 4:54 ` James Harper
2011-06-04 6:39 ` Keir Fraser [this message]
2011-06-04 7:38 ` James Harper
2011-06-04 7:51 ` Keir Fraser
2011-06-04 8:05 ` James Harper
2011-06-04 8:30 ` Keir Fraser
2011-06-06 13:58 ` Stefano Stabellini
2011-06-21 17:05 ` Ian Jackson
2011-06-21 18:00 ` Stefano Stabellini
2011-06-04 8:33 ` Keir Fraser
2011-06-06 13:09 ` Stefano Stabellini
2011-06-06 13:26 ` James Harper
2011-06-06 13:29 ` James Harper
2011-06-06 13:38 ` Stefano Stabellini
2011-06-06 13:35 ` Stefano Stabellini
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=CA0F91BC.1B9A6%keir.xen@gmail.com \
--to=keir.xen@gmail.com \
--cc=Tim.Deegan@citrix.com \
--cc=james.harper@bendigoit.com.au \
--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).