From: Dave Hansen <haveblue@us.ibm.com>
To: ncunningham@cyclades.com
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Pavel Machek <pavel@ucw.cz>
Subject: Re: [RFC][PATCH] Dynamically allocated pageflags.
Date: Fri, 18 Feb 2005 19:02:07 -0800 [thread overview]
Message-ID: <1108782127.19253.4.camel@localhost> (raw)
In-Reply-To: <1108780994.4077.63.camel@desktop.cunningham.myip.net.au>
On Sat, 2005-02-19 at 13:43 +1100, Nigel Cunningham wrote:
> For some time now, we've been running out of bits for pageflags.
>
> In Suspend2, I need the functional equivalent of pageflags, but don't
> need them when Suspend isn't running. One of the outcomes of the last
> submission of Suspend2 for review was that I changed the format in which
> that data is stored, creating something I call dynamically allocated
> pageflags.
>
> It's a simple idea: we tie together a bunch of order zero allocated
> pages using a kmalloc'd list of poiinters to those pages, and store the
> location of that kmalloc'd list in what's really an unsigned long **
> (typedef'd). We also provide macros so that calls for setting and
> clearing flags can look just like ordinary pageflag set/clear/test
> invocations.
>
> Helpers are also provided for allocating and freeing the maps.
I'm kicking myself because I thought about this 2 minutes after we
talked on IRC.
One issue is that it doesn't work with DISCONTIGMEM (or the upcoming
sparsemem). max_mapnr doesn't exist on those systems, and on the really
discontiguous ones, you might be allocating very large areas with very
sparse maps.
One thing that I've been thinking about for these things is something
tree-based. A 1 or 2-level tree, like pagetables should be fast enough,
and handle the sparse and discontiguous layouts a little better than a
flat one. We could even do a flat bitmap for normal systems, and #ifdef
in the table only when it's needed. I can take a look at doing this
next week.
-- Dave
next prev parent reply other threads:[~2005-02-19 3:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-19 2:43 [RFC][PATCH] Dynamically allocated pageflags Nigel Cunningham
2005-02-19 3:02 ` Dave Hansen [this message]
2005-02-19 3:35 ` Nigel Cunningham
2005-02-19 5:51 ` Dave Hansen
2005-02-19 6:03 ` Nigel Cunningham
2005-02-21 18:15 ` Dave Hansen
2005-02-19 9:50 ` Pavel Machek
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=1108782127.19253.4.camel@localhost \
--to=haveblue@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ncunningham@cyclades.com \
--cc=pavel@ucw.cz \
/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