From: Dave Hansen <haveblue@us.ibm.com>
To: ncunningham@linuxmail.org
Cc: Pavel Machek <pavel@ucw.cz>,
Linux Memory Management <linux-mm@kvack.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Suspend 2 merge: 43/51: Utility functions.
Date: Sat, 27 Nov 2004 08:11:14 -0800 [thread overview]
Message-ID: <1101571874.8940.4383.camel@localhost> (raw)
In-Reply-To: <1101427475.27250.170.camel@desktop.cunninghams>
On Thu, 2004-11-25 at 16:04, Nigel Cunningham wrote:
> On Fri, 2004-11-26 at 10:46, Pavel Machek wrote:
> > How many bits do you need? Two? I'd rather use thow two bits than have
> > yet another abstraction. Also note that it is doing big order
> > allocation.
>
> Three if checksumming is enabled IIRC. I'll happily use normal page
> flags, but we only need them when suspending, and I understood they were
> rarer than hen's teeth :>
>
> MM guys copied so they can tell me I'm wrong :>
Please remember that, in almost all cases, any use of page->flags can be
replaced by a simple list. Is a page marked foo? Well, just traverse
this data structure and see if the page is in there. It might be a
stinking slow check, but it will *work*.
I think we're up to using 1 bit in the memory hotplug code, but we don't
even need that if some operations can be implemented more slowly.
An extreme example:
struct list_head foo;
int PageSuspendFoo(page)
{
ret = 0;
lock();
list_for_each(foo, bar) {
if (page == bar)
ret = 1;
}
unlock();
return ret;
}
-- Dave
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
next prev parent reply other threads:[~2004-11-27 16:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1101292194.5805.180.camel@desktop.cunninghams>
[not found] ` <1101299832.5805.371.camel@desktop.cunninghams>
[not found] ` <20041125234635.GF2909@elf.ucw.cz>
2004-11-26 0:04 ` Nigel Cunningham
2004-11-27 16:11 ` Dave Hansen [this message]
2004-11-28 21:36 ` Nigel Cunningham
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=1101571874.8940.4383.camel@localhost \
--to=haveblue@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ncunningham@linuxmail.org \
--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