Commit 486f80b9 authored by Anton Blanchard's avatar Anton Blanchard Committed by Linus Torvalds

[PATCH] reduce size of struct buffer_head on 64bit

Reduce size of buffer_head from 96 to 88 bytes on 64bit architectures by
putting b_count and b_size together.  b_count will still be in the first 16
bytes on 32bit architectures, so 16 byte cacheline machines shouldnt be
affected.

With this change the number of objects per 4kB slab goes up from 40 to 44
on ppc64.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 1f1b31f3
......@@ -49,12 +49,12 @@ typedef void (bh_end_io_t)(struct buffer_head *bh, int uptodate);
struct buffer_head {
/* First cache line: */
unsigned long b_state; /* buffer state bitmap (see above) */
atomic_t b_count; /* users using this block */
struct buffer_head *b_this_page;/* circular list of page's buffers */
struct page *b_page; /* the page this bh is mapped to */
atomic_t b_count; /* users using this block */
u32 b_size; /* block size */
sector_t b_blocknr; /* block number */
u32 b_size; /* block size */
char *b_data; /* pointer to data block */
struct block_device *b_bdev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment