Re: Reduce struct page by 8 bytes on 64bit

Andi Kleen
2003-04-17T15:09:09Z

On Wed, Apr 16, 2003 at 11:40:35PM +0200, David S. Miller wrote:
> From: Andrew Morton <akpm@digeo.com>
> Date: Wed, 16 Apr 2003 14:43:11 -0700
>
> Well are we sure that the `flags' and `count' fields will always fall into
> the same 256-byte range? Wouldn't it subtly break if sizeof(struct page)
> became not a multiple of eight? Will the compiler pad it out anyway?
>
> As long as there is a long or pointer member, the structure
> will be required to be 8 byte or better aligned.

Yes that should be a safe assumption. mem_map will be always page aligned
and it should be a multiple of a power of 8. That makes it impossible for it
to cross a cache line.

-Andi