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

From: Peter Zijlstra

Date: Tue Apr 07 2026 - 04:30:45 EST


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.