public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Christian Brauner <brauner@kernel.org>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [GIT PULL] vfs kcore
Date: Sat, 18 Jan 2025 13:56:55 +0100	[thread overview]
Message-ID: <20250118-vfs-kcore-913a66eabd03@brauner> (raw)

Hey Linus,

/* Summary */

The performance of /proc/kcore reads has been showing up as a bottleneck
for the drgn debugger. 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 pull
request contains fixes for 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:

- Make /proc/kcore entry permanent.

- Avoid walking the list on every read.

- Use percpu_rw_semaphore for kclist_lock.

- Make Omar Sandoval the official maintainer for /proc/kcore.

/* Testing */

gcc version 14.2.0 (Debian 14.2.0-6)
Debian clang version 16.0.6 (27+b1)

No build failures or warnings were observed.

/* Conflicts */

Merge conflicts with mainline
=============================

No known conflicts.

Merge conflicts with other trees
================================

No known conflicts.

The following changes since commit 40384c840ea1944d7c5a392e8975ed088ecf0b37:

  Linux 6.13-rc1 (2024-12-01 14:28:56 -0800)

are available in the Git repository at:

  git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.14-rc1.kcore

for you to fetch changes up to 4972226d0dc48ddedf071355ca664fbf34b509c8:

  Merge patch series "proc/kcore: performance optimizations" (2024-12-02 11:21:07 +0100)

Please consider pulling these changes from the signed vfs-6.14-rc1.kcore tag.

Thanks!
Christian

----------------------------------------------------------------
vfs-6.14-rc1.kcore

----------------------------------------------------------------
Christian Brauner (1):
      Merge patch series "proc/kcore: performance optimizations"

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

             reply	other threads:[~2025-01-18 12:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-18 12:56 Christian Brauner [this message]
2025-01-20 18:59 ` [GIT PULL] vfs kcore pr-tracker-bot

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=20250118-vfs-kcore-913a66eabd03@brauner \
    --to=brauner@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox