From: Oleg Nesterov <oleg@redhat.com>
To: Andrii Nakryiko <andrii@kernel.org>
Cc: linux-trace-kernel@vger.kernel.org, peterz@infradead.org,
rostedt@goodmis.org, mhiramat@kernel.org, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org, jolsa@kernel.org,
paulmck@kernel.org
Subject: Re: [PATCH v2 2/6] uprobes: protected uprobe lifetime with SRCU
Date: Thu, 8 Aug 2024 12:20:23 +0200 [thread overview]
Message-ID: <20240808102022.GB8020@redhat.com> (raw)
In-Reply-To: <20240808002118.918105-3-andrii@kernel.org>
On 08/07, Andrii Nakryiko wrote:
>
> struct uprobe {
> - struct rb_node rb_node; /* node in the rb tree */
> + union {
> + struct rb_node rb_node; /* node in the rb tree */
> + struct rcu_head rcu; /* mutually exclusive with rb_node */
Andrii, I am sorry.
I suggested this in reply to 3/8 before I read
[PATCH 7/8] uprobes: perform lockless SRCU-protected uprobes_tree lookup
I have no idea if rb_erase() is rcu-safe or not, but this union certainly
doesn't look right if we use rb_find_rcu/etc.
Yes, this version doesn't include the SRCU-protected uprobes_tree changes,
but still...
Oleg.
next prev parent reply other threads:[~2024-08-08 10:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-08 0:21 [PATCH v2 0/6] uprobes: RCU-protected hot path optimizations Andrii Nakryiko
2024-08-08 0:21 ` [PATCH v2 1/6] uprobes: revamp uprobe refcounting and lifetime management Andrii Nakryiko
2024-08-08 0:21 ` [PATCH v2 2/6] uprobes: protected uprobe lifetime with SRCU Andrii Nakryiko
2024-08-08 10:20 ` Oleg Nesterov [this message]
2024-08-08 16:58 ` Andrii Nakryiko
2024-08-08 17:51 ` Andrii Nakryiko
2024-08-08 0:21 ` [PATCH v2 3/6] uprobes: get rid of enum uprobe_filter_ctx in uprobe filter callbacks Andrii Nakryiko
2024-08-08 0:21 ` [PATCH v2 4/6] uprobes: travers uprobe's consumer list locklessly under SRCU protection Andrii Nakryiko
2024-08-08 14:40 ` Oleg Nesterov
2024-08-08 17:50 ` Andrii Nakryiko
2024-08-08 0:21 ` [PATCH v2 5/6] perf/uprobe: split uprobe_unregister() Andrii Nakryiko
2024-08-08 0:21 ` [PATCH v2 6/6] uprobes: switch to RCU Tasks Trace flavor for better performance Andrii Nakryiko
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=20240808102022.GB8020@redhat.com \
--to=oleg@redhat.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
/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.