The patch titled fs: reorder some 'struct inode' fields to speedup i_size manipulations has been added to the -mm tree. Its filename is fs-reorder-some-struct-inode-fields-to-speedup-i_size-manipulations.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: fs: reorder some 'struct inode' fields to speedup i_size manipulations From: Eric Dumazet <dada1@xxxxxxxxxxxxx> On 32bits SMP platforms, 64bits i_size is protected by a seqcount (i_size_seqcount). When i_size is read or written, i_size_seqcount is read/written as well, so it make sense to group these two fields together in the same cache line. This patch moves i_size_seqcount next to i_size, and also moves i_version to let offsetof(struct inode, i_size) being 0x40 instead of 0x3c (for 32bits platforms). For 64 bits platforms, i_size_seqcount doesnt exist, and the move of a 'long i_version' should not introduce a new hole because of padding. Signed-off-by: Eric Dumazet <dada1@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- include/linux/fs.h | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff -puN include/linux/fs.h~fs-reorder-some-struct-inode-fields-to-speedup-i_size-manipulations include/linux/fs.h --- a/include/linux/fs.h~fs-reorder-some-struct-inode-fields-to-speedup-i_size-manipulations +++ a/include/linux/fs.h @@ -548,12 +548,15 @@ struct inode { uid_t i_uid; gid_t i_gid; dev_t i_rdev; + unsigned long i_version; loff_t i_size; +#ifdef __NEED_I_SIZE_ORDERED + seqcount_t i_size_seqcount; +#endif struct timespec i_atime; struct timespec i_mtime; struct timespec i_ctime; unsigned int i_blkbits; - unsigned long i_version; blkcnt_t i_blocks; unsigned short i_bytes; spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ @@ -598,9 +601,6 @@ struct inode { void *i_security; #endif void *i_private; /* fs or device private pointer */ -#ifdef __NEED_I_SIZE_ORDERED - seqcount_t i_size_seqcount; -#endif }; /* _ Patches currently in -mm which might be from dada1@xxxxxxxxxxxxx are git-net.patch rcu-add-a-prefetch-in-rcu_do_batch.patch dont-insert-pipe-dentries-into-dentry_hashtable.patch dcache-avoid-rcu-for-never-hashed-dentries.patch net-dont-insert-socket-dentries-into-dentry_hashtable.patch fs-reorder-some-struct-inode-fields-to-speedup-i_size-manipulations.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html