Re: [RFC PATCH 0/7] locking/rtqspinlock: Realtime queued spinlocks

From: Steven Rostedt
Date: Thu Jan 05 2017 - 13:51:03 EST


On Thu, 5 Jan 2017 12:07:21 -0500
Waiman Long <longman@xxxxxxxxxx> wrote:


> I do make the assumption that spinlock critical sections are behaving
> well enough. Apparently, that is not a valid assumption. I sent these
> RFC patches out to see if it was an idea worth pursuing. If not, I can
> drop these patches. Anyway, thanks for the feedback.

Yes, the assumption is incorrect. There are places that can hold a spin
lock for several hundreds of microseconds. If you can't preempt them,
you'll never get below several hundreds of microseconds in latency.

And it would be hard to pick and choose (we already do this to decide
what can be a raw_spin_lock), because you need to audit all use cases
of a spin_lock as well as all the locks taken while holding that
spin_lock.

-- Steve