diff options
| author | Mateusz Guzik <[email protected]> | 2024-05-08 08:14:00 +0000 |
|---|---|---|
| committer | Eric Biggers <[email protected]> | 2024-05-08 17:28:58 +0000 |
| commit | 7f016edaa0f385da0c37eee1ebb64c7f6929c533 (patch) | |
| tree | e68fcf72102a311d60bd6e0bd5c1f9f7c792e8c6 /security/selinux/hooks.c | |
| parent | Linux 6.9-rc7 (diff) | |
| download | kernel-7f016edaa0f385da0c37eee1ebb64c7f6929c533.tar.gz kernel-7f016edaa0f385da0c37eee1ebb64c7f6929c533.zip | |
fscrypt: try to avoid refing parent dentry in fscrypt_file_open
Merely checking if the directory is encrypted happens for every open
when using ext4, at the moment refing and unrefing the parent, costing 2
atomics and serializing opens of different files.
The most common case of encryption not being used can be checked for
with RCU instead.
Sample result from open1_processes -t 20 ("Separate file open/close")
from will-it-scale on Sapphire Rapids (ops/s):
before: 12539898
after: 25575494 (+103%)
v2:
- add a comment justifying rcu usage, submitted by Eric Biggers
- whack spurious IS_ENCRYPTED check from the refed case
Signed-off-by: Mateusz Guzik <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Eric Biggers <[email protected]>
Diffstat (limited to 'security/selinux/hooks.c')
0 files changed, 0 insertions, 0 deletions
