From nobody Fri Apr 17 06:14:51 2026 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 0E18134E777 for ; Mon, 23 Feb 2026 09:29:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771838969; cv=none; b=WsgpDG/uC/K5JoE73WbD0hCKSc5p7o4P7vGNuTFaz0yzFXwDbyPdg/tGA5l+wubNI7HKVhl808YjD8JKJF9/3QDvXeybq2O1HViDowpUq7e3N05SmEEp8emJVGpe8DD6RZwSv3dG9AVvXC0AZkecoBL+jfRcEfTszSRfY9nLIgA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771838969; c=relaxed/simple; bh=wGhAre6tsbecJqMVeeZ/Vaki9f+lKvl0WfvlI3T5mgM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ATuRAq5/4AXQTUAdBmzLBI5vRmMKpZDWK9/hVd7r0ZcJ3XxwZnqa9wQoO909GoWYfC7cF/H8p19Os2cgCXu/x6ROZwmhVzZW5gWMp76ztomPNLA8FJqyEyI5a1bttlaXvESwKBlbC/R0h68EsvkwhpYjRdW9Mir+K3xnxkO5vXo= 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=eZ/7ya01; arc=none smtp.client-ip=209.85.128.49 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="eZ/7ya01" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-483abed83b6so10062515e9.0 for ; Mon, 23 Feb 2026 01:29:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1771838966; x=1772443766; 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=mSlGJy+05DyvHUGHimnvjd6YFbWTOnCT6hm9QrFUUZk=; b=eZ/7ya012B5rYVw3onqOs/1sx/Y4DIBmFV2YoTvnU2z7Iq0GcxP1GqHHfLClyUGHxD Yjs8hrjV410FNzzd8eTFcK7Cv8WoBWgCgmRNxRKIvllQAoOAJIujhu/0j8uV7QZM0dhb BkqBgmkIcHMiUJEFH8b5U7gfPrgyNmSJFItclQ0Ju9utnb5ces+zmrhqgnYpF4B4c6ul VfnmUxdOdJOpPePfPXWtK1VuSBljxS2GvEC1xBwKm6WP9OLG/K00qROzfZF2mZiACrsb 90q3LFGV2v5QIzODfWHNV72WCSxtmjJesjCieiiTRoaL2iNNTvhOe9E0JPMD/+2dKper ob1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771838966; x=1772443766; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=mSlGJy+05DyvHUGHimnvjd6YFbWTOnCT6hm9QrFUUZk=; b=UDwHuKzP//o2P7+Z+FhIcsvy42cyEIySMUIGa9/vr6aL1qSQV2v5S/kGQgsLA4qeoZ 6TmEC7wEzUNfZ8a8bwibj2K8KUy0K6AgV55Xkti/SCgBlB40irLFpDb+dO+9aPP8dPPC kD4tQckD8sZAybmiCszW9G7TD3ZtdHSQSeptUisHSOQGkYbc2bonDKw4up10lMJVY5qH 5nJlw7UzJE1o8Lv7R1gdxLznWu4uMn/emftbdPbXropP2X+2fKNAH2rdC5ID+PrB0Nqq ljnEwHkxU/U7fT5RGKKjAH9t26FjuWkH+cVgODJTvCR5jMS0LKxYnaWljqHVF4z5CG0s ttOQ== X-Gm-Message-State: AOJu0YyYUs/GyMjBpALfkf8Ih5UweLZnLvq+84tZNFeh3FdgtqghilM+ rrJqd/cZL6epzYxVMAxGEMk7EWves+tY4YfXvxIwF9gAbv8AMEPlmpAsdHB9lQS4Duz0y7fXYFv 6gyrT X-Gm-Gg: AZuq6aLpMg9YBRkcCRv0xneXKt1fYbv+iwxCJy/w10/1h+TQqFyzR/N4BMCeBm3bGme swAMpiTVWDIZ8RIN7BCbSLW7pHECLScqa40+xrgRL9aKQmRY59BdC9e+m79dWpqN/woICr4IESO jdrL/dkFJGgXdGokngF+HiwRTK9lWv4cViSG3pEgIuxrQb8nXm8W1Ft8Yuckyab1EJwRuzSWZc6 dQ6sKXt5HycqGQ2S79p8iGOc0ekb9xPrOSdQMU06oFhej07lUVY3mFvxuGo1WrFYSE7L4XmOZVV UJai4wZh9FKnMDhYVebeky/2AJDnLcqXGy8urJXVDq+j4hCdPJmGK91i9FT/xkLJU7A4N+VDq7E MlC9XF2pZLp6n2NqS7sANelGSgc09cL54AK0DdtXz1/NmnBPj/N4XqmT8tNCvuSqyOCultUIK2K RU7hHboJdW8T9BiH6lvARK2Z7ZIEBIyxNojLQGtzCHiLWn X-Received: by 2002:a05:600c:3b17:b0:46e:32dd:1b1a with SMTP id 5b1f17b1804b1-483a95b15b6mr139541885e9.7.1771838966132; Mon, 23 Feb 2026 01:29:26 -0800 (PST) Received: from linux.fritz.box.box ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-483a31f0370sm440197135e9.11.2026.02.23.01.29.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Feb 2026 01:29:25 -0800 (PST) From: Marco Crivellari To: linux-kernel@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Jens Axboe Subject: [PATCH v2 1/2] block: Add WQ_PERCPU to alloc_workqueue users Date: Mon, 23 Feb 2026 10:29:19 +0100 Message-ID: <20260223092920.60424-2-marco.crivellari@suse.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260223092920.60424-1-marco.crivellari@suse.com> References: <20260223092920.60424-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 This continues the effort to refactor workqueue APIs, which began with the introduction of new workqueues and a new alloc_workqueue flag in: commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq") commit 930c2ea566af ("workqueue: Add new WQ_PERCPU flag") The refactoring is going to alter the default behavior of alloc_workqueue() to be unbound by 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. For more details see the Link tag below. In order to keep alloc_workqueue() behavior identical, explicitly request WQ_PERCPU. Link: https://lore.kernel.org/all/20250221112003.1dSuoGyc@linutronix.de/ Suggested-by: Tejun Heo Signed-off-by: Marco Crivellari --- block/bio-integrity-auto.c | 2 +- block/bio.c | 2 +- block/blk-core.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/block/bio-integrity-auto.c b/block/bio-integrity-auto.c index 44dcdf7520c5..a2bccb3c4baa 100644 --- a/block/bio-integrity-auto.c +++ b/block/bio-integrity-auto.c @@ -183,7 +183,7 @@ static int __init blk_integrity_auto_init(void) * Make it highpri CPU intensive wq with max concurrency of 1. */ kintegrityd_wq =3D alloc_workqueue("kintegrityd", WQ_MEM_RECLAIM | - WQ_HIGHPRI | WQ_CPU_INTENSIVE, 1); + WQ_HIGHPRI | WQ_CPU_INTENSIVE | WQ_PERCPU, 1); if (!kintegrityd_wq) panic("Failed to create kintegrityd\n"); return 0; diff --git a/block/bio.c b/block/bio.c index d80d5d26804e..fd8073fbffb2 100644 --- a/block/bio.c +++ b/block/bio.c @@ -1956,7 +1956,7 @@ int bioset_init(struct bio_set *bs, =20 if (flags & BIOSET_NEED_RESCUER) { bs->rescue_workqueue =3D alloc_workqueue("bioset", - WQ_MEM_RECLAIM, 0); + WQ_MEM_RECLAIM | WQ_PERCPU, 0); if (!bs->rescue_workqueue) goto bad; } diff --git a/block/blk-core.c b/block/blk-core.c index 474700ffaa1c..17450058ea6d 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1282,7 +1282,7 @@ int __init blk_dev_init(void) =20 /* used for unplugging and affects IO latency/throughput - HIGHPRI */ kblockd_workqueue =3D alloc_workqueue("kblockd", - WQ_MEM_RECLAIM | WQ_HIGHPRI, 0); + WQ_MEM_RECLAIM | WQ_HIGHPRI | WQ_PERCPU, 0); if (!kblockd_workqueue) panic("Failed to create kblockd\n"); =20 --=20 2.52.0 From nobody Fri Apr 17 06:14:51 2026 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 E63DB137750 for ; Mon, 23 Feb 2026 09:29:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771838970; cv=none; b=AUFG5ytOxk9wE1RcO2mXO6Ths09mGjRgOMM9eG8hJF4zzi2yOoCItuck98OuTT0qxOT5vlLGHcJTQfQZ8K3uHa62SI3SkxseUw82VYtPhSRj/qpLqqpWtf+7yh9bDqFyQc+6DbHH/fM3syWa3Jv16VAMdBAQHqnjkvI/65toxnQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771838970; c=relaxed/simple; bh=0x53VE3n468/ZkLGoYLN4jzL8c12CefOfdcN6waYukk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=roveSXig1PT9R9wWO1V5GSOyQAtykccB7JG2PlCZ19/sf/WTCNdPVaiIrLB81vowaGe7Viwln6vDu1iqRXd38GlQ6bMqDpproxIB0xj54vequRz2m3weDP9oYsDamPLAoJWN14aoniLy3ol+t8QGrBKGPc800KkVYpckh55nt2A= 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=WlNkxOLy; arc=none smtp.client-ip=209.85.128.53 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="WlNkxOLy" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4838c15e3cbso34808575e9.3 for ; Mon, 23 Feb 2026 01:29:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1771838967; x=1772443767; 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=qChLD4pBhJhKZJlnOIVXjltzDeGTKPjqI++HMTLBywg=; b=WlNkxOLyKnoz6JjtUZN3Dnfo0n3rTW5VohMB7eHSLnWV9A+YoWCYNTx/TjowbBoGli cq9M16bZVdcKq9yzHqi5tzSjlM/01FZQrD282c2So+HMGOqOfX5C58FEq/Juknghw98z +jTnCF9aG1R/Avn1wBQ95O4scvg4/8lVCvPPHn3cA+dgYQzqU/TO6H0bG0Y/9Tt/E6I7 Hfc9Fq0lSsiea6zL6oxxmhRwR0PqZC/iR2LoyYkjSH2WqZZlzKa52nVoRyV3dXCSSQ9x 59BzeYcUx5UQCdRhY+bIThT2UkjiLSZ7infpAJGsIG3GNrM6VraGM2ik2rhMeOOHWVWO k6WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771838967; x=1772443767; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=qChLD4pBhJhKZJlnOIVXjltzDeGTKPjqI++HMTLBywg=; b=Bw4iAeoqf5++/481yCWqb0GvZoGBKgfROZ7eEhWeLFWe7L8pKJkdV9BD5+IwWcMjIk pwUeYI8Fy8M0j8wh0occXNsrd5CJSaKUE6GYUDL26FG3ZbZdB2UmVZnt9+xPQGrE1yd/ 9i0F2RuXmAadTIWfc9/E+oaSz+j/RMhWjYDvoyGY7JtRmxdt1zXhJ6DOuNDG1OseN9kR 9eEdmztyJ1OFeILGztNx+Lk0IWBdoj8gkHQ21yxFrSIllw6yw/c1LERLzWhQnyOY2axH 2bok849HcTr5IrCY3IrM7qRsbfu3rkM+nUVu57Y6ydTpiXalsqdv6JiSQKQjghCutF8v xgvg== X-Gm-Message-State: AOJu0Yzd9LsBbnJ7A3959Ad+tF/fcNO1MiDAVsTbaPKSFxCHWVW/KSsF HwLr57uqOk3y5R6UCB23cTHQrBpwtn92S2nbER+oCzzgrQYDy+hY7ZiqHRvv4EkJulPBL7MVVqY T9E+t X-Gm-Gg: AZuq6aKnYx2HEVXDm82M6nYPr+pY+b4zIeADv3EzVJCeF4q1QgZ0W5AvVXuEAUObkEe cVh7JOar8TI/0FTzDaGy7DFg+BNlj5OYzFTIU0u1FeDMc/vXJfiAu+DJDkuoXfnIIZM9ULlxe7G ZKIfls+XdrVd7eOUxAJn26z0HeTPNPVVgCZ49dIf5AYd5CKUBTGvtMgJT/4G3yroUt+zkRzqqz0 teFoRLcyk9pav2DYGdbeuk+quMBSkFMAN+UpoMidiY+Qw3bd1wejAnfBXgnBli3LxBhyrc+Eb2f ByW1PzIBccisRQjQ8lfRRBq8jc3XqahQCRh3krQxo/5fk5tfNxbIZTWEF5FOUPG0FE9RXu9nl8p AHMSCgItFZiZbCv1GTjE8wsAsAf/nv75nvj2SvuSUaNy2ph72g86+15MfutbIntfHls2gOTdOHI EsRPfGkDowtVOHZXBt5Wq+tT7YwqgjVYEPHno4y7Us4LJ3 X-Received: by 2002:a05:600c:a49:b0:483:7631:befa with SMTP id 5b1f17b1804b1-483a95eb5e6mr149259535e9.5.1771838967038; Mon, 23 Feb 2026 01:29:27 -0800 (PST) Received: from linux.fritz.box.box ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-483a31f0370sm440197135e9.11.2026.02.23.01.29.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Feb 2026 01:29:26 -0800 (PST) From: Marco Crivellari To: linux-kernel@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Jens Axboe , Josef Bacik , cgroups@vger.kernel.org Subject: [PATCH v2 2/2] block/blk-throttle: Add WQ_PERCPU to alloc_workqueue users Date: Mon, 23 Feb 2026 10:29:20 +0100 Message-ID: <20260223092920.60424-3-marco.crivellari@suse.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260223092920.60424-1-marco.crivellari@suse.com> References: <20260223092920.60424-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 This continues the effort to refactor workqueue APIs, which began with the introduction of new workqueues and a new alloc_workqueue flag in: commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq") commit 930c2ea566af ("workqueue: Add new WQ_PERCPU flag") The refactoring is going to alter the default behavior of alloc_workqueue() to be unbound by 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. For more details see the Link tag below. In order to keep alloc_workqueue() behavior identical, explicitly request WQ_PERCPU. Cc: Josef Bacik Cc: cgroups@vger.kernel.org Link: https://lore.kernel.org/all/20250221112003.1dSuoGyc@linutronix.de/ Suggested-by: Tejun Heo Signed-off-by: Marco Crivellari --- block/blk-throttle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-throttle.c b/block/blk-throttle.c index 97188a795848..cabf91f0d0dc 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -1839,7 +1839,7 @@ void blk_throtl_exit(struct gendisk *disk) =20 static int __init throtl_init(void) { - kthrotld_workqueue =3D alloc_workqueue("kthrotld", WQ_MEM_RECLAIM, 0); + kthrotld_workqueue =3D alloc_workqueue("kthrotld", WQ_MEM_RECLAIM | WQ_PE= RCPU, 0); if (!kthrotld_workqueue) panic("Failed to create kthrotld\n"); =20 --=20 2.52.0