From: Steven Rostedt <rostedt@goodmis.org>
To: Zheng Yejian <zhengyejian1@huawei.com>
Cc: <laijs@cn.fujitsu.com>, <linux-kernel@vger.kernel.org>,
<linux-trace-kernel@vger.kernel.org>, <mhiramat@kernel.org>
Subject: Re: [RFC PATCH] tracing: Introduce pipe_cpumask to avoid race on trace_pipes
Date: Thu, 17 Aug 2023 21:43:37 -0400 [thread overview]
Message-ID: <20230817214337.48de3ab8@gandalf.local.home> (raw)
In-Reply-To: <12d197d9-99c1-4ffc-a1b1-f7e42a2d43d6@huawei.com>
On Fri, 18 Aug 2023 09:38:27 +0800
Zheng Yejian <zhengyejian1@huawei.com> wrote:
> >> from being opened by multiple people at the same time.
> >
> > I'm fine with the CPU mask.
>
> Hi, Steve, if a task open a trace_pipe file, then concurrently read it
> with multiple threads, then the read race problem may also happen, this
> patch will not prevent this case.
I was thinking this too and started to look at a fix for that when I
realized, it shouldn't be a problem. The open creates the iterator and it's
attached to the file descriptor. All the threads will be using the same
file descriptor, which means they will be using the same iterator. That
iter->ent from one thread will be still valid for the next thread.
-- Steve
>
> Do we need to consider this case? Or just tell user not to do like this
> through some documents?
next prev parent reply other threads:[~2023-08-18 1:44 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-10 12:39 [PATCH] tracing: Fix race when concurrently splice_read trace_pipe Zheng Yejian
2023-08-11 11:42 ` Masami Hiramatsu
2023-08-11 12:37 ` Zheng Yejian
2023-08-11 19:24 ` Steven Rostedt
2023-08-12 2:22 ` Zheng Yejian
2023-08-12 21:08 ` Steven Rostedt
2023-08-16 19:23 ` Steven Rostedt
2023-08-17 11:50 ` [RFC PATCH] tracing: Introduce pipe_cpumask to avoid race on trace_pipes Zheng Yejian
2023-08-17 14:13 ` Steven Rostedt
2023-08-18 1:38 ` Zheng Yejian
2023-08-18 1:43 ` Steven Rostedt [this message]
2023-08-18 2:26 ` [PATCH v2] " Zheng Yejian
2023-08-18 5:03 ` Masami Hiramatsu
2023-08-18 13:41 ` Steven Rostedt
2023-08-18 14:23 ` Masami Hiramatsu
2023-08-18 15:53 ` Steven Rostedt
2023-08-19 1:42 ` Masami Hiramatsu
2023-08-20 13:18 ` Masami Hiramatsu
2023-08-21 2:19 ` Masami Hiramatsu
2023-08-21 2:33 ` Steven Rostedt
2023-08-21 9:21 ` Masami Hiramatsu
2023-08-21 15:17 ` Steven Rostedt
2023-08-21 22:32 ` Masami Hiramatsu
2023-08-11 19:25 ` [PATCH] tracing: Fix race when concurrently splice_read trace_pipe Steven Rostedt
2023-08-12 1:45 ` Zheng Yejian
2023-08-12 20:47 ` Masami Hiramatsu
2023-08-12 7:38 ` Zheng Yejian
2023-08-13 1:13 ` Steven Rostedt
2023-08-13 16:41 ` Linus Torvalds
2023-08-14 20:16 ` Steven Rostedt
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=20230817214337.48de3ab8@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=zhengyejian1@huawei.com \
/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;
as well as URLs for NNTP newsgroup(s).