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 -- To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html