From: Christoph Lameter <clameter@sgi.com>
To: Dave Hansen <hansendc@us.ibm.com>
Cc: linux-mm@kvack.org, William Lee Irwin III <wli@holomorphy.com>,
Jens Axboe <jens.axboe@oracle.com>, David Chinner <dgc@sgi.com>,
Badari Pulavarty <pbadari@gmail.com>,
Adam Litke <aglitke@gmail.com>, Avi Kivity <avi@argo.co.il>,
Mel Gorman <mel@skynet.ie>
Subject: Re: [RFC 01/16] Free up page->private for compound pages
Date: Mon, 23 Apr 2007 19:23:16 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0704231919270.4099@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <1177380741.17122.52.camel@localhost.localdomain>
On Mon, 23 Apr 2007, Dave Hansen wrote:
> OK, so the end result is that we're freeing up page->private for the
> head page of compound pages, but not _all_ of them, right? You might
> want to make that a bit clearer in the patch description.
Correct.
> Can we be more clever about this, and not have to eat yet another page
> flag?
Look at the recent compound changes in mm. That one does not eat a
page flag.
> > +static inline int base_pages(struct page *page)
> > +{
> > + return 1 << compound_order(page);
> > +}
>
> Perhaps base_pages_in_compound(), instead?
I renamed it to compound_page() for V3... But base_pages_in_compound is a
bit long.
> > static void free_compound_page(struct page *page)
> > {
> > - __free_pages_ok(page, (unsigned long)page[1].lru.prev);
> > + __free_pages_ok(page, compound_order(page));
> > }
>
> These substitutions are great, even outside of this patch set. Nice.
They are already in mm.
> > + for (i = 1; i < nr_pages; i++) {
> > struct page *p = page + i;
> >
> > - if (unlikely(!PageCompound(p) |
> > - (page_private(p) != (unsigned long)page)))
> > + if (unlikely(!PageCompound(p) | !PageTail(p) |
> > + ((struct page *)p->private != page)))
>
> Should there be a compound_page_head() function to get rid of these
> open-coded references?
There is in mm. This one is a fixup patch to get the patch to work against
upstream.
> I guess it doesn't matter, but it might be nice to turn those binary |'s
> into logical ||'s.
That would generate more branches. But them mm is different again.
--
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:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2007-04-24 2:23 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-23 6:48 [RFC 00/16] Variable Order Page Cache Patchset V2 Christoph Lameter
2007-04-23 6:48 ` [RFC 01/16] Free up page->private for compound pages Christoph Lameter
2007-04-24 2:12 ` Dave Hansen
2007-04-24 2:23 ` Christoph Lameter [this message]
2007-04-25 10:55 ` Mel Gorman
2007-04-23 6:48 ` [RFC 02/16] vmstat.c: Support accounting " Christoph Lameter
2007-04-25 10:59 ` Mel Gorman
2007-04-25 15:43 ` Christoph Lameter
2007-04-23 6:49 ` [RFC 03/16] Variable Order Page Cache: Add order field in mapping Christoph Lameter
2007-04-25 11:05 ` Mel Gorman
2007-04-23 6:49 ` [RFC 04/16] Variable Order Page Cache: Add basic allocation functions Christoph Lameter
2007-04-23 6:49 ` [RFC 05/16] Variable Order Page Cache: Add functions to establish sizes Christoph Lameter
2007-04-25 11:20 ` Mel Gorman
2007-04-25 15:54 ` Christoph Lameter
2007-04-23 6:49 ` [RFC 06/16] Variable Page Cache: Add VM_BUG_ONs to check for correct page order Christoph Lameter
2007-04-25 11:22 ` Mel Gorman
2007-04-23 6:49 ` [RFC 07/16] Variable Order Page Cache: Add clearing and flushing function Christoph Lameter
2007-04-23 6:49 ` [RFC 08/16] Variable Order Page Cache: Fixup fallback functions Christoph Lameter
2007-04-23 6:49 ` [RFC 09/16] Variable Order Page Cache: Fix up mm/filemap.c Christoph Lameter
2007-04-23 6:49 ` [RFC 10/16] Variable Order Page Cache: Readahead fixups Christoph Lameter
2007-04-25 11:36 ` Mel Gorman
2007-04-25 15:56 ` Christoph Lameter
[not found] ` <20070521104204.GA8795@mail.ustc.edu.cn>
2007-05-21 10:42 ` Fengguang Wu
2007-05-21 16:53 ` Christoph Lameter
[not found] ` <20070522005903.GA6184@mail.ustc.edu.cn>
2007-05-22 0:59 ` Fengguang Wu
[not found] ` <20070524040453.GA10662@mail.ustc.edu.cn>
2007-05-24 4:04 ` Fengguang Wu
2007-05-24 4:06 ` Christoph Lameter
2007-04-23 6:49 ` [RFC 11/16] Variable Page Cache Size: Fix up reclaim counters Christoph Lameter
2007-04-25 13:08 ` Mel Gorman
2007-04-23 6:49 ` [RFC 12/16] Variable Order Page Cache: Fix up the writeback logic Christoph Lameter
2007-04-23 6:49 ` [RFC 13/16] Variable Order Page Cache: Fixed to block layer Christoph Lameter
2007-04-23 6:49 ` [RFC 14/16] Variable Order Page Cache: Add support to ramfs Christoph Lameter
2007-04-23 6:50 ` [RFC 15/16] ext2: Add variable page size support Christoph Lameter
2007-04-23 16:30 ` Badari Pulavarty
2007-04-24 1:11 ` Christoph Lameter
2007-04-23 6:50 ` [RFC 16/16] Variable Order Page Cache: Alternate implementation of page cache macros Christoph Lameter
2007-04-25 13:16 ` Mel Gorman
2007-04-23 9:23 ` [RFC 00/16] Variable Order Page Cache Patchset V2 David Chinner
2007-04-23 9:31 ` David Chinner
-- strict thread matches above, loose matches on Subject: below --
2007-04-23 6:21 clameter
2007-04-23 6:21 ` [RFC 01/16] Free up page->private for compound pages clameter
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=Pine.LNX.4.64.0704231919270.4099@schroedinger.engr.sgi.com \
--to=clameter@sgi.com \
--cc=aglitke@gmail.com \
--cc=avi@argo.co.il \
--cc=dgc@sgi.com \
--cc=hansendc@us.ibm.com \
--cc=jens.axboe@oracle.com \
--cc=linux-mm@kvack.org \
--cc=mel@skynet.ie \
--cc=pbadari@gmail.com \
--cc=wli@holomorphy.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