Re: Reduce struct page by 8 bytes on 64bit

From: Andi Kleen (ak@muc.de)
Date: Thu Apr 17 2003 - 10:20:21 EST


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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Apr 23 2003 - 22:00:21 EST