From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from stravinsky.debian.org (stravinsky.debian.org [82.195.75.108]) (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 7098F3AAF7C for ; Wed, 5 Aug 2026 14:53:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=82.195.75.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785941618; cv=none; b=gP52TRlJQo7CigeJNMuIGYalJ8S/1+AN4FMY9YZ9AcdUTKYkakNd4RBnNyc9fuANOVM8qOZVCdsFNK57uQbDpGfQ3xfyjEaP6l7MRqPTjVPZzt4NAZO6RRL7sqdu5tYvpA+0536JZTEn60fl1Ced8Ado4+9K/162LVnrAj5R6UQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785941618; c=relaxed/simple; bh=b5aBzCWxC9cJyoivct1GDte/xiq8CSpam7qDzxD7KWE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GQ7IQQF5QoW6L6Z7uqDyWO5M2QaM6hQJ7qnNiyMzxweBjmGl5lZxmSFMVHCgUpbxk0DygWwYrAwiRn+oprfuBXc09D5S4nWFAx4K3HDjS+3qVGtVmpmeRUyuwC+JuqQb0kDGpl4mf3/fb5B4Yy7wrgZix5z9hzKi8HWn1cOhCk4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=debian.org; spf=pass smtp.mailfrom=debian.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b=fCDOMJij; arc=none smtp.client-ip=82.195.75.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=debian.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b="fCDOMJij" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description; bh=7UrIU/h1GgJWY2kLb9c/7GGiJt1J8Jouio4c+MLnlJg=; b=fCDOMJijiBiOXq1A1N8lQ+L5HZ 4jJMfr63tdERbNBwUkyJrMqkMOyYX6GaotDuThbC7lr4XBe0ZveG75cBn/YJp3ETBvk2H29HjXzEO iOVMPR9ad13s0D0nzSOsakwmNX6hOs2lwnuQNbgj3O+CZYi0EkGCSlXQl7oaHwtBgrWS2YZ72efsX 7OdH1tTrXFJkptFg8CVf/feUAUd0GnLsWvBOEeJdrbRU8Q7XmfOUx/BBNTU/Ak/yCUdWBkFdzVx8Z uPsDJPVsjgmFY2UnzPovZTXenQlp8LaoU+CJ/wQBEBD1bYDyWGcxt9JE0fWm6rHULihOdd8nD07Um Rfdb0a2A==; Received: from authenticated-user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1wrczs-00Dzgk-0p; Wed, 05 Aug 2026 14:53:32 +0000 From: Breno Leitao Date: Wed, 05 Aug 2026 07:52:36 -0700 Subject: [PATCH v2 9/9] workqueue: skip the node_nr_active update for non-unbound workqueues 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: 7bit Message-Id: <20260805-wq-pool-refactor-v2-9-fd498d01d695@debian.org> References: <20260805-wq-pool-refactor-v2-0-fd498d01d695@debian.org> In-Reply-To: <20260805-wq-pool-refactor-v2-0-fd498d01d695@debian.org> To: Tejun Heo , Lai Jiangshan Cc: linux-kernel@vger.kernel.org, marco.crivellari@suse.com, Breno Leitao , kernel-team@meta.com X-Mailer: b4 0.16-dev-f8e9d X-Developer-Signature: v=1; a=openpgp-sha256; l=1047; i=leitao@debian.org; h=from:subject:message-id; bh=b5aBzCWxC9cJyoivct1GDte/xiq8CSpam7qDzxD7KWE=; b=owEBbQKS/ZANAwAIATWjk5/8eHdtAcsmYgBqc05KFe/4KVHgq33Qy2UYXGgv5vPpJ+Y8HYpky uSUSRc9R3eJAjMEAAEIAB0WIQSshTmm6PRnAspKQ5s1o5Of/Hh3bQUCanNOSgAKCRA1o5Of/Hh3 bXPFEACjFbLNBq5gAswtqQvS7T1xvwRlwSDR+5C7uZSnW0duELtTF4D8279WK/qZpZhXIgeg2cV tefGn1KxTd7eOrY2yGXWrPmn9C86NdUrxPMi6XEMsWjwvn96JadTOUjXpoiV7SGIdsjtZrx4LED fH8HTm1ydsi2GEf92/BWhDJF+vp4ci+oRwdxTc+THJ9ewW5sGJXOZtFK/vow01N1yGpm2MTPy88 u6lAFfBI0bIYZFl2q+a5t516TZcMGtnzJXocPF5TfZCPCJ52vIfvZ+Pdt/cjHEMsRALgR+JYIP8 GDrj7Lg/s2sw4hltqmASBSSGRuzd8lVEQs987UY2kWq9Zfx9wIBpb+AQMGHutk45poBtvdGFWDz VGN+Prvj7utMbo4xCVqDwFXMT0iGgatEltFtMnQII2PTXiSoULw8ZcNkDVcxPKD+jyBBrEq3/sh nSQvA/9oDNF6Eqv+n3gHRfvbXgeLNrX1fIc5Mo7INr6N0AWMDuuftf/+d4yKj+4aecyCPbRpyW5 bGOurUV4X6yqyWUAjqWyrWK1KEqJVkgtHfgowkYrFnrNRb/oSlIrCvxwtGkJziEvZiT5cRq8e4T 1xrEOorTbuc0BVdeAiV/p0jgRZk/Mry0GfJpkGbSxanUmcK/PSt3AUgWRM8l17Mg3QC6vnme0FH yWlHL7GxA3UxN2w== X-Developer-Key: i=leitao@debian.org; a=openpgp; fpr=AC8539A6E8F46702CA4A439B35A3939FFC78776D X-Debian-User: leitao apply_wqattrs_commit() updates node_nr_active->max unconditionally. wq->node_nr_active[] is only allocated for unbound workqueues, so guard the call before per-cpu workqueues start using this path. No functional change: only unbound workqueues reach apply_wqattrs_*() today. Signed-off-by: Breno Leitao --- kernel/workqueue.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 65ac75431c3be..8fd6af72ffd8d 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -5556,8 +5556,9 @@ static void apply_wqattrs_commit(struct apply_wqattrs_ctx *ctx) ctx->pwq_tbl[cpu]); ctx->dfl_pwq = install_unbound_pwq(ctx->wq, -1, ctx->dfl_pwq); - /* update node_nr_active->max */ - wq_update_node_max_active(ctx->wq, -1); + /* update node_nr_active->max, which only unbound workqueues have */ + if (ctx->wq->flags & WQ_UNBOUND) + wq_update_node_max_active(ctx->wq, -1); mutex_unlock(&ctx->wq->mutex); } -- 2.53.0-Meta