Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit f4fee216 authored by Mateusz Guzik's avatar Mateusz Guzik Committed by John Johansen
Browse files

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: default avatarMateusz Guzik <mjguzik@gmail.com>
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
parent 4b954a02
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment