From: "James Harper" <james.harper@bendigoit.com.au>
To: Paul Durrant <Paul.Durrant@citrix.com>,
Tim Deegan <Tim.Deegan@eu.citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
xen devel <xen-devel@lists.xensource.com>
Subject: RE: what happens when a PoD page is touched?
Date: Tue, 17 May 2011 19:37:29 +1000 [thread overview]
Message-ID: <AEC6C66638C05B468B556EA548C1A77D01D5714A@trantor> (raw)
In-Reply-To: <291EDFCB1E9E224A99088639C4762022B37FC17A16@LONPMAILBOX01.citrite.net>
> > Alternatively, I balloon down 1MB of memory at a time - if I could
> > set aside 1MB of memory that was filled with 0's and could somehow
> > tell xen to use that memory first then it might speed things up too
> > yes?
> >
>
> Why can't you just use an allocator that doesn't touch memory in the
majority
> of cases. MmAllocatePagesForMdlEx() is available post 2k3-sp1 so it's
really
> only XP that would be suffering sweeps anyway
I can't guarantee that all the pages I hand back are clean, and testing
shows that a small number of them aren't. In theory, anything that cares
about the data in its pages (eg an encrypted FS) would have cleaned them
before handing them back to windows but I'd rather clean them first.
Is there a way to tell if a page is currently populated? That would
allow me to only clean populated pages.
> and you may be able to mitigate
> that by ballooning down in smaller chunks such that you fill the PoD
cache
> just enough to avoid a sweep during in the next bunch of allocations.
I still can't quite get my head around why this happens at all... I
thought it would go like this:
1. Allocate 1MB of memory
2. Still under our limit so xen populates the pages when Windows clears
them
3. Hand them back to xen
4. Repeat
I'm doing that in a tight loop very early in boot. If I keep handing
back pages (and thus reducing my populated page count) why am I hitting
any PoD limit at all and invoking the page scavenging code? Windows
isn't doing anything else at this point, and even if it was, I'm the
boot driver so it has to wait for me before the boot can progress so
it's not like it would be consuming gigabytes of memory.
Thanks
James
next prev parent reply other threads:[~2011-05-17 9:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-15 10:16 what happens when a PoD page is touched? James Harper
2011-05-16 8:39 ` Tim Deegan
2011-05-16 9:16 ` Paul Durrant
2011-05-16 9:21 ` James Harper
2011-05-16 9:17 ` James Harper
2011-05-16 9:39 ` Tim Deegan
2011-05-16 9:21 ` Paul Durrant
2011-05-16 9:22 ` James Harper
2011-05-16 9:27 ` Paul Durrant
2011-05-16 23:39 ` James Harper
2011-05-17 9:28 ` Paul Durrant
2011-05-17 9:37 ` James Harper [this message]
2011-05-17 13:00 ` George Dunlap
2011-05-18 4:52 ` James Harper
2011-05-18 5:20 ` James Harper
2011-05-18 10:23 ` Jan Beulich
2011-05-17 11:32 ` George Dunlap
2011-05-16 10:05 ` George Dunlap
2011-05-16 23:42 ` James Harper
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=AEC6C66638C05B468B556EA548C1A77D01D5714A@trantor \
--to=james.harper@bendigoit.com.au \
--cc=George.Dunlap@eu.citrix.com \
--cc=Paul.Durrant@citrix.com \
--cc=Tim.Deegan@eu.citrix.com \
--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).