public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] proc/kcore: performance optimizations
@ 2024-11-09  1:28 Omar Sandoval
  2024-11-09  1:28 ` [PATCH 1/4] proc/kcore: mark proc entry as permanent Omar Sandoval
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Omar Sandoval @ 2024-11-09  1:28 UTC (permalink / raw)
  To: linux-fsdevel, Al Viro; +Cc: kernel-team, linux-kernel

From: Omar Sandoval <osandov@fb.com>

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(-)

-- 
2.47.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-11-12  9:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-09  1:28 [PATCH 0/4] proc/kcore: performance optimizations Omar Sandoval
2024-11-09  1:28 ` [PATCH 1/4] proc/kcore: mark proc entry as permanent Omar Sandoval
2024-11-09  1:28 ` [PATCH 2/4] proc/kcore: don't walk list on every read Omar Sandoval
2024-11-09  1:28 ` [PATCH 3/4] proc/kcore: use percpu_rw_semaphore for kclist_lock Omar Sandoval
2024-11-09  1:28 ` [PATCH 4/4] MAINTAINERS: add me as /proc/kcore maintainer Omar Sandoval
2024-11-11  9:00 ` [PATCH 0/4] proc/kcore: performance optimizations Christian Brauner
2024-11-11 18:08   ` Omar Sandoval
2024-11-12  9:35     ` Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox