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 577AB34388E for ; Mon, 3 Aug 2026 14:20:02 +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=1785766804; cv=none; b=LdtrvgoC8u1E9sZIn2B0fN3omfPC45UGePqhrlKy5upx2GSDbs6GaVdwuHR8yeoaNS1UG//NHkSflRZvjotJI/J0q/WV/Yn3rQisfLgz0fQlGpWiIgJygQmSQ03cGskYDnXNWGBUv3NgHMne0IeYKQKGqUlvo5WZR8b8F/tv7vk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785766804; c=relaxed/simple; bh=OOB6uqzKtoi25XToChbPSUaJatZSzUSXSzeeYwWr2sc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=q2PF2FJH8ZSCu0Q69keA2WNEcPWCCqFOq5l7pbUmmxTDVAS+X23I/+qK0URsat5UR+YLWCKVXUgpf6F9HkweKiZaFsfw+U6WbWFay5z0TD1GnHhBHl5JFnR965vx02MMMRIDDmR4Ky5GuI56wReYqmG0paVcltiMiGut6pl9r90= 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=ExPZb6e9; 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="ExPZb6e9" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=riHZoXdHqOdSR+DRkHh4IdGv+SnOlXNtUKgP/3dhetk=; b=ExPZb6e9qg9FB8E8gIu38wrVmL HNdd6GXZzH2JSDQMY7m7e+q1yhzYFO86aoo7OAvv+k/6i6kHHbl8UhtVSC3QPshnLcHbV4Nr51GHK s0LlJvZ8f6o5rh/bw7UhhnwAlXKQvkWwUjPbOCMYWpHp/bjqXOTx2ehahdkk6gdjXuRXxnMVVYsTd srnvg25zXpgsMgL4rLqeBj6LX2gpRmq3TrT/J7UEmvTTwF2ZD1aLuxK+eymah0ss0OnC+25n0htj+ I3/B7dhzacZgkTIBjg+G1zc1Fhg3Z6nmQaVbSqEfVxw9Sno/e59B/FMWKTkbRTJMSJmq9ziF8ZSoL Jdn5YGiw==; 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 1wqtWH-00CQ6n-1L; Mon, 03 Aug 2026 14:19:57 +0000 Date: Mon, 3 Aug 2026 07:19:53 -0700 From: Breno Leitao To: Tejun Heo Cc: Lai Jiangshan , linux-kernel@vger.kernel.org, kernel-team@meta.com, marco.crivellari@suse.com Subject: Re: [PATCH 4/6] workqueue: account nr_active by the backing pool Message-ID: References: <20260731-wq-pool-refactor-v1-0-8eaf71cdab5f@debian.org> <20260731-wq-pool-refactor-v1-4-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: X-Debian-User: leitao On Sun, Aug 02, 2026 at 02:34:16PM -1000, Tejun Heo wrote: > Hello, > > On Fri, Jul 31, 2026 at 04:57:36AM -0700, Breno Leitao wrote: > > @@ -1796,6 +1799,10 @@ static bool pwq_tryinc_nr_active(struct pool_workqueue *pwq, bool fill) > > if (unlikely(pwq->plugged)) > > return false; > > > > + nna = wq_node_nr_active(wq, pool->node); > > + if (WARN_ON_ONCE(!nna)) > > + return false; > > Would it make sense to turn WQ_UNBOUND test in wq_node_nr_active() into a > WARN_ON_ONCE()? And I don't think the return value needs a null check. Yes, that's the right place for it. wq->node_nr_active[] is only makes sense for WQ_UNBOUND, so a NULL return was always a caller bug rather than an answer. I will improve it on v2.