Re: [PATCH 0/1] sched: Restore PREEMPT_NONE as default

Peter Zijlstra
2026-04-07T08:28:01Z

On Sun, Apr 05, 2026 at 10:09:35AM -0400, Andres Freund wrote:

> FWIW, from what I can tell, the whole "WHAA, it's a userspace spinlock" part
> has just about nothing to do with the problem.

:-)

> My understanding is that
> default futexes don't transfer the lock waiter's scheduler slice to the lock
> holder (there's no information about who the lock holder is unless it's a PI
> futex),

(and robust; both PI and robust store the owner TID in the futex field)

The difference is that while mutex lock holder preemption is also bad,
it mostly just leads to idle time, which you can sometimes fill with
doing other work.

Whereas with spinlocks, the time gets soaked up with spinners.

So both 'bad', but both different.

> Postgres' spinlock have randomized exponential backoff and the amount
> of spinning is adjusted over time, so you don't actually end up with spinlock
> waiters preventing the lock owner from getting scheduled to a significant
> degree.

Fair enough.