Skip to contentSkip to conversation

rtmutex implementation question

DISCUSSION Mike Galbraith 1 participant 1 message Apr 23, 2013

lore
Share & tools
lore
#0 lore raw

Greetings,

What is it that prevents unbound latencies for all tasks queued behind a task that blocks on an rt spinlock, with a compute task from hell queued behind it at the same priority?

The lock is not stealable for tasks of the same priority, so it seems as though queueing the sleeper to queue tail upon wakeup (lock released, sleeper is now top waiter) must result in the unlocked lock remaining unavailable to all other tasks of the same priority who blocked on the lock after the sleeper, who won't get the CPU back to claim the lock until, say SCHED_FIFO while(1) releases the CPU.

Far too ungood to be true, so I bet a nickle I'm missing something.

Anybody in need of a virtual nickle? Just point me to the "well duh" spot in the source, and it's all yours ;-)

-Mike