]> git.hungrycats.org Git - linux/commit
[PATCH] remove cacheline alignment from inode slabs
authorAnton Blanchard <anton@samba.org>
Tue, 24 Aug 2004 04:34:08 +0000 (21:34 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 24 Aug 2004 04:34:08 +0000 (21:34 -0700)
commit597648bbd0685e62e568d112e7477b4a3b618ed3
tree75837f8e1607de75d2cedd2f447568a597a4d947
parent2f3e61cda44a8a2371bbe0dd32985d9a3440ab33
[PATCH] remove cacheline alignment from inode slabs

Most of the inode slabs are cacheline aligned.  This can waste a fair
amount of memory, especially on architectures with large cacheline sizes
(eg 128 bytes).

Alignment has a few advantages.  It prevents 2 cpus from accessing 2 data
structures in the same cacheline.  Since struct inodes are well over a
cacheline and there are so many of them, there is little chance we will hit
this problem if we remove the alignment.

Alignment also ensures the maximum amount of the data structure is in the
same cacheline (instead of straddling 2 for example).  The large size of
struct inode reduces this advantage.

With this patch the inode_cache slab goes from 640 bytes to 544 bytes, and
the number that fits in a 4kB slab goes from 6 to 7 on ppc64.  A number of
other inode slabs also see improvements.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
27 files changed:
fs/adfs/super.c
fs/affs/super.c
fs/befs/linuxvfs.c
fs/bfs/inode.c
fs/cifs/cifsfs.c
fs/coda/inode.c
fs/efs/super.c
fs/ext2/super.c
fs/ext3/super.c
fs/fat/inode.c
fs/hpfs/super.c
fs/inode.c
fs/isofs/inode.c
fs/jffs2/super.c
fs/minix/inode.c
fs/ncpfs/inode.c
fs/nfs/inode.c
fs/ntfs/super.c
fs/proc/inode.c
fs/qnx4/inode.c
fs/reiserfs/super.c
fs/romfs/inode.c
fs/smbfs/inode.c
fs/sysv/inode.c
fs/udf/super.c
fs/ufs/super.c
fs/xfs/linux-2.6/xfs_super.c