]> git.baikalelectronics.ru Git - kernel.git/commit
vfs: reorganize 'struct inode' layout a bit
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 8 Jun 2011 22:18:19 +0000 (15:18 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 8 Jun 2011 22:18:19 +0000 (15:18 -0700)
commite8b2e1f97ba387168d4247a0dc1e8c9ae6240ae9
treed0fc2752fc71d30710a909516d5317b2c7bb8b96
parentcf78ff4d4e73dd2e018943631d5faea5588e8b3e
vfs: reorganize 'struct inode' layout a bit

This tries to make the 'struct inode' accesses denser in the data cache
by moving a commonly accessed field (i_security) closer to other fields
that are accessed often.

It also makes 'i_state' just an 'unsigned int' rather than 'unsigned
long', since we only use a few bits of that field, and moves it next to
the existing 'i_flags' so that we potentially get better structure
layout (although depending on config options, i_flags may already have
packed in the same word as i_lock, so this improves packing only for the
case of spinlock debugging)

Out 'struct inode' is still way too big, and we should probably move
some other fields around too (the acl fields in particular) for better
data cache access density.  Other fields (like the inode hash) are
likely to be entirely irrelevant under most loads.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/fs.h