Re: [PATCH v2] mm/vmalloc: use dedicated unbound workqueue for vmap area draining

From: Andrew Morton

Date: Thu Mar 19 2026 - 23:16:21 EST


On Thu, 19 Mar 2026 03:43:07 -0400 lirongqing <lirongqing@xxxxxxxxx> wrote:

> The drain_vmap_area_work() function can take >10ms to complete when
> there are many accumulated vmap areas in a system with a high CPU
> count, causing workqueue watchdog warnings when run via
> schedule_work():
>
> [ 2069.796205] workqueue: drain_vmap_area_work hogged CPU for >10000us 4 times, consider switching to WQ_UNBOUND
> [ 2192.823225] workqueue: drain_vmap_area_work hogged CPU for >10000us 5 times, consider switching to WQ_UNBOUND
>
> Switch to a dedicated WQ_UNBOUND workqueue to allow the scheduler to
> run this background task on any available CPU, improving responsiveness.
> Use WQ_MEM_RECLAIM to ensure forward progress under memory pressure.
>
> Create vmap_drain_wq in vmalloc_init_late() which is called after
> workqueue_init_early() in start_kernel() to avoid boot-time crashes.

AI review flags some potential issues:
https://sashiko.dev/#/patchset/20260319074307.2325-1-lirongqing%40baidu.com