Re: [PATCH] Compound page overhaul

From: Andrew Morton
Date: Mon Nov 22 2004 - 19:03:10 EST


David Howells <dhowells@xxxxxxxxxx> wrote:
>
> The attached patch overhauls compound page handling.
>
> (1) A new bit flag PG_compound_slave has been added. This is used to mark the
> second+ subpages of a compound page, thus making get_page() and
> put_page() able to determine the need to perform weird stuff quickly.
>
> This could be changed to do horribly things with the page count or to
> abuse the page->lru member instead of eating another page flag.
>
> (2) Compound page metadata is now always set on high-order pages when
> allocating and always checked when freeing:
>
> - PG_compound is set on all subpages
> - PG_compound_slave is set on all but the first subpage
> - page[1].index holds the compound page order
> - page[1...N-1].private points to page[0]
> - page[1].mapping may hold a destructor function for put_page()

ugh, sorry, I'd forgotten that !MMU needs to use the fields inside
pages[1]. It seems that the !MMU requirement is in that case quite
dissimilar from what compound pages are supposed to do. Perhaps we should
just forget the whole thing and stick with the current design approach?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/