[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] reduce struct_page size




On Mon, 18 Feb 2002, Rik van Riel wrote:
>
> o page->zone is shrunk from a pointer to an index into a small
>   array of zones ... this means we have space for 3 more chars
>   in the struct page to other stuff (say, page->age)

Why not put "page->zone" into the page flags instead? That one has to be
unsigned long anyway for atomicity reasons, and we have tons of free space
for "a few bits" (even if you need something like 2 bits ber node, and
have several nodes, we've got a minimum of 16 bits free right now and I
doubt we'll ever see more than a few nodes on any 32-bit architecture, so
we're not likely to need more than 8 bits tops on any 32-bit arch, and on
64-bit archs we have tons more bits).

The patch looks good, it's just silly to say that you made "struct page"
smaller, and then waste four bytes.

		Linus

--
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/