It can lock an SMP kernel up. This CPU can switch to another task in the
page allocator and then, within the context of the new task, come around
and try to take the same lock.
> Is using a semaphore better than using spinlocks?
A semaphore won't have that problem. If your CPU comes around again onto
the already-held lock it will just switch to another task.
> Is
> there a list of dos and don'ts for preempt kernels beside
> Documentation/preempt-locking.txt?
Not that I'm aware of. (This is not preempt-related though. Generally,
correct SMP coding is correct preempt coding)
> And btw, who is "us"?
>
It is a broad term for "those who code on the kernel".
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/