summaryrefslogtreecommitdiffstats
path: root/sys/sys/bufobj.h
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2013-01-14 05:46:49 +0000
committerkib <kib@FreeBSD.org>2013-01-14 05:46:49 +0000
commite7565a37f0c93e26b89593d5e6156dc73a235372 (patch)
treea3e7d7cc82ccd3412fe020a5552d27f28d302616 /sys/sys/bufobj.h
parentd10c3cd19615ac20efb595169a245341f0394749 (diff)
downloadFreeBSD-src-e7565a37f0c93e26b89593d5e6156dc73a235372.zip
FreeBSD-src-e7565a37f0c93e26b89593d5e6156dc73a235372.tar.gz
Rearrange the struct bufobj and struct vnode layouts to reduce
padding. On the amd64 kernel with INVARIANTS turned off, size of the struct vnode is reduced from 496 to 472 bytes, saving 24 bytes of memory and KVA per vnode. Noted and reviewed by: peter Tested by: pho Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/sys/bufobj.h')
-rw-r--r--sys/sys/bufobj.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/sys/bufobj.h b/sys/sys/bufobj.h
index 3934553..79bef84 100644
--- a/sys/sys/bufobj.h
+++ b/sys/sys/bufobj.h
@@ -89,12 +89,7 @@ struct buf_ops {
struct bufobj {
struct mtx bo_mtx; /* Mutex which protects "i" things */
- struct bufv bo_clean; /* i Clean buffers */
- struct bufv bo_dirty; /* i Dirty buffers */
- long bo_numoutput; /* i Writes in progress */
- u_int bo_flag; /* i Flags */
struct buf_ops *bo_ops; /* - Buffer operations */
- int bo_bsize; /* - Block size for i/o */
struct vm_object *bo_object; /* v Place to store VM object */
LIST_ENTRY(bufobj) bo_synclist; /* S dirty vnode list */
void *bo_private; /* private pointer */
@@ -103,6 +98,11 @@ struct bufobj {
* XXX: only to keep the syncer working
* XXX: for now.
*/
+ struct bufv bo_clean; /* i Clean buffers */
+ struct bufv bo_dirty; /* i Dirty buffers */
+ long bo_numoutput; /* i Writes in progress */
+ u_int bo_flag; /* i Flags */
+ int bo_bsize; /* - Block size for i/o */
};
/*
OpenPOWER on IntegriCloud