I run into a situation that using spin_lock()
inside a workqueue hangs the system in case the intervals between multiple interrupts are too short. After changing spin_lock()
to down_interruptible()
the issue is gone for now.
However I saw several bottom halves implementation in kernel code that use spin_lock()
instead of mutex/semaphore (for example, the irq-function in a request_threaded_irq()
). What would be the reason for that? My best guess is the mutex/sempahore might be overkill in this situation.