On an Intel Cascade Lake, booted with "audit=0" and "mitigations=off",
syscall latency in nanoseconds over 10 reboots and 5 runs is:
getpid() latency:
Boot parameters kernel min avg max pstdev
(ns) (ns) (ns) (ns)
audit=0, mitigations=off v6.6-rc4 55 55 58 0.797245
audit=1, mitigations=off v6.6-rc4 205 210 227 6.402000
audit=1, mitigations=off v6.6-rc4+[1] 203 203 209 0.954149
audit=1, mitigations=off v6.6-rc4+[1]+[2] 173 173 178 0.884534
So, audit contributes significantly to the cost of a system call.
This series, hopefully applicable to audit/next (if accepted), reduces
the syscall latency by a decent 21% on an Intel Cascade Lake system.
The above numbers are derived using the same methodology as mentioned
in the commit messages.
The first commit, "audit: Vary struct audit_entry alignment", fixes a
huge L1D miss ratio and greatly reduces the variability on the three
metrics, nanoseconds per syscall, L1D misses per syscall, and
Instructions per Cycle (ipc). It does not greatly reduce on the
syscall latency, only a decent 3.5% reduction. But, it serves as a
pre-requisite for the second commit, "audit: Apply codegen
optimizations".
Please review.
Håkon Bugge (2):
[1] audit: Vary struct audit_entry alignment
[2] audit: Apply codegen optimizations
kernel/auditfilter.c | 14 +++++++++++---
kernel/auditsc.c | 2 ++
2 files changed, 13 insertions(+), 3 deletions(-)
--
2.39.3