Re: [PATCH RESEND] mm/vmalloc: Use dedicated unbound workqueues for vmap drain
From: Andrew Morton
Date: Sat Sep 05 2026 - 18:37:20 EST
On Sat, 5 Sep 2026 17:27:17 +0200 "Uladzislau Rezki (Sony)" <urezki@xxxxxxxxx> 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.
Thanks.
> Cc: stable@xxxxxxxxxxxxxxx
> Cc: Dev Jain <dev.jain@xxxxxxx>
> Cc: Ye Liu <ye.liu@xxxxxxxxx>
> Cc: lirongqing <lirongqing@xxxxxxxxx>
> Fixes: 72210662c5a2 ("mm: vmalloc: offload free_vmap_area_lock lock")
> Link: https://lore.kernel.org/all/20260319074307.2325-1-lirongqing@xxxxxxxxx/
> Reviewed-by: Baoquan He <bhe@xxxxxxxxxx>
> Signed-off-by: Uladzislau Rezki (Sony) <urezki@xxxxxxxxx>
I think what we wanted here was
Reported-by: Li RongQing <lirongqing@xxxxxxxxx>
Closes: https://lore.kernel.org/all/20260319074307.2325-1-lirongqing@xxxxxxxxx/
so I made that change.