linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viktor Rosendahl <viktor.rosendahl@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org,
	Joel Fernandes <joel@joelfernandes.org>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH v5 1/4] ftrace: Implement fs notification for tracing_max_latency
Date: Wed, 4 Sep 2019 21:00:32 +0200	[thread overview]
Message-ID: <d8377cbd-8c3c-d699-153d-8af7b44d6b87@gmail.com> (raw)
In-Reply-To: <20190904073915.4a145a91@oasis.local.home>

On 9/4/19 1:39 PM, Steven Rostedt wrote:
> On Tue,  3 Sep 2019 15:25:59 +0200
> Viktor Rosendahl <viktor.rosendahl@gmail.com> wrote:
> 
>> +void latency_fsnotify_stop(void)
>> +{
>> +	/* Make sure all CPUs see caller's previous actions to stop tracer */
>> +	smp_wmb();
> 
> These memory barriers just look wrong. What exactly are you trying to protect here?
> 
> Where's the matching rmbs?
> 

Thanks for reviewing.

However, since these functions will disappear when I take the irq_work
facility into use, we should perhaps not spend too much time discussing
what would have been.

There are no matching rmbs, I was thinking that the smp_wmb() would
merely enforce the order of the memory writes, as seen by other CPUs, so 
that the tracer would be stopped, before the latency fsnotify is disabled.

E.g. in case of the preemptirqsoff tracer the idea was that it doesn't
matter exactly when a CPU sees the "tracer_enabled = 0;" in
stop_irqsoff_tracer() but that it needs to be seen before the writes in
latency_fsnotify_stop() are seen.

best regards,

Viktor

  reply	other threads:[~2019-09-04 19:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-03 13:25 [PATCH v5 0/4] Some new features for the preempt/irqsoff tracers Viktor Rosendahl
2019-09-03 13:25 ` [PATCH v5 1/4] ftrace: Implement fs notification for tracing_max_latency Viktor Rosendahl
2019-09-04  4:00   ` Joel Fernandes
2019-09-04  8:19     ` Peter Zijlstra
2019-09-04 13:42       ` Joel Fernandes
2019-09-04 18:17       ` Viktor Rosendahl
2019-09-04 10:21     ` Paul E. McKenney
2019-09-04  8:20   ` Peter Zijlstra
2019-09-04 11:37     ` Steven Rostedt
2019-09-04 11:39   ` Steven Rostedt
2019-09-04 19:00     ` Viktor Rosendahl [this message]
2019-09-03 13:26 ` [PATCH v5 2/4] preemptirq_delay_test: Add the burst feature and a sysfs trigger Viktor Rosendahl
2019-09-04 11:42   ` Steven Rostedt
2019-09-04 19:10     ` Viktor Rosendahl
2019-09-05 16:52       ` Steven Rostedt
2019-09-05 18:27         ` Viktor Rosendahl
2019-09-03 13:26 ` [PATCH v5 3/4] Add the latency-collector to tools Viktor Rosendahl
2019-09-03 13:26 ` [PATCH v5 4/4] ftrace: Add an option for tracing console latencies Viktor Rosendahl
2019-09-04  5:02   ` kbuild test robot

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=d8377cbd-8c3c-d699-153d-8af7b44d6b87@gmail.com \
    --to=viktor.rosendahl@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --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 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).