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 E434B384CFF for ; Thu, 28 May 2026 16:25:24 +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=1779985525; cv=none; b=E/JGeYacTF+tBsBCaIB21o597oT0bGdjMiF/Vr9hbsCYne17n5ptJ+DC2MZJy+8Ig+QGnc9HZncUGjTfbyou2hUINT4KhF9fuVXgxQ+6cECwpYGzOBBbUNiOw4hJGSZKwSW0Zg2BdxwmeprkaZFjFdB1fH3P0qtlgP1/v4mUaao= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779985525; c=relaxed/simple; bh=vtwHyOyGCIoEMPLcIX+bCmerdmqd8X6ZbMlEKRM8iBA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=PcgeYhxUBWSXmDRsIZSE7104IxO+qBsPDLhr9NAcV/vfWWHT1/vRZ5XDsI3k3q6bEVa2J7ETk3eJl8ZRy3bDSO+IcAaj6dsaM1GHJHBYgdMNVhGTiNnzdWVTPkcgga6esPz9TyAopTwwKKMqY5r7819CedFTIUCPmuYd1Qfhgto= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EeLdXASR; 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="EeLdXASR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4EF8F1F000E9; Thu, 28 May 2026 16:25:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779985524; bh=1pY0CzXm1y3v46ioEoz+3XYbo4/apJPXmgN8C1gD0hU=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=EeLdXASRpFXP8JjnYSkWcAC1Wx7LxHOLoDYgpayeJoFTuE8/laxu3cUDwY3mHSxuc n+cDgwEf7qtmUxScvspPD7THj0CLzKdTwCsMu6DW9S9dTXY43ZdxC31JRCGS8DZh0h He5l/7dhDaRX0mfEXPaypEIXpViVOqK0u9V4wUjOpey1qQZrDOh7khxaShA9LjxRYw rc4/daNoIzR30RA2lEyhno+f42ri8TXm2ibwOP0xU7TgyAquB9V4CMBNkaOtvHh0dp 6mZkorwCBN7HtW32cglM4P2R61V11pZ4Vb/5CnqEiVyYwdk4Sk+7hkY9Djrf1vnwTV 98t0s1cysGS1A== Date: Thu, 28 May 2026 06:25:23 -1000 From: Tejun Heo To: Marco Crivellari Cc: linux-kernel@vger.kernel.org, Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Michal Hocko , Breno Leitao Subject: Re: [PATCH v3 2/2] workqueue: Add warnings and ensure one among WQ_PERCPU or WQ_UNBOUND is present Message-ID: References: <20260528160159.471265-1-marco.crivellari@suse.com> <20260528160159.471265-3-marco.crivellari@suse.com> 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: <20260528160159.471265-3-marco.crivellari@suse.com> On Thu, May 28, 2026 at 06:01:59PM +0200, Marco Crivellari wrote: ... > @@ -5850,6 +5850,23 @@ static struct workqueue_struct *__alloc_workqueue(const char *fmt, > pr_warn_once("workqueue: name exceeds WQ_NAME_LEN. Truncating to: %s\n", > wq->name); > > + /* > + * One among WQ_PERCPU and WQ_UNBOUND must be set, but not both. > + * - If neither is set, default to WQ_PERCPU > + * - If both are set, default to WQ_UNBOUND > + * > + * This code can be removed after workqueue are unbound by default > + */ > + if (!(flags & (WQ_UNBOUND | WQ_PERCPU))) { > + pr_warn_ratelimited("workqueue: %s is using neither WQ_PERCPU or WQ_UNBOUND. " > + "Setting WQ_PERCPU.\n", wq->name); > + flags |= WQ_PERCPU; > + } else if((flags & WQ_PERCPU) && (flags & WQ_UNBOUND)) { > + pr_warn_ratelimited("workqueue: %s uses both WQ_PERCPU and WQ_UNBOUND. " > + "Dropped WQ_PERCPU, keeping WQ_UNBOUND.\n", wq->name); > + flags &= (~WQ_PERCPU); > + } Let's just WARN_ONCE() on these. These are outright bugs, right? Thanks. -- tejun