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 2/2] tracing: Disable events in reverse order of their enable operation
Date: Tue, 28 Nov 2023 16:06:03 +0100 [thread overview]
Message-ID: <1ef6c0a0-4d82-4fdc-8007-87e054a4c08d@suse.com> (raw)
In-Reply-To: <20231127125815.4a4d06c6@gandalf.local.home>
On 11/27/23 18:58, Steven Rostedt wrote:
> On Mon, 27 Nov 2023 16:12:48 +0100
> Petr Pavlu <petr.pavlu@suse.com> wrote:
>
>> Make the disable operation in __ftrace_event_enable_disable() use the
>> reverse order of the respective enable operation.
>>
>> This has two minor benefits:
>> * Disabling of buffered events via trace_buffered_event_disable() is
>> done after unregistering the trace event. It closes a small window
>> where an event would be still registered and could be hit, but would
>> unnecessarily go directly to a ring buffer.
>
> There's little benefit to the above. Going to the ring buffer and reverting
> it is just a bit more expensive, but should not be an issue with this small
> window.
>
>> * The SOFT_DISABLED flag is now consistently set only when SOFT_MODE is
>> also set.
>
> This code is a bit fragile, and I rather not change the logic. There's a
> lot of corner cases.
>
> I'm not saying that this is a bad change, I just don't want to add it and
> find out later it broke one of the corner cases. To add this would require
> an analysis that every input produces the same output with and without this
> change.
>
> If you want to make a table showing all inputs between soft_disable and the
> flags, and show that the result produces the same updates, I'll then
> reconsidered applying this.
Ok, that is fair. It looked to me as a reasonable change but I don't
feel strongly about it and I understand your concern. I guess I'll drop
it in v2.
Thanks,
Petr
prev parent reply other threads:[~2023-11-28 15:06 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
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 [this message]
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=1ef6c0a0-4d82-4fdc-8007-87e054a4c08d@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