Skip to content

proc/kcore: performance optimizations

Omar Sandoval linux-fsdevel lkml 1 version Applied

Status from this message: Applied to the vfs-6.14.kcore branch of the vfs/vfs.git tree.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4proc/kcore: mark proc entry as permanentfs/proc/kcore.c+1 -00 replies
2/4proc/kcore: don't walk list on every readfs/proc/kcore.c+35 -350 replies
3/4proc/kcore: use percpu_rw_semaphore for kclist_lockfs/proc/kcore.c+5 -50 replies
4/4MAINTAINERS: add me as /proc/kcore maintainerMAINTAINERS+7 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] proc/kcore: performance optimizations

From: Omar Sandoval <[email protected]>

Hi,

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.

Thanks,
Omar

Omar Sandoval (4):
proc/kcore: mark proc entry as permanent proc/kcore: don't walk list on every read proc/kcore: use percpu_rw_semaphore for kclist_lock
MAINTAINERS: add me as /proc/kcore maintainer

 MAINTAINERS     |  7 +++++
 fs/proc/kcore.c | 81 +++++++++++++++++++++++++------------------------
 2 files changed, 48 insertions(+), 40 deletions(-)
Signature · 1 line
2.47.0