All of lore.kernel.org
 help / color / mirror / Atom feed
* preemptible spinlock?
@ 2021-04-22 15:50 유형곤
  2021-04-23  6:27 ` Wonhyuk Yang
  0 siblings, 1 reply; 4+ messages in thread
From: 유형곤 @ 2021-04-22 15:50 UTC (permalink / raw)
  To: kernelnewbies

I'm learning how spinlock works.

I think the main idea spinlock disables preemption is,
the other process that's spinning on the lock can acquire lock.

but in some implementations of spinlock, like qspinlock in x86 (or mcs lock),
I think there's no need to disable preemption. because processes
waiting for lock cannot acquire the lock before the lock holder hand
over to other process.

is enabling preemption in such spinlock a bad idea?

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

end of thread, other threads:[~2021-04-24  5:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22 15:50 preemptible spinlock? 유형곤
2021-04-23  6:27 ` Wonhyuk Yang
2021-04-23  6:45   ` Max Filippov
2021-04-24  5:51     ` Hyeonggon Yoo

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.