From nobody Thu Oct 2 10:53:50 2025 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E31F33DC6F for ; Wed, 17 Sep 2025 15:39:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758123550; cv=none; b=KpT0CIFOFqjHV78cZUc0YDAovCHnApYFYUhyOWNncJyDX+av3hIRa2zc1s7Y8CxeD1xNKzlICRa/694bTDdy+/62+DzdegOD+ffmAFOsfDEQxwaT0xQyyHyVxUr272TNXejtMlZlYL6YWkDfTvT5fdq992BZClDWogf/F5SJwec= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758123550; c=relaxed/simple; bh=14dVJh5LLNSsQMouLJW1+odXPDO7vGIGVZX71yzalWk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=meOe8Wy1s0z+tlQ+Tw32QY6iNIHYzF3W/q7P9/Mtn6F8xIy4NRc7DfR8cm2gwJBEbv7hOLvVuYti61LY1V62HLLM0ohw5srToDusJcvVfZ/prSdT3fU0yhxbWUK26H3eHMvV0l14Lfpwms5ftdtc8y7/aW3kjkpAwehIQ+QBI6o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=DP25JFl0; arc=none smtp.client-ip=209.85.221.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="DP25JFl0" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-3e9ca387425so3018693f8f.0 for ; Wed, 17 Sep 2025 08:39:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1758123546; x=1758728346; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UQMKJhlNsyXsN8hraKIynod7eK47kKIO6zJUMqoMyYI=; b=DP25JFl0GhaujR0ef+QtDtj+AJw8+Lk+PtA4NmIkvMxRsb8Yue60XPCpZIndaWxa9U mBF3mCXcS+rJJ43BIZtPGBxC+Of/RwL/oaZhcVvL0xXxNMk+81sI59vbgpdklRF4EOof P2Bs5M/7mQyb+J/U4jSgqNx+yWuL5mqKgmgZc++ksKsV5GOSpw+jIzgtzlhORlYSXS6b eHFZMFCFeFSjJfoliz0f4qoZFxRyo2bMcsziV60RcXWjmH2Z8L72IBCLVOVWiaE1bV9L Oa2+VitzT7cpGustpDCKVRtW46CsugVxW/MWn8BDm8EPI/dXFUMzHaFgOAbN+RYxS0N2 xizQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758123546; x=1758728346; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UQMKJhlNsyXsN8hraKIynod7eK47kKIO6zJUMqoMyYI=; b=IgtHjP0zP2GfdcInSAIDZs4f/UIVu69PCxtS/s8jgXgWWCzROTabe2rxieH4/xa075 GQiFephTxV9n7nhJASSQGQhm94SST/m1YJh3s6BF/DYQHakW6eKm48lqt+hpvAWz8WyF f11eF3fMzEY+A5JrrlQg1kFXfzQ8Te6dBeJatofupfqciktD/TUDqSOTe1xBzy88AIwc 7Y5fwBFrZot/ofRlb9jGSgINYE+y1su0LD+k+c8AaaYJD66Fc3aTMihl/9ygnlrsPBEV P7j8i1xQ60P2CST/lRsK56HG4yRybW1PQVnklRHYLi+6ZBhZUDiqRj6gffFC9zVm2v9T x2pQ== X-Gm-Message-State: AOJu0YwkRmfoJW98D2ePgaI08qemC9kzEv/fI9YenBEiDmgeGMvNA+fE 1/uGbIsw8ny7fxvT20zUVI1iNHm3JQ7Atrod1dl850ogbfWQNFhIy7J2SFuf4WZCSaQTeZIfVAF yuPO2eg0= X-Gm-Gg: ASbGncsyx/4uhNe2DqJ6qhiRj/gAHjsqgm8M9yKUScHjnXXNp4CS2MoWUOgywyk/bqZ xfZRxll7XRcLVR0whUvC+0bGO1APRacf6666AbQCRdYQ/QIFpEoZzW3dFrKJjDx8NljFS7jvoI+ UL6EusAZ9F8JkAK+pzdyWNiCZ7m8Bm9wbDlk+olOxsvZDBqWyc16XazwDVzxNLUGpTAxkvMqZhr H0MSKTZsRVP0GhI04OWoJShwMElgkkjwrZYPBpFwVkUj08l9Wa0PDjLr970SDvnrRBON0ai280F Q41ssgoklxeGwADsh5lOP19+XNRc9q/8EMAzYYPVSW+zluhyPIoc7P1nZEnc8WgAbEHCuatTalb AbdJ49rx1utIwMdmJ9ufuXeBVigXLCUpVvoSdWeljwE7Yzvg= X-Google-Smtp-Source: AGHT+IExlJvr1s8wpdqGiMxNMltp++fzMVipn3Ukanng0vmVWhtAsTfmNFFfXT3S2vlwQa79qdLk8w== X-Received: by 2002:a05:6000:400c:b0:3e3:4863:5dfa with SMTP id ffacd0b85a97d-3ecdf9aeeddmr2127444f8f.1.1758123546212; Wed, 17 Sep 2025 08:39:06 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3e774a3fb5bsm23208319f8f.58.2025.09.17.08.39.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Sep 2025 08:39:05 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Alexander Gordeev , Vasily Gorbik , Heiko Carstens Subject: [PATCH v2 1/3] drivers/s390: WQ_PERCPU added to alloc_workqueue users Date: Wed, 17 Sep 2025 17:38:57 +0200 Message-ID: <20250917153859.363593-2-marco.crivellari@suse.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250917153859.363593-1-marco.crivellari@suse.com> References: <20250917153859.363593-1-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="utf-8" Content-Transfer-Encoding: quoted-printable Currently if a user enqueue a work item using schedule_delayed_work() the used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use WORK_CPU_UNBOUND (used when a cpu is not specified). The same applies to schedule_work() that is using system_wq and queue_work(), that makes use again of WORK_CPU_UNBOUND. This lack of consistentcy cannot be addressed without refactoring the API. alloc_workqueue() treats all queues as per-CPU by default, while unbound workqueues must opt-in via WQ_UNBOUND. This default is suboptimal: most workloads benefit from unbound queues, allowing the scheduler to place worker threads where they=E2=80=99re needed= and reducing noise when CPUs are isolated. This patch adds a new WQ_PERCPU flag to explicitly request the use of the per-CPU behavior. Both flags coexist for one release cycle to allow callers to transition their calls. Once migration is complete, WQ_UNBOUND can be removed and unbound will become the implicit default. With the introduction of the WQ_PERCPU flag (equivalent to !WQ_UNBOUND), any alloc_workqueue() caller that doesn=E2=80=99t explicitly specify WQ_UNB= OUND must now use WQ_PERCPU. All existing users have been updated accordingly. Suggested-by: Tejun Heo Signed-off-by: Marco Crivellari Acked-by: Alexander Gordeev --- drivers/s390/char/tape_3590.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s390/char/tape_3590.c b/drivers/s390/char/tape_3590.c index a1bafaf73f87..2a2931d303cb 100644 --- a/drivers/s390/char/tape_3590.c +++ b/drivers/s390/char/tape_3590.c @@ -1671,7 +1671,7 @@ tape_3590_init(void) =20 DBF_EVENT(3, "3590 init\n"); =20 - tape_3590_wq =3D alloc_workqueue("tape_3590", 0, 0); + tape_3590_wq =3D alloc_workqueue("tape_3590", WQ_PERCPU, 0); if (!tape_3590_wq) return -ENOMEM; =20 --=20 2.51.0 From nobody Thu Oct 2 10:53:50 2025 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4949B33DC9F for ; Wed, 17 Sep 2025 15:39:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758123551; cv=none; b=cEOPDLYVCbq4e8BPFCTwgRpUpYtMd7shpqrcHfM7bZQeI13wyGli80U1ASY7JJAvaMIspeg6Wx1qAwa1eGGvjTzgeGWB30zxdUr2b73h+Ka53Qj3GqRQkULYBVUi5HBq0RH4bmbnsnEql6TvUoIcx54Tgjwza1UE7xUSbEdZpLA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758123551; c=relaxed/simple; bh=PFpgUHub9Fmrzg3KWGWHTh2JxvycLlcMGTk6OArN/BM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lvgIWSkYbQdhqbVRKvubJ295JnPoY0YhpTkeNQ/cJStIy1xd2fgQWk3gDljmc7laaII6zd8etPEkCkkLrc651QNCy+5p4TxA4Zas13cTvWm6XnFkihmmcVfVH4fP54rNfkCWJ2ivK0unA5TwZ0R4YeRwlRa6XdbQgZ/VlCJ86B0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=FMWpqQNR; arc=none smtp.client-ip=209.85.221.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="FMWpqQNR" Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-3e7636aa65fso6273827f8f.1 for ; Wed, 17 Sep 2025 08:39:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1758123547; x=1758728347; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ugO1a/jnTXgfFN8ZtCaUDxIdkHkZGhM95Bkr0uu7zSk=; b=FMWpqQNRw1flZ8OPXoYkB4mcVE60DDpesxCaq8U7p1UszGFufAuXoDiuXgtVs1EncV 37o2Q6b3k6s/rulDZX9SIodBuDWPr+n7Hkyi6SZfhMCP6nVYf1Z8jEoGkpQ/LX5Fydbc DHKMr0FzqVqDVdSnMlRSHhhZuLCYxhyHPEsr25cfX78yKZe0s12oDo5TgKwUXOzcizx4 oJAP3BWHa0vc4aQ8tXPeUJC9I5lRBimFC36a7+EOs68SKVBvnsfgyMoKY8yQEv2dG0tU pVlNQTkiDs17U3pwJkQX4olokxnWiicg4LR30Xc196S8KBfO08v657Pu0Mr3z+8Hhlwo wxfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758123547; x=1758728347; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ugO1a/jnTXgfFN8ZtCaUDxIdkHkZGhM95Bkr0uu7zSk=; b=Dflxv0DnNV0NKZxDEjySZHqEeMulq1gsgR613UCKsL7+L3+WKz3znoHwmOzwfhvMZI d7iFTyuadyQFrCSQbeahmBVlH5KjDIRNHHDKOrNfSZ4GRqnpfrUjOHMCLymDc0hRZAQx NvESxFvdq5fdoKYiXZw54Yvcd1mJ5JjPkK+6rSijba52NOuoq9GKx7QT6tn2etC4Go0E jXsOuVl0Zul71qvQtzeKBPEtmxD4wl4bp1GxeDF8ajVhuNxgditz4u2fsfOE8kFaEmB+ KUgXcCkNJfNE143+N36N0lu7+2L5oqHm4mDVQ5UFVHZPd8YSQGEM4pdY/XgClXYazxd5 unnQ== X-Gm-Message-State: AOJu0YxUP3s1orAUYmb36YmvU/H6QRFpfzBUENgEvZ0hz9seZMlD3AYG VH5IyPH8mZfWovrKf2asxbKks5CZX0igQo8ipOdjSwFgsS8MkEvsMjSctqC7Gu+RhRLZCVt7Qhq +ZDv85GU= X-Gm-Gg: ASbGncv790udTq38vP2A7l39UZcmoIO1zslnX8ghaWf+x6dTY1TNGMYaJude5k9NNss qytRgK0aomJ3Ro7FGRJ4sk4gYAS2kCTeMDrWnpxrCtfiPsg6+rcF4zF8eaFBhN+oFHZ2GNIsikG EXw4WEkXbrl+zZ1cPa3x4bIlscx7rpnk65HLlEARIsY62Bheb49mdUkb1kMxYVxHGt/KwgD79Pe dCblJfbSpf/KleqX05FOLxP0z5FirJUpMpb1vno+H1wdBlinK5kKZr+7kgsOheqj7bt022T1+3W g04hoTtBbRLCmUWN3NVDD5KnqGL9zX+6Pr4037H6pTskjotY5VRk/t+9XcnE0wynkR4TdnRYANu JuxQdAPV4ofxZnkgLebABj9aFTC7GWxugRNICjAjl+5knrIs= X-Google-Smtp-Source: AGHT+IHD0ub/VA5RULYt1DM+OOxESsrSpInjb6TmYIn+FbY5msblQCDfU0OY3if9oubO64NJi4LszA== X-Received: by 2002:a05:6000:40c8:b0:3d2:9cbf:5b73 with SMTP id ffacd0b85a97d-3ecdf9b5961mr2081818f8f.6.1758123547162; Wed, 17 Sep 2025 08:39:07 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3e774a3fb5bsm23208319f8f.58.2025.09.17.08.39.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Sep 2025 08:39:06 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Alexander Gordeev , Vasily Gorbik , Heiko Carstens Subject: [PATCH v2 2/3] s390/diag324: replace use of system_wq with system_percpu_wq Date: Wed, 17 Sep 2025 17:38:58 +0200 Message-ID: <20250917153859.363593-3-marco.crivellari@suse.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250917153859.363593-1-marco.crivellari@suse.com> References: <20250917153859.363593-1-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-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Currently if a user enqueue a work item using schedule_delayed_work() the used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use WORK_CPU_UNBOUND (used when a cpu is not specified). The same applies to schedule_work() that is using system_wq and queue_work(), that makes use again of WORK_CPU_UNBOUND. This lack of consistentcy cannot be addressed without refactoring the API. system_wq is a per-CPU worqueue, yet nothing in its name tells about that CPU affinity constraint, which is very often not required by users. Make it clear by renaming system_wq to system_percpu_wq. queue_work() / queue_delayed_work() mod_delayed_work() will now use the new per-cpu wq. The old wq will be kept for a few release cylces. Suggested-by: Tejun Heo Signed-off-by: Marco Crivellari --- arch/s390/kernel/diag/diag324.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/s390/kernel/diag/diag324.c b/arch/s390/kernel/diag/diag32= 4.c index 7fa4c0b7eb6c..f0a8b4841fb9 100644 --- a/arch/s390/kernel/diag/diag324.c +++ b/arch/s390/kernel/diag/diag324.c @@ -116,7 +116,7 @@ static void pibwork_handler(struct work_struct *work) mutex_lock(&pibmutex); timedout =3D ktime_add_ns(data->expire, PIBWORK_DELAY); if (ktime_before(ktime_get(), timedout)) { - mod_delayed_work(system_wq, &pibwork, nsecs_to_jiffies(PIBWORK_DELAY)); + mod_delayed_work(system_percpu_wq, &pibwork, nsecs_to_jiffies(PIBWORK_DE= LAY)); goto out; } vfree(data->pib); @@ -174,7 +174,7 @@ long diag324_pibbuf(unsigned long arg) pib_update(data); data->sequence++; data->expire =3D ktime_add_ns(ktime_get(), tod_to_ns(data->pib->intv)); - mod_delayed_work(system_wq, &pibwork, nsecs_to_jiffies(PIBWORK_DELAY)); + mod_delayed_work(system_percpu_wq, &pibwork, nsecs_to_jiffies(PIBWORK_DE= LAY)); first =3D false; } rc =3D data->rc; --=20 2.51.0 From nobody Thu Oct 2 10:53:50 2025 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0266B33EE1D for ; Wed, 17 Sep 2025 15:39:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758123552; cv=none; b=pz35eb0TeUK9/XvkylQIPbblg9HBiqkLB03WzjJPj9PCrIW6puRwfvUAffCYt8vDdBcN2Bp21zRIFoXrS1uC9xjaz1cFoZCxgw/IqdcSZCojEsCdbdGWPkuXBOuGyqCq7cwsfhNA9z1aOEMTy8lxtX5lISKbtYZCHm5SXggyv9E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758123552; c=relaxed/simple; bh=UKI0GMrIrFld4692U92NbL9P6hnzaYrAgSVS+6kT4NM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ChgryWOpveC1BcYU9EiMp4Rl3RhBw0XzJSRNgvqSBH645oEAWBk6KuHRwZ4ibzDRBuKJeBYjVgRjFGzA0OBUyxvvsVdoLeCECE4JVWg4EEBJEOxDqN1boRes0trdYWLE4qum5iGYshc99cNehPppr901NwSNzOFXWZ6DKpAtcvE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=bBEXHGcw; arc=none smtp.client-ip=209.85.221.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="bBEXHGcw" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-3ec4d6ba12eso1577449f8f.1 for ; Wed, 17 Sep 2025 08:39:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1758123548; x=1758728348; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wVZVmy10Hzps3+n7t5S3fBRU0IFzjHVdjlxkyI552mE=; b=bBEXHGcwmargVZqO4A5K8KgcV/LT1vvWQaH63VnLJm/8INegfwQkLs0XHm4yQxTr3Y SJMrMQFpLGbM1tXqlrn7CANE+3o3ajxn2o+P48MeBByTNLv+M69TDVnymbDY53QgatHr evYYEFmLrQ/+CUB1H5QFND97qT0GW3joGtegHYgBoONT1Z47bFYldzvDG28buJYW+9Gn 3af2zje7THCSallZcDtNwOsgJYUi4BcTjJu+HeJpAqS38XiR86Hvr6KYeci8Yf0Q1B8R YCC6XXl3tqQuwcp3mvexWmpqsVGU5Sn0UfFoHDOtGVQf7NyLWEPTtt7rrPqmCUpMvS2/ iYzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1758123548; x=1758728348; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wVZVmy10Hzps3+n7t5S3fBRU0IFzjHVdjlxkyI552mE=; b=GA2TykdmA06GtTui394ICYVPpfGm8axFPZTAZpwqpWoK2ak37oVjpskOE02eFX/Fe2 LbPhHZT6imXF2uAd7oZ5wpVKUly/ep4KWdMXFeTL3kMRKXqWzehSZNKA0FmUBpOW/fYe QjhCNUo210C5f2xgaDY5Msh74w4usIT/fFGEe0R7d9YdlLDFZ7nBx6kHsd2UVfLJuaqZ v0WOtT2JSSJPT24cWLeDKMvAA7S04eSQ5YDvraU49cp8hQVIa02p7+0Mo9s0AzSLQ1kT lWAeXBTHbkNkG/iy/zR87kJcYdUqUkWIo8xXjp/6CMG9vfsAJmffe10TIxrwzq+AyYEh 0sdg== X-Gm-Message-State: AOJu0YzbjB+drKRl+H04i1UU0WN+Dtjw2kSb0dac1wdkKcRvUBjitfSS CVQWSViIv0tZA/8ZjgYtrNOmS8DJPUALE3OEmILm6+6NuEZ0m2ewZnT6iT4C0kGYmHvBYkpDett To/ukQIs= X-Gm-Gg: ASbGncvy0+enmQunPjudUk5d/Ufpm+CoTkvG3A2v0VrHrtI2Q+PBnP3QumMm9NJOqjk fxTU3DLwFnNDvLi2nAe7+pohEGS3K3UtbSzQogY99viJ2dSXcX2sulnlF9Z089dRPEWkUlO62NM rT/RJJj2JaOdH07hBUrZc/Jqg38S2WMgcbXcdiWYo41phtPnph+DQKQImhOmPr+hzeKmZP6OLXM pse/AVdbGk6opUcUhoKoO/GHeZ8/4IiqMtWX3kLktFME7/DHwkVOKoGMrKiYZ5mCyQOfz2coLCP nXT70sZo6pVDUN1MeFLITgYqr8yCz12rPgvI2JNV5gUgNJ+IwsHKOPtQiTkwjOtAc9Ey4FaThYI vnnr7SyRk669FMN7WK0xKAwCv1Xgmcm8MGuY5zKlva60Vrt0= X-Google-Smtp-Source: AGHT+IFZkFyB8wLD1suxu+q9rNVi45peL0SKj0VLllUK4PJZNrtdqFLmgjE0enuXhQVI0UYmVz1X+g== X-Received: by 2002:a05:6000:18a7:b0:3e7:ff32:1ab with SMTP id ffacd0b85a97d-3ecdfa4d27amr2496111f8f.50.1758123548077; Wed, 17 Sep 2025 08:39:08 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3e774a3fb5bsm23208319f8f.58.2025.09.17.08.39.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Sep 2025 08:39:07 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Alexander Gordeev , Vasily Gorbik , Heiko Carstens Subject: [PATCH v2 3/3] s390: replace use of system_wq with system_dfl_wq Date: Wed, 17 Sep 2025 17:38:59 +0200 Message-ID: <20250917153859.363593-4-marco.crivellari@suse.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250917153859.363593-1-marco.crivellari@suse.com> References: <20250917153859.363593-1-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-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Currently if a user enqueue a work item using schedule_delayed_work() the used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use WORK_CPU_UNBOUND (used when a cpu is not specified). The same applies to schedule_work() that is using system_wq and queue_work(), that makes use again of WORK_CPU_UNBOUND. This lack of consistentcy cannot be addressed without refactoring the API. system_wq is a per-CPU worqueue (replaced by system_percpu_wq), but the current code does not benefit from it. Because of that, system_wq has been replaced by system_dfl_wq, the new unbound workqueue. The old wq will be kept for a few release cylces. Suggested-by: Tejun Heo Signed-off-by: Marco Crivellari Reviewed-by: Mete Durlu --- arch/s390/kernel/hiperdispatch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/kernel/hiperdispatch.c b/arch/s390/kernel/hiperdispa= tch.c index e7b66d046e8d..2507bc3f7757 100644 --- a/arch/s390/kernel/hiperdispatch.c +++ b/arch/s390/kernel/hiperdispatch.c @@ -191,7 +191,7 @@ int hd_enable_hiperdispatch(void) return 0; if (hd_online_cores <=3D hd_entitled_cores) return 0; - mod_delayed_work(system_wq, &hd_capacity_work, HD_DELAY_INTERVAL * hd_del= ay_factor); + mod_delayed_work(system_dfl_wq, &hd_capacity_work, HD_DELAY_INTERVAL * hd= _delay_factor); hd_update_capacities(); return 1; } --=20 2.51.0