From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 1FF65262808 for ; Mon, 3 Aug 2026 00:31:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785717090; cv=none; b=ZjGtEXcdYS5siYTVYBjhw+Eehj73nAqecFDVTh7uP8hu4N3pnGpYUGdGsvCBW3BJXAwGaB71KsMDWwB0ITQXuad1nSenMKRWyBAxP8nTiPqWfDSvPNOV53VegjSKm+P4Mm91qdQhykqI0VlsT/t1ZFYlXjnfGhczEigEzaRQM6Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785717090; c=relaxed/simple; bh=wT/yZAe31VpyA9uBNQ2iGkW4VV43QHsyM0v0AhrcUdY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kvyindfSuca+QBhjwnolpzqov9l8KFG65vkBUWEHNPOXg7pUjoLJExxjNu23Hl2W8XH8WOm4dSQGulV5Pw9awc4DEE/qSOD9HBJ8q5bTm9pZaNnIqBneL3ZxamycXD5AWP3g6YQ2FywXn6nOvRzRvp3Goy3awPrADJzUlEoZ1o4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nb/0rCu3; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nb/0rCu3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 854571F000E9; Mon, 3 Aug 2026 00:31:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785717088; bh=bSYkecqdXij7uAK8COvOeio1RAjFwHfzjo64XfBkCiw=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=nb/0rCu3FgGj7/lGaAHN1uoMxf+ANeLBBtF8/fz98tLAGKKR9bvboRdW1ZdBxFxi0 K0Em5ZRrhBs8XZR4gcJ0gP0ctxENjwDM/btrrIt9fVL+2FeR4FymIBy1fGTqXDM5oz J70KqUe0VN1Q2hQn1MxTQI1DyToHDJQ7Jqs0P1aLF8RIpiht1rCYzecuxSR7AMZXUC CTIzQyzWlDglYVENqNQHRHM8cwQYoLVYKSe5j0eFMcJVD486vnZHT820HT8fS6TTdo OZvTTtcXy8v0Yuh7bLQRTiTbyPPfJwc+DVp7hTCLgKmAQ3w6uur4FHcGa0UT0j5nTK vdyvOzMLdiUGw== Date: Sun, 2 Aug 2026 14:31:27 -1000 From: Tejun Heo To: Breno Leitao Cc: Lai Jiangshan , linux-kernel@vger.kernel.org, kernel-team@meta.com, marco.crivellari@suse.com Subject: Re: [PATCH 3/6] workqueue: release pwq pools by pool type Message-ID: References: <20260731-wq-pool-refactor-v1-0-8eaf71cdab5f@debian.org> <20260731-wq-pool-refactor-v1-3-8eaf71cdab5f@debian.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: <20260731-wq-pool-refactor-v1-3-8eaf71cdab5f@debian.org> On Fri, Jul 31, 2026 at 04:57:35AM -0700, Breno Leitao wrote: > pwq_release_workfn() calls put_unbound_pool() based on the WQ_UNBOUND > flag. That works today because an unbound workqueue only ever points at > unbound pools, but the flag is the wrong thing to test: what matters is > whether the pool is a refcounted unbound pool or a permanent per-cpu one. > > Add is_pool_cpu_specific() and key the release on it instead of the flag. > This is equivalent for every existing workqueue and stays correct if an > unbound pwq is ever backed by a per-cpu pool. Convert the other > open-coded pool->cpu type checks -- in put_unbound_pool(), > pool_allowed_cpus() and the workqueue watchdog -- to the same helper. > > No functional change. The first para saying that it's testing something wrong and then the patch not having any functional change reads odd. Can you please rewrite? > +/* True if @pool is tied to a specific CPU, rather than an unbound pool. */ > +static bool is_pool_cpu_specific(struct worker_pool *pool) I'm not sure about introducing a new term. Can we just stick to percpu? Thanks. -- tejun