From: Tejun Heo <tj@kernel.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
"Michal Koutný" <mkoutny@suse.com>,
"Paul E. McKenney" <paulmck@kernel.org>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Hillf Danton" <hdanton@sina.com>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Marco Elver" <elver@google.com>,
tglx@linutronix.de
Subject: Re: [PATCH v6 0/6] kernfs: Use RCU to access kernfs_node::{parent|name}.
Date: Thu, 30 Jan 2025 08:36:24 -1000 [thread overview]
Message-ID: <Z5vGqAxiaL_weoWU@slm.duckdns.org> (raw)
In-Reply-To: <20250130140207.1914339-1-bigeasy@linutronix.de>
On Thu, Jan 30, 2025 at 03:02:01PM +0100, Sebastian Andrzej Siewior wrote:
> Hi,
>
> This started as a bug report by Hillf Danton and aims to access
> kernfs_node::{name|parent} with RCU to avoid the lock during
> kernfs_path_from_node().
>
> I've split the individual fixes in separate patches (#1 to #4). I've
> also split the ::parent and ::name RCU conversation into a single patch
> (#5 and #6).
>
> v5…v6 https://lore.kernel.org/all/20250128084226.1499291-1-bigeasy@linutronix.de/
> - s/rdt_kn_get_name/rdt_kn_name/
> - s/rdt_get_kn_parent_priv/rdt_kn_parent_priv/
> - s/kn_get_priv/kn_priv/
> - The comment, that has been removed in kernfs_put(), is back.
> - Using rcu_access_pointer() in kernfs_activate_one() and kernfs_dir_pos()
> instead of kernfs_parent() where the pointer is not dereferenced but
> just compared.
>
> v4…v5 https://lore.kernel.org/all/20250124174614.866884-1-bigeasy@linutronix.de/
> - rdtgroup:
> - Add a comment to rdt_get_kn_parent_priv() regarding lifetime of
> parent.
> - Move individual rcu_dereference_check() invocations into
> rdt_kn_parent() with a comment on lifetime.
> - Use rcu_access_pointer() in kernfs_to_rdtgroup() instead
> rcu_dereference_check(, true)
> - s/kernfs_rcu_get_name/kernfs_rcu_name/
> - Move all rcu_dereference_check() within kernfs into kernfs_parent()
> and extend its checks to have all cases in one spot. Document why
> each case makes sense.
> - kernfs_notify_workfn(): Do unlocks in the reverse order of locks.
> - Add kernfs_root_flags() and use it in cgroup's kn_get_priv() to
> check the right KERNFS_ROOT_INVARIANT_PARENT flag.
>
> v3: https://lore.kernel.org/all/20241121175250.EJbI7VMb@linutronix.de/
> v2: https://lore.kernel.org/all/20241112155713.269214-1-bigeasy@linutronix.de/
> v1: https://lore.kernel.org/all/20241108222406.n5azgO98@linutronix.de/
Whole series looks good to me.
Thanks.
--
tejun
prev parent reply other threads:[~2025-01-30 18:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-30 14:02 [PATCH v6 0/6] kernfs: Use RCU to access kernfs_node::{parent|name} Sebastian Andrzej Siewior
2025-01-30 14:02 ` [PATCH v6 1/6] kernfs: Acquire kernfs_rwsem in kernfs_notify_workfn() Sebastian Andrzej Siewior
2025-01-30 14:02 ` [PATCH v6 2/6] kernfs: Acquire kernfs_rwsem in kernfs_get_parent_dentry() Sebastian Andrzej Siewior
2025-01-30 14:02 ` [PATCH v6 3/6] kernfs: Acquire kernfs_rwsem in kernfs_node_dentry() Sebastian Andrzej Siewior
2025-01-30 14:02 ` [PATCH v6 4/6] kernfs: Don't re-lock kernfs_root::kernfs_rwsem in kernfs_fop_readdir() Sebastian Andrzej Siewior
2025-01-30 14:02 ` [PATCH v6 5/6] kernfs: Use RCU to access kernfs_node::parent Sebastian Andrzej Siewior
2025-01-30 18:35 ` Tejun Heo
2025-01-30 14:02 ` [PATCH v6 6/6] kernfs: Use RCU to access kernfs_node::name Sebastian Andrzej Siewior
2025-01-30 18:36 ` Tejun Heo [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=Z5vGqAxiaL_weoWU@slm.duckdns.org \
--to=tj@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=boqun.feng@gmail.com \
--cc=cgroups@vger.kernel.org \
--cc=elver@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=hannes@cmpxchg.org \
--cc=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mkoutny@suse.com \
--cc=paulmck@kernel.org \
--cc=tglx@linutronix.de \
/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