summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorPrashant Singh <singhpra@juniper.net>2026-10-05 16:22:50 -0700
committerArd Biesheuvel <ardb@kernel.org>2026-10-06 09:06:53 +0200
commit1e50ed98255b2bf68fa881595c44c6be2a037ac0 (patch)
treef0f31442761a5e136c87d22e46890c8dac86b397 /tools/perf/scripts/python
parente41ceb82523a695015ba2edd21e9656a47227009 (diff)
downloadlinux-next-1e50ed98255b2bf68fa881595c44c6be2a037ac0.tar.gz
linux-next-1e50ed98255b2bf68fa881595c44c6be2a037ac0.zip
efivarfs: add nostatfs mount option to skip QueryVariableInfo()
QueryVariableInfo() is an EFI runtime service that, on some firmware, takes tens of milliseconds and runs with preemption disabled, stalling the CPU that services it (and, on firmware that services it via SMM, all CPUs). efivarfs_statfs() calls it (rate-limited since commit b2326338dc68 ("efivarfs: Rate limit statfs() handler")) to report the variable-store used/available capacity, so any statfs(2) -- e.g. every "df" -- can inject that stall into unrelated latency-sensitive workloads. Add a negatable "nostatfs" mount option: with nostatfs, statfs(2) skips QueryVariableInfo() and reports zero used/available; with statfs it reports the capacity as before. It defaults to nostatfs on CONFIG_PREEMPT_RT so real-time kernels do not take the stall out of the box, but statfs can be passed there to force reporting back on -- e.g. for tools such as fwupd that need the efivars free space to update Secure Boot key databases. The option can also be toggled on a live mount via remount, so reporting can be enabled only for the duration of a firmware update without unmounting the boot-time efivarfs mount: mount -o remount,statfs /sys/firmware/efi/efivars # reporting on mount -o remount,nostatfs /sys/firmware/efi/efivars # reporting off A remount that does not specify statfs/nostatfs keeps the current setting. Tested on an Intel Xeon E5-2628L v4, 6.12 kernel: a default statfs(2) takes ~66 ms (the firmware call), versus ~11 us with nostatfs. Suggested-by: Ard Biesheuvel <ardb@kernel.org> Suggested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Prashant Singh <singhpra@juniper.net> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions