mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Waiman Long <longman@redhat.com>
To: Christian Brauner <brauner@kernel.org>
Cc: Paul Moore <paul@paul-moore.com>, Eric Paris <eparis@redhat.com>,
	Al Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	audit@vger.kernel.org, Richard Guy Briggs <rgb@redhat.com>,
	Ricardo Robaina <rrobaina@redhat.com>
Subject: Re: [PATCH v4 0/2] fs, audit: Avoid excessive dput/dget in audit_context setup and reset paths
Date: Thu, 5 Mar 2026 19:53:15 -0500	[thread overview]
Message-ID: <886ceaf1-16dd-4403-bfaf-5164a598a20d@redhat.com> (raw)
In-Reply-To: <20260305-vorlieben-gefesselt-1673d7845270@brauner>

On 3/5/26 4:46 PM, Christian Brauner wrote:
> On Sat, Feb 28, 2026 at 01:27:55PM -0500, Waiman Long wrote:
>>   v4:
>>    - Add ack and review tags
>>    - Simplify put_fs_pwd_pool() in patch 1 as suggested by Paul Moore
>>
>>   v3:
>>    - https://lore.kernel.org/lkml/20260206201918.1988344-1-longman@redhat.com/
>>
>> 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.
>>
>> This patch series aim to 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.
> Tbh, the open-coding everywhere is really not very tasteful and makes me
> not want to do this at all. Ideally we'd have a better mechanism that
> avoids all this new spaghetti in various codepaths.
>
> In it's current form I don't find it palatable. I added a few cleanups
> on top that make it at least somewhat ok.

Thanks for the cleanup patches. They all look good to me.

Reviewed-by: Waiman Long <longman@redhat.com>


      reply	other threads:[~2026-03-06  0:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-28 18:27 Waiman Long
2026-02-28 18:27 ` [PATCH v4 1/2] fs: Add a pool of extra fs->pwd references to fs_struct Waiman Long
2026-02-28 18:27 ` [PATCH v4 2/2] audit: Use the new {get,put}_fs_pwd_pool() APIs to get/put pwd references Waiman Long
2026-03-05 21:46 ` [PATCH v4 0/2] fs, audit: Avoid excessive dput/dget in audit_context setup and reset paths Christian Brauner
2026-03-06  0:53   ` Waiman Long [this message]

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=886ceaf1-16dd-4403-bfaf-5164a598a20d@redhat.com \
    --to=longman@redhat.com \
    --cc=audit@vger.kernel.org \
    --cc=brauner@kernel.org \
    --cc=eparis@redhat.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=rgb@redhat.com \
    --cc=rrobaina@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®