linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Q: schedule() and implied barriers on arm64
@ 2015-10-16 15:18 Peter Zijlstra
  2015-10-16 16:04 ` Paul E. McKenney
  0 siblings, 1 reply; 20+ messages in thread
From: Peter Zijlstra @ 2015-10-16 15:18 UTC (permalink / raw)
  To: Will Deacon, Paul McKenney; +Cc: linux-kernel, Oleg Nesterov, Ingo Molnar

Hi,

IIRC Paul relies on schedule() implying a full memory barrier with
strong transitivity for RCU.

If not, ignore this email.

If so, however, I suspect AARGH64 is borken and would need (just like
PPC):

#define smp_mb__before_spinlock()	smp_mb()

The problem is that schedule() (when a NO-OP) does:

	smp_mb__before_spinlock();
	LOCK rq->lock

	clear_bit()

	UNLOCK rq->lock

And nothing there implies a full barrier on AARGH64, since
smp_mb__before_spinlock() defaults to WMB, LOCK is an "ldaxr" or
load-acquire, UNLOCK is "stlrh" or store-release and clear_bit() isn't
anything.

Pretty much every other arch has LOCK implying a full barrier, either
because its strongly ordered or because it needs one for the ACQUIRE
semantics.



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2015-10-28 10:39 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-16 15:18 Q: schedule() and implied barriers on arm64 Peter Zijlstra
2015-10-16 16:04 ` Paul E. McKenney
2015-10-16 16:16   ` Peter Zijlstra
2015-10-16 16:28     ` Paul E. McKenney
2015-10-16 16:39       ` Peter Zijlstra
2015-10-16 16:55     ` Catalin Marinas
2015-10-16 17:28       ` Paul E. McKenney
2015-10-16 19:07         ` Peter Zijlstra
2015-10-16 19:20           ` Paul E. McKenney
2015-10-19 15:18         ` Catalin Marinas
2015-10-16 19:06       ` Peter Zijlstra
2015-10-19  7:06         ` Ingo Molnar
2015-10-19  9:04           ` Peter Zijlstra
2015-10-19 15:21           ` Catalin Marinas
2015-10-19 16:24             ` Peter Zijlstra
2015-10-20  8:37               ` Ingo Molnar
2015-10-27 16:19               ` Will Deacon
2015-10-27 18:40                 ` Peter Zijlstra
2015-10-28 10:39                   ` Will Deacon
2015-10-16 17:11   ` Catalin Marinas

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).