summaryrefslogtreecommitdiff
path: root/include/linux/buffer_head.h
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2004-08-23 21:33:43 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-23 21:33:43 -0700
commit486f80b97eb15c951eee384bd8d7d286142417af (patch)
tree262f0bac7250c7b317ba4d723649c1036d77fb24 /include/linux/buffer_head.h
parent1f1b31f3dca7314c57f8b0435af5ce919f19adda (diff)
[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: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/buffer_head.h')
-rw-r--r--include/linux/buffer_head.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index f22efded164a..eab2932c613c 100644
--- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h
@@ -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;