From: Uladzislau Rezki <urezki@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Uladzislau Rezki (Sony)" <urezki@gmail.com>,
linux-mm@kvack.org, Baoquan He <bhe@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
lirongqing <lirongqing@baidu.com>
Subject: Re: [PATCH v2] mm/vmalloc: Use dedicated unbound workqueue for vmap purge/drain
Date: Tue, 31 Mar 2026 11:35:24 +0200 [thread overview]
Message-ID: <acuVXBglDLnnspgL@milan> (raw)
In-Reply-To: <20260330115618.62fb0d6bdf89cedd453035d0@linux-foundation.org>
On Mon, Mar 30, 2026 at 11:56:18AM -0700, Andrew Morton wrote:
> On Mon, 30 Mar 2026 19:58:24 +0200 "Uladzislau Rezki (Sony)" <urezki@gmail.com> 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.
> >
> > If queuing work to the dedicated workqueue is not possible(during
> > early boot), fall back to processing locally to avoid losing progress.
> >
> > Also simplify purge helper scheduling by removing cpumask-based
> > iteration in favour to iterating directly over vmap nodes with
> > pending work.
>
> Thanks, both.
>
> > Cc: lirongqing <lirongqing@baidu.com>
> > Link: https://lore.kernel.org/all/20260319074307.2325-1-lirongqing@baidu.com/
> > Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
>
> We don't want to be scaring our users with kernel warnings. Do you
> think a Fixes: or cc:stable are justified?
>
Probably we can CC stable.
> And I wonder if that workqueue warning should be WARN_ON_ONCE. That
> would mean that other, later call sites wouldn't get the report, but
> we'll still get to hear about those callsites from someone else.
>
I can switch to ONCE version. Below code:
static int __init vmalloc_init_workqueue(void)
{
struct workqueue_struct *wq;
wq = alloc_workqueue("vmap_drain", WQ_UNBOUND | WQ_MEM_RECLAIM, 0);
WARN_ON(wq == NULL);
WRITE_ONCE(drain_vmap_wq, wq);
return 0;
}
early_initcall(vmalloc_init_workqueue);
implies to be called/initialized only once.
--
Uladzislau Rezki
next prev parent reply other threads:[~2026-03-31 9:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-30 17:58 [PATCH v2] mm/vmalloc: Use dedicated unbound workqueue for vmap purge/drain Uladzislau Rezki (Sony)
2026-03-30 18:56 ` Andrew Morton
2026-03-31 9:35 ` Uladzislau Rezki [this message]
2026-03-30 19:16 ` Andrew Morton
2026-03-31 9:39 ` Uladzislau Rezki
2026-03-31 14:11 ` Uladzislau Rezki
2026-03-31 7:42 ` [syzbot ci] " syzbot ci
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=acuVXBglDLnnspgL@milan \
--to=urezki@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lirongqing@baidu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.