From: Steven Rostedt <rostedt@goodmis.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
"Ingo Molnar" <mingo@kernel.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Clark Williams" <williams@redhat.com>,
linux-rt-users <linux-rt-users@vger.kernel.org>,
"Mike Galbraith" <umgwanakikbuti@gmail.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
"Jörn Engel" <joern@purestorage.com>,
"Oleg Nesterov" <oleg@redhat.com>
Subject: Re: [RFC][PATCH v2] sched/rt: Use IPI to trigger RT task push migration instead of pulling
Date: Thu, 26 Feb 2015 07:43:01 -0500 [thread overview]
Message-ID: <20150226074301.0db88af3@grimm.local.home> (raw)
In-Reply-To: <20150226074559.GP21418@twins.programming.kicks-ass.net>
On Thu, 26 Feb 2015 08:45:59 +0100
Peter Zijlstra <peterz@infradead.org> wrote:
> On Wed, Feb 25, 2015 at 12:50:15PM -0500, Steven Rostedt wrote:
> > It can't be used for state?
> >
> > If one CPU writes "zero", and the other CPU wants to decide if the
> > system is in the state to do something, isn't a rmb() fine to use?
> >
> >
> > CPU 1:
> >
> > x = 0;
> > /* Tell other CPUs they can now do something */
> > smp_wmb();
> >
> > CPU 2:
> > /* Make sure we see current state of x */
> > smp_rmb();
> > if (x == 0)
> > do_something();
> >
> > The above situation is not acceptable?
>
> Acceptable is just not the word. It plain doesn't work that way.
Thinking about this more, is it because a wmb just forces the CPU to
write everything before this before it writes anything after it. That
is, the writes themselves can happen at a much later time. Does a plain
mb() work the same way if there are no reads required?
>
> > Otherwise, we fail to be able to do_something() when it is perfectly
> > fine to do so.
>
> Can't be helped.
What about using atomic_t?
Note, my latest code doesn't have any of this, but I just want to
understand the semantics of these operations a bit better.
-- Steve
next prev parent reply other threads:[~2015-02-26 12:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-24 18:39 [RFC][PATCH v2] sched/rt: Use IPI to trigger RT task push migration instead of pulling Steven Rostedt
2015-02-24 18:45 ` Steven Rostedt
2015-02-24 21:23 ` Steven Rostedt
2015-02-25 10:35 ` Peter Zijlstra
2015-02-25 15:51 ` Steven Rostedt
2015-02-25 17:11 ` Peter Zijlstra
2015-02-25 17:41 ` Peter Zijlstra
2015-02-25 17:50 ` Steven Rostedt
2015-02-26 7:45 ` Peter Zijlstra
2015-02-26 12:43 ` Steven Rostedt [this message]
2015-02-26 13:47 ` Peter Zijlstra
2015-02-26 14:00 ` Steven Rostedt
2015-02-26 7:49 ` Peter Zijlstra
2015-02-26 12:46 ` Steven Rostedt
-- strict thread matches above, loose matches on Subject: below --
2015-02-25 7:56 Hillf Danton
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=20150226074301.0db88af3@grimm.local.home \
--to=rostedt@goodmis.org \
--cc=joern@purestorage.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=umgwanakikbuti@gmail.com \
--cc=williams@redhat.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 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.