From: Dave Hansen <haveblue@us.ibm.com>
To: Robin Holt <holt@sgi.com>
Cc: lhms <lhms-devel@lists.sourceforge.net>, linux-mm <linux-mm@kvack.org>
Subject: Re: [RFC] consistency of zone->zone_start_pfn, spanned_pages
Date: Fri, 13 May 2005 11:31:13 -0700 [thread overview]
Message-ID: <1116009073.32433.34.camel@localhost> (raw)
In-Reply-To: <20050513182446.GA23416@lnx-holt.americas.sgi.com>
On Fri, 2005-05-13 at 13:24 -0500, Robin Holt wrote:
> On Fri, May 13, 2005 at 09:00:19AM -0700, Dave Hansen wrote:
> > Any other ideas?
>
> Not necessarily a good idea but how about...
>
> static int bad_range(struct zone *zone, struct page *page)
> {
> unsigned long start_pfn;
> unsigned long spanned_pages;
>
> do {
> start_pfn = zone->zone_start_pfn;
> spanned_pages = zone->spanned_pages;
> while (unlikely(start_pfn != zone->zone_start_pfn));
>
> if (page_to_pfn(page) >= start_pfn + spanned_pages;
> return 1;
> }
I think that's a similar idea to using a seq_lock, right?
I have the feeling that also open-coding this for shrinking zones would
make it a bit more complex. It's a good idea, though.
-- 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:[~2005-05-13 18:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-13 16:00 Dave Hansen
2005-05-13 18:24 ` Robin Holt
2005-05-13 18:31 ` Dave Hansen [this message]
2005-05-17 9:50 ` Andy Whitcroft
2005-05-17 10:46 ` Robin Holt
2005-05-17 0:40 ` [Lhms-devel] " KAMEZAWA Hiroyuki
2005-05-17 5:43 ` Yasunori Goto
2005-05-17 12:32 ` Andy Whitcroft
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=1116009073.32433.34.camel@localhost \
--to=haveblue@us.ibm.com \
--cc=holt@sgi.com \
--cc=lhms-devel@lists.sourceforge.net \
--cc=linux-mm@kvack.org \
/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