From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 33B293E0C66 for ; Tue, 31 Mar 2026 09:39:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774949951; cv=none; b=OPsmDdvOmGnY34Z/EVJQzt8yiT9ZZCj5Jk9eAEbv16QGU+BO6BVpcIvKk12UgIbkzmBTRzBdqTAn2PXUgbm8YMi/RcE3UQG92mX520zEHRLFLkeLdxbV6Zhwbrv1V2HKmYkbfapvliIg1u8hItS5uUehnz5T36FEtFtwQ6LylPI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774949951; c=relaxed/simple; bh=nWWPtCUZY7UVwdebeuzBzKLqqWfPqao6xfhwjzyr5kg=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AbktaYckcQ3eXdCb2vt7Vaeha+YeLhYX5isWQmha2DJBOHrAMceORQrEKTYwTdN8VTcEXI7SzIwyLmvK79qxmq/qpyM7nx/b4rs6846MG9LWwdttwJvENnvizTD2kMz45dPKtcoRXcPLdOfKUwBzOAEYqfCZ66r2QM7zJ+7ZG3o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Hx5hsklb; arc=none smtp.client-ip=209.85.208.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Hx5hsklb" Received: by mail-lj1-f172.google.com with SMTP id 38308e7fff4ca-38c620f1699so51243231fa.0 for ; Tue, 31 Mar 2026 02:39:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774949948; x=1775554748; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=bbHlAEStjw6Wu8mMsfT+Jv4/X4ttfYMb0i0VeuUMhas=; b=Hx5hsklb7eYzTptbTr+Xx9O4Tx6CVCIEKCovG+qbxitLh1kVWQeWzDYMnn/IRP428D AGTBdormdK+csYtmrcIDl9/tygdM4ZuubGOkKqOMWLLeSsVBABxhr0CLGyrFnReITNyA DCX3cHFpwPTLIL8qV0N6ZokdHGEZIN+nhGK0CDv/lnv6d6ZUTYPdiTjbR5bl9Al2yrJs vVoEwedlENoUyyARpbOu9p7yitnMHacGjy+iNd9mLWWLN/oFuzPPVuQvqwVF5m3KHlb5 vnm+iue+x7wNVscTWVF0aagkl/Tq8qfXsNfJYSaT85Wmqi0W2c4zMNqXVb8sxWA703mg VqVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774949948; x=1775554748; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bbHlAEStjw6Wu8mMsfT+Jv4/X4ttfYMb0i0VeuUMhas=; b=kVAZLnhxDJNxCauh3LR1vH/6i19WOEar4rxL/YEWC0HVM2yR4s0gSMUcWCRfiCy+dO jlNpfSGKKOKUs2Rxr6h55ye0bOkDRJMliC04O/YM/BaAs8nsJny2wAv/hCzDcpdX5zCg f/1oJKvwyoD2kQddgZEsDPrzAFoJ2GtWcogLSXODsNgO82LiTxBKnRpubwnCDjX2E97A VwpGWJCysR6PEjNxMRq5h23nvhnUtRiVTJagRKvwDqiMQ0TumjFY/VdWOlCYpeLz8Psw cJxclh2CUQbVRxl0bqkfxpzgzVu1jbF9ZsrlzW56kp7sGnqSLffCq9///LA+Vo3OK6Ax pqOw== X-Forwarded-Encrypted: i=1; AJvYcCUhmweh25PgqwxNW0nj67r/C1M69W/sFOIcLI4FsSq65EJVP2DIWfKkA4mmkBTwid6cEJTd2K3PpXazg7A=@vger.kernel.org X-Gm-Message-State: AOJu0Yxfo5bhaX2h5QG9VVKk+OD9A9L81s8Tp/UAtC/wiFxasRR89ctI A9+4AN+jr+Cp31fmdDIKULwZsPP7+yEyNklRTNbmWjvIY1+kCncChQcC X-Gm-Gg: ATEYQzyx5SbVMmVyLDFoZAFkSFJT3hpL884WHHC6yy+kx5fcz/XadhsxGAmboMaJDjG yL+BLUUqW6GxXmFUEg7Xgi/BXqPBvLPs9ItAI5lmuxIewO8ifOKWnhDDZquLVziDv4ZKAZDeUs1 eC1sqwu38F2kqaI4rCn4mDqM8DqkhqBbQQT1uN4ntZqPVFX7ZP76oRyKhCdyY6cBnjWSOQaoaYP awDNk37BkwK4Cegs28j1yvk4AMpxhdbxfJjKBtKcQvF//eWcGkU4RhuBSVDSwSIlbJJuYJ/WUi2 JFNY1IyfYRP9nQbndQRDrlDjIye97DlQqAcZmTrMpiKA8yLlGMcIsiMjTI2Xo/JmhXb4WvwNdfa 1QDRhda4NQxNon6/thaz9C5o3bnVUQGe2ypEa5uYxQYyWwxIkFyFAZsKvB2XlXILr X-Received: by 2002:a05:651c:1182:b0:383:282b:7ac5 with SMTP id 38308e7fff4ca-38c7400532fmr38265251fa.25.1774949948068; Tue, 31 Mar 2026 02:39:08 -0700 (PDT) Received: from milan ([2001:9b1:d5a0:a500::24b]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-38c835b0946sm20380921fa.0.2026.03.31.02.39.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Mar 2026 02:39:07 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Tue, 31 Mar 2026 11:39:06 +0200 To: Andrew Morton Cc: "Uladzislau Rezki (Sony)" , linux-mm@kvack.org, Baoquan He , LKML , lirongqing Subject: Re: [PATCH v2] mm/vmalloc: Use dedicated unbound workqueue for vmap purge/drain Message-ID: References: <20260330175824.2777270-1-urezki@gmail.com> <20260330121625.c69f46a63c86c9540b823398@linux-foundation.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260330121625.c69f46a63c86c9540b823398@linux-foundation.org> On Mon, Mar 30, 2026 at 12:16:25PM -0700, Andrew Morton wrote: > On Mon, 30 Mar 2026 19:58:24 +0200 "Uladzislau Rezki (Sony)" 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. AI review flagged a couple of possible issues. Do they look > real to you? > https://sashiko.dev/#/patchset/20260330175824.2777270-1-urezki@gmail.com > I think the problem about itself locking if running by rescue thread is a valid concern. I will address this. I think the easiest is to use two UNBOUND queues one for master/main thread and second for helpers which reclaim if there are too many objects so the help is needed. I will work on v3. Thank you for review! -- Uladzislau Rezki