path: root/kernel
diff options
authorEric Dumazet <>2005-11-13 16:06:24 -0800
committerLinus Torvalds <>2005-11-13 18:14:10 -0800
commit95e861db3eaba7bc99f8605db70103ec3d078203 (patch)
tree70f86b1acf1c8b1fb49f8bd11aaf5d81c39d0e97 /kernel
parentd6c7ac081bf6cafcf780b919ee97978f1d01a0d7 (diff)
[PATCH] reorder struct files_struct
The file_lock spinlock sits close to mostly read fields of 'struct files_struct' In SMP (and NUMA) environments, each time a thread wants to open or close a file, it has to acquire the spinlock, thus invalidating the cache line containing this spinlock on other CPUS. So other threads doing read()/write()/... calls that use RCU to access the file table are going to ask further memory (possibly NUMA) transactions to read again this memory line. Move the spinlock to another cache line, so that concurrent threads can share the cache line containing 'count' and 'fdt' fields. It's worth up to 9% on a microbenchmark using a 4-thread 2-package x86 machine. See Signed-off-by: Eric Dumazet <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions