All of lore.kernel.org
 help / color / mirror / Atom feed
* rt & hotplug work....
@ 2012-07-20 20:07 Lars Segerlund
  2012-07-21  0:24 ` Paul E. McKenney
  0 siblings, 1 reply; 2+ messages in thread
From: Lars Segerlund @ 2012-07-20 20:07 UTC (permalink / raw)
  To: linux-rt-users

 There was some cpu hotplug work recently, and I can't get my head
around what happens with a dual cpu system if one core is shut down,
specificly with spinlocks.
 Won't it just hang or spin a lot ? I was thinking the locking was
different in the build for uni of multi processors, to eliminate the
deadlock risk on a uni processor.

 I do realise this might not be rt specific, but I'll ask anyhow.

 / regards, Lars Segerlund.

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

* Re: rt & hotplug work....
  2012-07-20 20:07 rt & hotplug work Lars Segerlund
@ 2012-07-21  0:24 ` Paul E. McKenney
  0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2012-07-21  0:24 UTC (permalink / raw)
  To: Lars Segerlund; +Cc: linux-rt-users

On Fri, Jul 20, 2012 at 10:07:38PM +0200, Lars Segerlund wrote:
>  There was some cpu hotplug work recently, and I can't get my head
> around what happens with a dual cpu system if one core is shut down,
> specificly with spinlocks.
>  Won't it just hang or spin a lot ? I was thinking the locking was
> different in the build for uni of multi processors, to eliminate the
> deadlock risk on a uni processor.
> 
>  I do realise this might not be rt specific, but I'll ask anyhow.

When a CPU-hotplug operation takes a CPU offline, that CPU must release
any true spinlocks before actually going away.  Therefore, when the
surviving CPU attempts to acquire a spinlock, it is guaranteed to
acquire it immediately.  (Some architectures go even farther and
optimize away spinlock acquisitions when the system transitions to
single-CPU operation.)

							Thanx, Paul


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

end of thread, other threads:[~2012-07-21  0:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-20 20:07 rt & hotplug work Lars Segerlund
2012-07-21  0:24 ` Paul E. McKenney

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.