On Sat, Oct 31, 2026 at 01:33:13AM +0000, Aamir Ahmed wrote:
> Since commit e1fad12dcb66 ("sched/fair: Switch to task based throttle
> model"), a throttled task is only dequeued when TWA_RESUME task_work
> runs on its way back to user mode.
>
> vhost workers never return to user mode, and vhost_task_fn() only runs
> task_work via get_signal() when a signal is pending. A busy vhost worker
> therefore ignores its cgroup's cpu.max, while its runtime is still
> charged to the group, throttling the group's other tasks (typically the
> VM's vCPUs) harder.
>
> Run pending notify-resume work at the top of the worker loop, as io-wq
> does in io_run_task_work(). Commit 12013e3d4695 ("KVM: powerpc: Use
> generic xfer to guest work function") fixed the same problem for KVM.
>
> Fixes: e1fad12dcb66 ("sched/fair: Switch to task based throttle model")
> Cc: [email protected] # 6.18+
> Assisted-by: LLM
> Signed-off-by: Aamir Ahmed <[email protected]>
I have this (almost) same patch but for different reasons i.e. memory.high and
block throtlling.
http://lore.kernel.org/[email protected]
If you don't mind, can you update the commit message to also include that it
will fix memory.high and cgroup block throttling as well?
You can add:
Reviewed-by: Shakeel Butt <[email protected]>
Tested-by: Shakeel Butt <[email protected]>
BTW there is a similar issue with io_uring SQPOLL thread which I am fixing
(testing at the moment), you might be interested.
thanks,
Shakeel