summaryrefslogtreecommitdiff
path: root/fs/gfs2/incore.h
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2007-01-17 15:33:23 +0000
committerSteven Whitehouse <swhiteho@redhat.com>2007-02-05 13:37:11 -0500
commitfee852e374fb367c5436b1226eb93b35f8355ed9 (patch)
tree0e373afa25bd27582b2fc4fff8f2964ff0de6722 /fs/gfs2/incore.h
parent330005c2b23e71e54931913e9b63d1712a19e444 (diff)
[GFS2] Shrink gfs2_inode memory by half
Here is something I spotted (while looking for something entirely different) the other day. Rather than using a completion in each and every struct gfs2_holder, this removes it in favour of hashed wait queues, thus saving a considerable amount of memory both on the stack (where a number of gfs2_holder structures are allocated) and in particular in the gfs2_inode which has 8 gfs2_holder structures embedded within it. As a result on x86_64 the gfs2_inode shrinks from 2488 bytes to 1912 bytes, a saving of 576 bytes per inode (no thats not a typo!). In actual practice we get a much better result than that since now that a gfs2_inode is under the 2048 byte barrier, we get two per 4k slab page effectively halving the amount of memory required to store gfs2_inodes. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/incore.h')
-rw-r--r--fs/gfs2/incore.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 9114851ac53e..a24c4af09ce0 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -128,6 +128,7 @@ enum {
HIF_HOLDER = 6,
HIF_FIRST = 7,
HIF_ABORTED = 9,
+ HIF_WAIT = 10,
};
struct gfs2_holder {
@@ -140,7 +141,6 @@ struct gfs2_holder {
int gh_error;
unsigned long gh_iflags;
- struct completion gh_wait;
unsigned long gh_ip;
};