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 C88AD3D3008 for ; Wed, 27 May 2026 18:32:32 +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=1779906754; cv=none; b=f/j/XeZjZSNeumfAlP2t5rLNdtbfYR0mVzMkDGYOjVdt54dtgtQItqAto0RhXJlOy/5+ox6qpIhT94guQLHJNWCRE995w+pT0TIG9rQdedZXWE5JXvk8/Z2/TlLe7YqGjK2I2V4L2ER4Nft857JYYJI9ZLzw8pO/hcLzf/iXpcI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779906754; c=relaxed/simple; bh=CpLCuuUoxvWwJF102Q/ahKZRA8RGufkpxPrJvM0TebE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Lyd0g0NIg3IRY4IaM5rdeirGHbf9g2hn3OpB5XHSmjFFT3NnQUQ62oGRIj3TemQpOQWJJVM5n3otYsMbyGpM8z0BQ3yLMEK37Ep288GrOg0+RioFg3z4OvOP8Yo+tpOa33T0u/L72f4mPMKryoSZkOk14HLduUETnZoE6aEhO6E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Y/uO6hF3; 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="Y/uO6hF3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 39D581F000E9; Wed, 27 May 2026 18:32:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779906752; bh=aCZzZMsmvdbtqcHToJqW3v17mKHIxlYRTAEfwVZCgDc=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=Y/uO6hF30oRkkQHX2CLGkhXiKNsTgyTkJ2jsQtw63ukegZ8L7FjVz7fnLt17qkIAe r6ajvYIIzG7fFNWErtQOTZgcDg39FGo2hFkGHn8zZeq5VzzxGPOpK3Y4fkLnyfrTLt tV5v7rEb/UK8Tkqmq4Fvgz5OuMnh8LBVgSPrMLqUvEjjX81OZYFsO0XbahRIhcPzGk DN1zbH/qLyAmbTnwBxp0wVUPOmE6IZjLDDMo62nfcw4yp0dwBUn1GJiBz3LL+Y7wQy NreSDyWRN6O3eAAYkFCsHjRTPZFwpzv4bnGrCJkxQLg3Y+5Q1cenEttldjutcKIJT7 oxIgh/vnU86ag== Date: Wed, 27 May 2026 08:32:31 -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: [RFC PATCH v2 1/2] workqueue: Add warnings and fallback if system_{unbound}_wq is used Message-ID: References: <20260526150041.365392-1-marco.crivellari@suse.com> <20260526150041.365392-2-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: <20260526150041.365392-2-marco.crivellari@suse.com> Hello, On Tue, May 26, 2026 at 05:00:40PM +0200, Marco Crivellari wrote: > Currently many users transitioned already to the new introduced workqueue > (system_percpu_wq, system_dfl_wq), but there are new users who still use the > older system_wq and system_unbound_wq. > > This change try to push this transition forward, by warning whether the old > workqueus are used and redirecting them old used workqueue with the appropriate > new one. > > Link: https://lore.kernel.org/all/20250221112003.1dSuoGyc@linutronix.de/ > Suggested-by: Tejun Heo > Signed-off-by: Marco Crivellari > --- > kernel/workqueue.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 72 insertions(+) > > diff --git a/kernel/workqueue.c b/kernel/workqueue.c > index 33b721a9af02..e17617e205b1 100644 > --- a/kernel/workqueue.c > +++ b/kernel/workqueue.c > @@ -2437,6 +2437,24 @@ bool queue_work_on(int cpu, struct workqueue_struct *wq, > bool ret = false; > unsigned long irq_flags; > > + /* > + * NOTE: These checks are here to assure that no users will still > + * rely on system_wq and system_unbound_wq. > + * They can be removed along with those workqueue when the > + * time comes. > + */ > + if (unlikely(wq == system_wq)) { Can you add an internal flag to mark the workqueues and use a helper so that the warning messages aren't replicated in multiple places? Also, do we need to have the warning on delayed_queue? Just put it in a single spot where they'll all converge. Thanks. -- tejun