]> Git Repo - linux.git/commit
apparmor: try to avoid refing the label in apparmor_file_open
authorMateusz Guzik <[email protected]>
Thu, 20 Jun 2024 17:15:27 +0000 (19:15 +0200)
committerJohn Johansen <[email protected]>
Wed, 24 Jul 2024 18:05:14 +0000 (11:05 -0700)
commitf4fee216df7d28b87d1c9cc60bcebfecb51c1a05
tree43f46dacda613f67cda982c55588f0dd3e457de6
parent4b954a025591a1c7d3a0c0111b6d4730596046b6
apparmor: try to avoid refing the label in apparmor_file_open

If the label is not stale (which is the common case), the fact that the
passed file object holds a reference can be leverged to avoid the
ref/unref cycle. Doing so reduces performance impact of apparmor on
parallel open() invocations.

When benchmarking on a 24-core vm using will-it-scale's open1_process
("Separate file open"), the results are (ops/s):
before: 6092196
after:  8309726 (+36%)

Signed-off-by: Mateusz Guzik <[email protected]>
Signed-off-by: John Johansen <[email protected]>
security/apparmor/include/cred.h
security/apparmor/lsm.c
This page took 0.056933 seconds and 4 git commands to generate.