Re: [PATCH v3] mm/vmalloc: Use dedicated unbound workqueues for vmap drain

Andrew Morton
2026-03-31T22:40:10Z

On Tue, 31 Mar 2026 22:23:52 +0200 "Uladzislau Rezki (Sony)" <urezki@gmail.com> wrote:

> drain_vmap_area_work() function can take >10ms to complete
> when there are many accumulated vmap areas in a system with
> high CPU count, causing workqueue watchdog warnings when run
> via schedule_work():
>
> workqueue: drain_vmap_area_work hogged CPU for >10000us
>
> Move the top-level drain work to a dedicated WQ_UNBOUND
> workqueue so the scheduler can run this background work
> on any available CPU, improving responsiveness. Use the
> WQ_MEM_RECLAIM to ensure forward progress under memory
> pressure.
>
> Move purge helpers to separate WQ_UNBOUND | WQ_MEM_RECLAIM
> workqueue. This allows drain_vmap_work to wait for helpers
> completion without creating dependency on the same rescuer
> thread and avoid a potential parent/child deadlock.
>
> Simplify purge helper scheduling by removing cpumask-based
> iteration to iterating directly over vmap nodes checking
> work_queued state.

Great, thanks.

> Fixes: 72210662c5a2 ("mm: vmalloc: offload free_vmap_area_lock lock")

That was a couple of years ago so I see no need to rush this into
mainline. I added it to the next-merge-window pile - it'll trickle
back into -stable kernels later on.