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 05/12 for v7.1] vfs fs_struct
Date: Fri, 10 Apr 2026 17:18:19 +0200 [thread overview]
Message-ID: <20260410-vfs-fs_struct-v71-cf1d44311509@brauner> (raw)
In-Reply-To: <20260410-vfs-v71-b055f260060c@brauner>
Hey Linus,
/* Summary */
Avoid excessive dput/dget in audit_context setup and reset paths When
the audit subsystem is enabled, it can do a lot of get_fs_pwd() calls to
get references to fs->pwd and then releasing those references back with
path_put() later. That may cause a lot of spinlock contention on a
single pwd's dentry lock because of the constant changes to the
reference count when there are many processes on the same working
directory actively doing open/close system calls. This can cause
noticeable performance regresssion when compared with the case where the
audit subsystem is turned off especially on systems with a lot of CPUs
which is becoming more common these days.
Avoid this type of performance regression caused by audit by adding a
new set of fs_struct helpers to reduce unncessary path_get() and
path_put() calls and the audit code is modified to use these new
helpers.
/* Testing */
gcc (Debian 14.2.0-19) 14.2.0
Debian clang version 19.1.7 (3+b1)
No build failures or warnings were observed.
/* Conflicts */
Merge conflicts with mainline
=============================
No known conflicts.
Merge conflicts with other trees
================================
The following changes since commit 1f318b96cc84d7c2ab792fcc0bfd42a7ca890681:
Linux 7.0-rc3 (2026-03-08 16:56:54 -0700)
are available in the Git repository at:
git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.fs_struct
for you to fetch changes up to 9eecc28ec595bfc0a8af3306b57f566027b3560c:
fs: factor out get_fs_pwd_pool_locked() for lock-held callers (2026-03-12 13:41:45 +0100)
----------------------------------------------------------------
vfs-7.1-rc1.fs_struct
Please consider pulling these changes from the signed vfs-7.1-rc1.fs_struct tag.
Thanks!
Christian
----------------------------------------------------------------
Christian Brauner (5):
Merge patch series "fs, audit: Avoid excessive dput/dget in audit_context setup and reset paths"
fs: use path_equal() in fs_struct helpers
fs: document seqlock usage in pwd pool APIs
fs: add drain_fs_pwd_pool() helper
fs: factor out get_fs_pwd_pool_locked() for lock-held callers
Waiman Long (2):
fs: Add a pool of extra fs->pwd references to fs_struct
audit: Use the new {get,put}_fs_pwd_pool() APIs to get/put pwd references
fs/fs_struct.c | 34 ++++++++++++++++++++++++++++------
fs/namespace.c | 10 ++++++++++
include/linux/fs_struct.h | 43 ++++++++++++++++++++++++++++++++++++++++++-
kernel/auditsc.c | 7 +++++--
4 files changed, 85 insertions(+), 9 deletions(-)
next prev parent reply other threads:[~2026-04-10 15:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-10 15:15 [GIT PULL 00/12 for v7.1] v7.1 Christian Brauner
2026-04-10 15:16 ` [GIT PULL 01/12 for v7.1] vfs writeback Christian Brauner
2026-04-10 15:16 ` [GIT PULL 02/12 for v7.1] vfs xattr Christian Brauner
2026-04-10 15:16 ` [GIT PULL 03/12 for v7.1] vfs directory Christian Brauner
2026-04-10 15:17 ` [GIT PULL 04/12 for v7.1] vfs integrity Christian Brauner
2026-04-10 15:18 ` Christian Brauner [this message]
2026-04-10 15:18 ` [GIT PULL 06/12 for v7.1] vfs kino Christian Brauner
2026-04-10 15:19 ` [GIT PULL 07/12 for v7.1] vfs fat Christian Brauner
2026-04-10 15:19 ` [GIT PULL 08/12 for v7.1] vfs bh metadata Christian Brauner
2026-04-10 15:19 ` [GIT PULL 09/12 for v7.1] namespaces misc Christian Brauner
2026-04-10 15:21 ` [GIT PULL 10/12 for v7.1] vfs pidfs Christian Brauner
2026-04-10 15:21 ` [GIT PULL 11/12 for v7.1] vfs mount Christian Brauner
2026-04-10 15:23 ` [GIT PULL 12/12 for v7.1] vfs misc 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=20260410-vfs-fs_struct-v71-cf1d44311509@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