From: Anton Blanchard <anton@samba.org>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, jrsantos@austin.ibm.com
Subject: [PATCH] reduce size of struct buffer_head on 64bit
Date: Mon, 16 Aug 2004 07:30:13 +1000 [thread overview]
Message-ID: <20040815213013.GI5637@krispykreme> (raw)
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>
diff -puN include/linux/buffer_head.h~optimize_structs include/linux/buffer_head.h
--- gr_work/include/linux/buffer_head.h~optimize_structs 2004-08-14 10:51:08.695492352 -0500
+++ gr_work-anton/include/linux/buffer_head.h 2004-08-14 10:51:08.716489022 -0500
@@ -47,12 +47,12 @@ typedef void (bh_end_io_t)(struct buffer
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;
reply other threads:[~2004-08-15 21:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040815213013.GI5637@krispykreme \
--to=anton@samba.org \
--cc=akpm@osdl.org \
--cc=jrsantos@austin.ibm.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox