From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1A56430DD36 for ; Wed, 14 Jan 2026 02:01:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768356077; cv=none; b=oJHlTnaMsq6JO03t0YggjM8HwyMrymD8pz96PWhVFgykjPON8SmPabyqdeom8e24AblY/31+0xMOAZYsS+bC6xTyQd+u6Xx0IAV6XOigpCJwgsmA5s/7tQx81mCWIdI/p0exW/6uF5NIW8VXClxcGeve2dcEXy6wMxyFSfGdnwI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768356077; c=relaxed/simple; bh=+CRDZiGmHP4avaMzn+PHhzpnNd6T9cSGRR99FsnCPMY=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=fIGbQWws4KJrWOD+kGtYKWqTKk/h56L9bAi3bBQvi9Sx2gvLRcUU/vkUdwyyx3x2X6vqgDmSPmvbOzD5uiLeleMv0yLzFpdwGOunZpZ4m6TAKHQ7k2NOR8ucIFC47FLvVZI3VNFdQLTvaZfc/jl20eRJ2PvuZqojMIOtAapNH/Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=as4AuNJP; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="as4AuNJP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D7AEC19424; Wed, 14 Jan 2026 02:01:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1768356076; bh=+CRDZiGmHP4avaMzn+PHhzpnNd6T9cSGRR99FsnCPMY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=as4AuNJPQpyHYQ9OBrfLzATA3dcGT2ZOQyZSzfKBGRlx7ocUXiLipH6wmEkyHPoaM rfkOq/31UZlZ86qhj2qxbuocdyaLEEvdpOicwUxHp2zNVE+S2+ym0Tqq2eucqJMWYr 9gZ4MfUsDtLLnABjXzWSjlNyQvgnMj0shMrTl58g= Date: Tue, 13 Jan 2026 18:01:15 -0800 From: Andrew Morton To: Marco Crivellari Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Michal Hocko Subject: Re: [PATCH v2 3/3] mm: add WQ_PERCPU to alloc_workqueue users Message-Id: <20260113180115.bdb0cce3b99c72e247424095@linux-foundation.org> In-Reply-To: <20260113114630.152942-4-marco.crivellari@suse.com> References: <20260113114630.152942-1-marco.crivellari@suse.com> <20260113114630.152942-4-marco.crivellari@suse.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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=UTF-8 Content-Transfer-Encoding: 8bit On Tue, 13 Jan 2026 12:46:30 +0100 Marco Crivellari wrote: > This continues the effort to refactor workqueue APIs, which began with > the introduction of new workqueues and a new alloc_workqueue flag in: > > commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq") > commit 930c2ea566af ("workqueue: Add new WQ_PERCPU flag") > > The refactoring is going to alter the default behavior of > alloc_workqueue() to be unbound by default. > > With the introduction of the WQ_PERCPU flag (equivalent to !WQ_UNBOUND), > any alloc_workqueue() caller that doesn’t explicitly specify WQ_UNBOUND > must now use WQ_PERCPU. For more details see the Link tag below. > > In order to keep alloc_workqueue() behavior identical, explicitly request > WQ_PERCPU. > > --- a/mm/slub.c > +++ b/mm/slub.c > @@ -8542,7 +8542,9 @@ void __init kmem_cache_init(void) > > void __init kmem_cache_init_late(void) > { > - flushwq = alloc_workqueue("slub_flushwq", WQ_MEM_RECLAIM, 0); > +#ifndef CONFIG_SLUB_TINY > + flushwq = alloc_workqueue("slub_flushwq", WQ_MEM_RECLAIM | WQ_PERCPU, > + 0); > WARN_ON(!flushwq); > } > oops. I did this: --- a/mm/slub.c~mm-add-wq_percpu-to-alloc_workqueue-users-fix +++ a/mm/slub.c @@ -8546,6 +8546,7 @@ void __init kmem_cache_init_late(void) flushwq = alloc_workqueue("slub_flushwq", WQ_MEM_RECLAIM | WQ_PERCPU, 0); WARN_ON(!flushwq); +#endif } struct kmem_cache * _