From: Omar Sandoval <osandov@osandov.com>
To: linux-fsdevel@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>
Cc: kernel-team@fb.com, linux-kernel@vger.kernel.org
Subject: [PATCH 0/4] proc/kcore: performance optimizations
Date: Fri, 8 Nov 2024 17:28:38 -0800 [thread overview]
Message-ID: <cover.1731115587.git.osandov@fb.com> (raw)
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
next reply other threads:[~2024-11-09 1:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-09 1:28 Omar Sandoval [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1731115587.git.osandov@fb.com \
--to=osandov@osandov.com \
--cc=kernel-team@fb.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.