Re: [PATCH] sched: Further restrict the preemption modes

From: Sebastian Andrzej Siewior

Date: Tue Feb 24 2026 - 12:15:08 EST


On 2026-02-24 15:45:39 [+0000], Ciunas Bennett wrote:
> Monitoring the guest CPU run time shows that it drops from 16% with
> PREEMPT_FULL to 9% with PREEMPT_LAZY.
>
> The workload is dominated by voluntary preemption (schedule()), and
> PREEMPT_LAZY is, as far as I understand, mainly concerned with forced
> preemption.
> It is therefore not obvious why PREEMPT_LAZY has an impact here.

PREEMPT_FULL schedules immediately if there is a preemption request
either due to a wake up of a task, or because the time slice is used up
(while in kernel).
PREEMPT_LAZY delays the preemption request, caused by the scheduling
event, either until the task returns to userland or the next HZ tick.

The voluntary schedule() invocation shouldn't be effected by FULL-> LAZY
but I guess FULL scheduled more often after a wake up which is in
favour.

> Changing guest configuration to disable mergeable RX buffers:
> <host mrg_rxbuf="off"/>
> had a clear effect on throughput:
> PREEMPT_LAZY: throughput improved from 40 Gb/s → 60 Gb/s
>

Brings this the workload/ test to PREEMPT_FULL level?

Sebastian