diff options
author | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 17:49:56 +1100 |
---|---|---|
committer | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 17:50:28 +1100 |
commit | 44a7d7a878c9cbb74f236ea755b25b6b2e26a9a9 (patch) | |
tree | d4630a38c0d683a7e1b8823d7971753719b8a54d /lib/lzo | |
parent | fb045adb99d9b7c562dc7fef834857f78249daa1 (diff) | |
download | kernel_samsung_tuna-44a7d7a878c9cbb74f236ea755b25b6b2e26a9a9.zip kernel_samsung_tuna-44a7d7a878c9cbb74f236ea755b25b6b2e26a9a9.tar.gz kernel_samsung_tuna-44a7d7a878c9cbb74f236ea755b25b6b2e26a9a9.tar.bz2 |
fs: cache optimise dentry and inode for rcu-walk
Put dentry and inode fields into top of data structure. This allows RCU path
traversal to perform an RCU dentry lookup in a path walk by touching only the
first 56 bytes of the dentry.
We also fit in 8 bytes of inline name in the first 64 bytes, so for short
names, only 64 bytes needs to be touched to perform the lookup. We should
get rid of the hash->prev pointer from the first 64 bytes, and fit 16 bytes
of name in there, which will take care of 81% rather than 32% of the kernel
tree.
inode is also rearranged so that RCU lookup will only touch a single cacheline
in the inode, plus one in the i_ops structure.
This is important for directory component lookups in RCU path walking. In the
kernel source, directory names average is around 6 chars, so this works.
When we reach the last element of the lookup, we need to lock it and take its
refcount which requires another cacheline access.
Align dentry and inode operations structs, so members will be at predictable
offsets and we can group common operations into head of structure.
Signed-off-by: Nick Piggin <npiggin@kernel.dk>
Diffstat (limited to 'lib/lzo')
0 files changed, 0 insertions, 0 deletions