]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Merge patch series "proc/kcore: performance optimizations"
authorChristian Brauner <brauner@kernel.org>
Mon, 11 Nov 2024 09:00:29 +0000 (10:00 +0100)
committerChristian Brauner <brauner@kernel.org>
Mon, 2 Dec 2024 10:21:07 +0000 (11:21 +0100)
Omar Sandoval <osandov@osandov.com> says:

The performance of /proc/kcore reads has been showing up as a bottleneck
for drgn. drgn scripts often spend ~25% of their time in the kernel
reading from /proc/kcore.

A lot of this overhead comes from silly inefficiencies. This patch
series fixes the low-hanging fruit. The fixes are all fairly small and
straightforward. The result is a 25% improvement in read latency in
micro-benchmarks (from ~235 nanoseconds to ~175) and a 15% improvement
in execution time for real-world drgn scripts.

Since I have a stake in /proc/kcore and have modified it several times,
the final patch volunteers me to maintain it.

* patches from https://lore.kernel.org/r/cover.1731115587.git.osandov@fb.com:
  MAINTAINERS: add me as /proc/kcore maintainer
  proc/kcore: use percpu_rw_semaphore for kclist_lock
  proc/kcore: don't walk list on every read
  proc/kcore: mark proc entry as permanent

Link: https://lore.kernel.org/r/cover.1731115587.git.osandov@fb.com
Signed-off-by: Christian Brauner <brauner@kernel.org>

Trivial merge