[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZzOmXbpO3apRH0Cz@slm.duckdns.org>
Date: Tue, 12 Nov 2024 09:02:53 -1000
From: Tejun Heo <tj@...nel.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Boqun Feng <boqun.feng@...il.com>, Hillf Danton <hdanton@...a.com>,
"Paul E. McKenney" <paulmck@...nel.org>,
Marco Elver <elver@...gle.com>, linux-kernel@...r.kernel.org,
gregkh@...uxfoundation.org, tglx@...utronix.de,
syzbot <syzbot+6ea37e2e6ffccf41a7e6@...kaller.appspotmail.com>
Subject: Re: [PATCH] kernfs: Use RCU for kernfs_node::name lookup.
Hello, Sebastian.
Sorry about late reply. Have been sick for a bit.
On Mon, Nov 11, 2024 at 06:04:50PM +0100, Sebastian Andrzej Siewior wrote:
...
> Let me check if I understood. We have three users of kernfs:
>
> - cgroup
> cgroup1_rename(): parent check (would get the new KERNFS_ROOT flag)
>
> - resctrl
> rdtgroup_rename(): seems to allow any "mon group" directory
> different parent possible.
>
> - sysfs
> sysfs_move_dir_ns(): reame to a different parent
I'm not sure about resctrl but here we just need to add that flag to cgroup,
right?
> That new RCU interface would be used by cgroup only and sysfs/ resctrl
> would remain using the "old" code?
> If so, would you prefer
> |struct kernfs_node {
> | …
> | union {
> | const char name;
> | const char __rcu *name_rcu;
> | }
>
> to avoid patching resctrl + sysfs for for the rcu_derference name
> lookup?
As replied on the patches, it probably is cleaner to always use __rcu and
apply the additional locking on the reader side if renaming across different
parents is allowed.
Thanks.
--
tejun
Powered by blists - more mailing lists