|
|
Log in / Subscribe / Register

What about nested qspinlocks?

What about nested qspinlocks?

Posted Apr 7, 2014 15:31 UTC (Mon) by corbet (editor, #1)
In reply to: What about nested qspinlocks? by giltene
Parent article: MCS locks and qspinlocks

Remember that the per-CPU array is only used during the lock acquisition process. When nested spinlocks are held, all but (perhaps) the last are already acquired. Since the CPU is no longer trying to acquire them, it need not place an entry into the queue and, thus, does not need to use an element from the per-CPU array.


to post comments

What about nested qspinlocks?

Posted Aug 21, 2014 13:44 UTC (Thu) by luto (subscriber, #39314) [Link] (2 responses)

Why is the number 4 correct?

Process context, software interrupt, hardware interrupt, kprobe breakpoint, krpobe, NMI, MCE. If this can happen, that's seven.

What about nested qspinlocks?

Posted Jul 20, 2019 17:36 UTC (Sat) by firolwn (guest, #96711) [Link] (1 responses)

According to https://lkml.org/lkml/2019/1/10/799, NMI and MCE should never use spinlock.

There might be a problem in following scenario:
Process context, soft interrupt, hardware interrupt, page fault(e.g. vmalloc), kprobe.

What about nested qspinlocks?

Posted Jul 20, 2019 17:45 UTC (Sat) by firolwn (guest, #96711) [Link]

vmalloc isn't correct. Should be some invalid address in kernel space which triggered a page fault.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds