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 5B3A628D8DA for ; Tue, 3 Feb 2026 20:34:22 +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=1770150862; cv=none; b=Yk0/djNlwUbNs5IzF5k8NxWDfQDPD7hhT/3zJ06P7f1M6STcl+xgtYLzzoc9sowAF91ryWgIIswd7tF8IUm50ZWp7maqPmLH0pVLKlAJkVeO8cynwmANxTPpJt4cTpEvOULexbn3w0rzvQoEm6i7p8VFYlC7DwOvjFuP2/yhKxE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770150862; c=relaxed/simple; bh=b9BqgRSSW12G7ZClgtsWZj0mAqNFnFe3ncMAQ+kPDCI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=fARcvCd6Q+s6FGIlz48MPvMYXIRnSsH3Zwla83sYDNmIqYM0/Yd7QEVod/L2QTqzFe3Wr9P+6z49XAKchNt2YEBywic8Ye+uz5gxXKJJySobx0wMce52oueq9gLw/fHudtlobtCOaFM2/nCdkvYPjW367sE0A6ZH2vNrx9KDHDQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rFpayvqO; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rFpayvqO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96205C116D0; Tue, 3 Feb 2026 20:34:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770150861; bh=b9BqgRSSW12G7ZClgtsWZj0mAqNFnFe3ncMAQ+kPDCI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=rFpayvqOn+n7h3ptP4id8sKr96sITbUaa6j4no0JboB281oYSAyG2Z9nG9bBBtRX3 isHuLHxPIVV6I9HccwsIcjSQlvlejPOhAdqndEDpIeU3Px2jGh7F5X0HXjKYK9CwiA y/vqS36yoTxt/AsnTjmi7LRrQ1zoj5u3EFsrif9dXcLybL+rop1vS9vpa3dgdqtaL3 gnalSFaO/SRBUp4xgzK2FZy5ESnBJqshN7yEDYw0QDKOuKYAcIXzFSANuiBfXrP1ez H0mJ1HYETlOZeJZ4lhUhfcrqp8FfBCc5qpDTZewUMHGZ6yJdB4276z6ou9bsA/YPHM pJ3obQyj8/25A== Message-ID: <8e66cf1a-09e2-4261-b2b4-6a5e608b9ec7@kernel.org> Date: Tue, 3 Feb 2026 15:34:22 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH] workqueue: Automatic affinity scope fallback for single-pod topologies To: Tejun Heo Cc: jiangshanlai@gmail.com, linux-kernel@vger.kernel.org, Chuck Lever References: <20260203143744.16578-1-cel@kernel.org> Content-Language: en-US From: Chuck Lever Organization: kernel.org In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2/3/26 3:29 PM, Tejun Heo wrote: > On Tue, Feb 03, 2026 at 03:14:46PM -0500, Chuck Lever wrote: >>> While I understand the problem, I don't think dropping down to core boundary >>> for unbound workqueues by default makes sense. That may help with some use >>> cases but cause problem with others. >> >> I've never seen a case where it doesn't help. In order to craft an >> alternative, I'll need to have some examples to avoid. Is it only the >> SMT case that is concerning? > > It's just a lot of separate pools on large machines. If you have relatively > high concurrency, the number of workers can go pretty high. They'd also > migrate back and forth more depending on usage pattern and have worse cache > locality. Imagine you have a bursty workload wandering through the system, > if you have nr_cores pools, it can easily end up with kworkers > nr_cores * > max_concurrency. The patch addresses that, I'd hope, by only switching to per-CPU on single pod (ie, simple) systems. Larger, more complicated, topologies should be left unchanged. I imagine that on a single pod machine with a large number of cores, having per-CPU locking will nearly always be a win. -- Chuck Lever