diff options
author | Steven Rostedt <rostedt@goodmis.org> | 2012-03-01 13:55:30 -0500 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-04-10 16:41:06 -0500 |
commit | 5f922cc3fd983c000f8dc89a141c098cffa374ac (patch) | |
tree | cd7bd91f0e14e00627d82bf962460c0e1fe7d2a9 /lib/mpi/mpi-scan.c | |
parent | 835dea979b5c01dd25b6509a83eef3a530168cd6 (diff) |
lglock/rt: Use non-rt for_each_cpu() in -rt code
Currently the RT version of the lglocks() does a for_each_online_cpu()
in the name##_global_lock_online() functions. Non-rt uses its own
mask for this, and for good reason.
A task may grab a *_global_lock_online(), and in the mean time, one
of the CPUs goes offline. Now when that task does a *_global_unlock_online()
it releases all the locks *except* the one that went offline.
Now if that CPU were to come back on line, its lock is now owned by a
task that never released it when it should have.
This causes all sorts of fun errors. Like owners of a lock no longer
existing, or sleeping on IO, waiting to be woken up by a task that
happens to be blocked on the lock it never released.
Convert the RT versions to use the lglock specific cpumasks. As once
a CPU comes on line, the mask is set, and never cleared even when the
CPU goes offline. The locks for that CPU will still be taken and released.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Carsten Emde <C.Emde@osadl.org>
Cc: John Kacur <jkacur@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Clark Williams <clark.williams@gmail.com>
Cc: stable-rt@vger.kernel.org
Link: http://lkml.kernel.org/r/20120301190345.374756214@goodmis.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'lib/mpi/mpi-scan.c')
0 files changed, 0 insertions, 0 deletions