public inbox for linux-trace-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Petr Pavlu <petr.pavlu@suse.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: mhiramat@kernel.org, mathieu.desnoyers@efficios.com,
	zhengyejian1@huawei.com, linux-trace-kernel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] tracing: Simplify and fix "buffered event" synchronization
Date: Tue, 5 Dec 2023 17:16:13 +0100	[thread overview]
Message-ID: <490c77e9-e3d4-4499-8471-128804fb2e7a@suse.com> (raw)
In-Reply-To: <20231201094639.03a1913c@gandalf.local.home>

On 12/1/23 15:46, Steven Rostedt wrote:
> On Fri, 1 Dec 2023 15:17:35 +0100
> Petr Pavlu <petr.pavlu@suse.com> wrote:
> 
>> Ok, keeping the current approach, my plan for v2 is to prepare the
>> following patches:
>>
>> [...]
>> * Fix the potential race between trace_buffered_event_enable() and
>>   trace_event_buffer_lock_reserve() where the latter might already see
>>   a valid trace_buffered_event pointer but not all initialization yet.
>>
>>   I think this might be actually best to address by using the same
>>   maintenance exclusion as is implemented in
>>   trace_buffered_event_disable(). It would make both maintenance
>>   operations consistent but for the cost of making the enable operation
>>   somewhat slower.
> 
> I wouldn't do them the same just to make them consistent. I think the
> smp_wmb() is sufficient. Don't you think?

Looking at this again, I think it is actually a non-issue. Function
trace_buffered_event_enable() only writes the header part of
ring_buffer_event but that is never written nor read by the actual users
which obtain the buffer from trace_event_buffer_lock_reserve().

No change is then needed, it is left out in v2 of the series.

-- Petr

  reply	other threads:[~2023-12-05 16:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-27 15:12 [PATCH 0/2] tracing: Simplify and fix "buffered event" synchronization Petr Pavlu
2023-11-27 15:12 ` [PATCH 1/2] " Petr Pavlu
2023-11-27 17:41   ` Steven Rostedt
2023-11-28 15:05     ` Petr Pavlu
2023-11-28 15:27       ` Steven Rostedt
2023-11-29  9:22         ` Petr Pavlu
2023-11-29 14:58           ` Steven Rostedt
2023-12-01 14:17             ` Petr Pavlu
2023-12-01 14:46               ` Steven Rostedt
2023-12-05 16:16                 ` Petr Pavlu [this message]
2023-11-27 15:12 ` [PATCH 2/2] tracing: Disable events in reverse order of their enable operation Petr Pavlu
2023-11-27 17:58   ` Steven Rostedt
2023-11-28 15:06     ` Petr Pavlu

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=490c77e9-e3d4-4499-8471-128804fb2e7a@suse.com \
    --to=petr.pavlu@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=rostedt@goodmis.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