aboutsummaryrefslogtreecommitdiff
path: root/scripts/mod
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-10-31 16:06:40 -0700
committerMister Oyster <oysterized@gmail.com>2017-12-26 13:24:59 +0100
commit3a5485093c48fc4a0a442b794f24a4d367242d14 (patch)
tree82bdb05c479c441e0414f25062d081cf40cf090b /scripts/mod
parent66c03d7f8de631affd66097c2b5eec689ac52a25 (diff)
vfs: conditionally clear close-on-exec flag
We clear the close-on-exec flag when opening and closing files, and the bit was almost always already clear before. Avoid dirtying the cacheline if the clearning isn't necessary. That avoids unnecessary cacheline dirtying and bouncing in multi-socket environments. Eric Dumazet has a file descriptor benchmark that goes 4% faster from this on his two-socket machine. It's probably partly superlinear improvement due to getting slightly less spinlock contention on the file_lock spinlock due to less work in the critical section. Tested-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com> Signed-off-by: Joe Maples <joe@frap129.org>
Diffstat (limited to 'scripts/mod')
0 files changed, 0 insertions, 0 deletions