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>,
"Zefan Li" <lizefan.x@bytedance.com>,
tglx@linutronix.de,
syzbot+6ea37e2e6ffccf41a7e6@syzkaller.appspotmail.com
Subject: Re: [PATCH v2 2/2] cgroup, kernfs: Move cgroup to the RCU interface for name lookups
Date: Tue, 12 Nov 2024 08:59:16 -1000 [thread overview]
Message-ID: <ZzOlhANLYxFaIix2@slm.duckdns.org> (raw)
In-Reply-To: <20241112155713.269214-3-bigeasy@linutronix.de>
Hello,
On Tue, Nov 12, 2024 at 04:52:39PM +0100, Sebastian Andrzej Siewior wrote:
...
> /**
> - * pr_cont_kernfs_name - pr_cont name of a kernfs_node
> + * pr_cont_kernfs_name_rcu - pr_cont name of a kernfs_node
> * @kn: kernfs_node of interest
> *
> - * This function can be called from any context.
> + * This function can be called from any context. The root node must be with
> + * KERNFS_ROOT_SAME_PARENT.
> */
> -void pr_cont_kernfs_name(struct kernfs_node *kn)
> +void pr_cont_kernfs_name_rcu(struct kernfs_node *kn)
Having to split the interface all the way up isn't great. While there are
also downsides, I wonder whether a better approach here is just making the
backend function (kernfs_path_from_node()) automatically use RCU locking if
the flag is set rather than propagating the difference by splitting the
interface. The distinction doesn't mean anything to most users after all.
Thanks.
--
tejun
next prev parent reply other threads:[~2024-11-12 18:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-12 15:52 [PATCH v2 0/2] Let cgroup use RCU for kernfs_node::name lookup Sebastian Andrzej Siewior
2024-11-12 15:52 ` [PATCH v2 1/2] kernfs: Make it possible to " Sebastian Andrzej Siewior
2024-11-12 18:52 ` Tejun Heo
2024-11-13 7:42 ` Sebastian Andrzej Siewior
2024-11-14 13:48 ` Michal Koutný
2024-11-15 17:32 ` Sebastian Andrzej Siewior
2024-11-12 15:52 ` [PATCH v2 2/2] cgroup, kernfs: Move cgroup to the RCU interface for name lookups Sebastian Andrzej Siewior
2024-11-12 18:59 ` Tejun Heo [this message]
2024-11-13 7:43 ` Sebastian Andrzej Siewior
2024-11-13 12:07 ` Sebastian Andrzej Siewior
2024-11-13 13:23 ` Sebastian Andrzej Siewior
2024-11-13 18:28 ` Tejun Heo
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=ZzOlhANLYxFaIix2@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=lizefan.x@bytedance.com \
--cc=mkoutny@suse.com \
--cc=paulmck@kernel.org \
--cc=syzbot+6ea37e2e6ffccf41a7e6@syzkaller.appspotmail.com \
--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