From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Yonghong Song <yonghong.song@linux.dev>
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>, "Tejun Heo" <tj@kernel.org>,
tglx@linutronix.de, "Andrii Nakryiko" <andrii@kernel.org>,
"Eduard Zingerman" <eddyz87@gmail.com>,
"Mykola Lysenko" <mykolal@fb.com>,
bpf@vger.kernel.org
Subject: Re: [PATCH v7 5/6] kernfs: Use RCU to access kernfs_node::parent.
Date: Tue, 11 Feb 2025 08:56:59 +0100 [thread overview]
Message-ID: <20250211075659.aRpNJSdP@linutronix.de> (raw)
In-Reply-To: <cab1d59c-4dac-4a5b-8dfa-43c2ac03b675@linux.dev>
On 2025-02-10 08:41:00 [-0800], Yonghong Song wrote:
> > diff --git a/tools/testing/selftests/bpf/progs/profiler.inc.h b/tools/testing/selftests/bpf/progs/profiler.inc.h
> > index 8bd1ebd7d6afd..a4f518ee5f4de 100644
> > --- a/tools/testing/selftests/bpf/progs/profiler.inc.h
> > +++ b/tools/testing/selftests/bpf/progs/profiler.inc.h
> > @@ -223,7 +223,7 @@ static INLINE void* read_full_cgroup_path(struct kernfs_node* cgroup_node,
> > if (bpf_cmp_likely(filepart_length, <=, MAX_PATH)) {
> > payload += filepart_length;
> > }
> > - cgroup_node = BPF_CORE_READ(cgroup_node, parent);
> > + cgroup_node = BPF_CORE_READ(cgroup_node, __parent);
> > }
> > return payload;
> > }
> > @@ -323,6 +324,7 @@ static INLINE void* populate_cgroup_info(struct cgroup_data_t* cgroup_data,
> > cgroup_data->cgroup_full_length = payload_end_pos - payload;
> > payload = payload_end_pos;
> > }
> > + bpf_rcu_read_unlock();
>
> All programs calling this function populate_cgroup_info() is not sleepable program
> so the whole prog is protected by rcu and there is no need for above
> bpf_rcu_read_{lock,unlock}().
Understood. So just the rename then.
> > return (void*)payload;
> > }
Sebastian
next prev parent reply other threads:[~2025-02-11 7:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-03 13:50 [PATCH v7 0/6] kernfs: Use RCU to access kernfs_node::{parent|name} Sebastian Andrzej Siewior
2025-02-03 13:50 ` [PATCH v7 1/6] kernfs: Acquire kernfs_rwsem in kernfs_notify_workfn() Sebastian Andrzej Siewior
2025-02-03 13:50 ` [PATCH v7 2/6] kernfs: Acquire kernfs_rwsem in kernfs_get_parent_dentry() Sebastian Andrzej Siewior
2025-02-03 13:50 ` [PATCH v7 3/6] kernfs: Acquire kernfs_rwsem in kernfs_node_dentry() Sebastian Andrzej Siewior
2025-02-03 13:50 ` [PATCH v7 4/6] kernfs: Don't re-lock kernfs_root::kernfs_rwsem in kernfs_fop_readdir() Sebastian Andrzej Siewior
2025-02-03 13:50 ` [PATCH v7 5/6] kernfs: Use RCU to access kernfs_node::parent Sebastian Andrzej Siewior
2025-02-10 8:43 ` Sebastian Andrzej Siewior
2025-02-10 16:41 ` Yonghong Song
2025-02-11 7:56 ` Sebastian Andrzej Siewior [this message]
2025-02-03 13:50 ` [PATCH v7 6/6] kernfs: Use RCU to access kernfs_node::name Sebastian Andrzej Siewior
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=20250211075659.aRpNJSdP@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=andrii@kernel.org \
--cc=boqun.feng@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=eddyz87@gmail.com \
--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=mykolal@fb.com \
--cc=paulmck@kernel.org \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=yonghong.song@linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.