From nobody Wed Apr 1 08:15:38 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 CDB7338E121 for ; Tue, 31 Mar 2026 18:36:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774982165; cv=none; b=EDgrGWMiFcu6Qmy7N/XlkjSKoZlkLoLYUfJU1LhFax0XgaRRwA/cJT4nZngf5jm0h2joCzabnWeTH7+6m0lDH5qEwPMHGx1S0S200Fx2Fzvrzmk/C71lxI/yWkR1pqr8pT44he/hVpUxNANmAf+s32YvQ7el/lTXPgqdgJT5kNU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774982165; c=relaxed/simple; bh=k2gzsOwXehT86om633NWIdnIU85tdeu1eIAmNgs5Vcw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=gI3RfXHrXroNFyATIe8kqPaIG0LeMVhuY09jfnxRd7zSPp6poma2g4dOX8o7CssvNuwR6LVKnFW7prS5uWdQW6b+V6mjIYRzNFmuJ8E4gLNc46im2f2dWBL/WEgM7dWJix4AhT9NwWtLWnnorlmBV5Yw5it4h+97WvtDRhQ6RUM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=NyLiNHs5; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NyLiNHs5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1774982162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WMAzgRdcyCvhWw0XRDi+kaFc4RxK9YFIrM1CEM11WqU=; b=NyLiNHs5OYVVj1GjiRz3QHN+tzrZbnEwhWNEkW8aVIIXwTa5JtEJBpWcuD0u2yL2nduXMC dKT+mpYKqVaDcaBI12XtPwXc/R+K9BiJ0YsHvzT8OQa8PkqaV2V6lgvlFsUegcYCUsntfB RYFP6HO6+FyMWOqb0ouY0BEbJUW0auA= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-103-qIJGQWtcPVSGipG-Z6NQig-1; Tue, 31 Mar 2026 14:35:59 -0400 X-MC-Unique: qIJGQWtcPVSGipG-Z6NQig-1 X-Mimecast-MFC-AGG-ID: qIJGQWtcPVSGipG-Z6NQig_1774982158 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id EC2B41956046; Tue, 31 Mar 2026 18:35:57 +0000 (UTC) Received: from llong-thinkpadp16vgen1.westford.csb (unknown [10.22.80.26]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B85E830001A2; Tue, 31 Mar 2026 18:35:56 +0000 (UTC) From: Waiman Long To: Tejun Heo , Lai Jiangshan Cc: linux-kernel@vger.kernel.org, Frederic Weisbecker , Waiman Long Subject: [PATCH] workqueue: Remove HK_TYPE_WQ from affecting wq_unbound_cpumask Date: Tue, 31 Mar 2026 14:35:22 -0400 Message-ID: <20260331183531.2791465-1-longman@redhat.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 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 For historical reason, wq_unbound_cpumask is initially set as intersection of HK_TYPE_DOMAIN, HK_TYPE_WQ and workqueue.unbound_cpus boot command line option. At run time, users can update the unbound cpumask via the /sys/devices/virtual/workqueue/cpumask sysfs file. Creation and modification of cpuset isolated partitions will also update wq_unbound_cpumask based on the latest HK_TYPE_DOMAIN cpumask. The HK_TYPE_WQ cpumask is out of the picture with these runtime updates. Complete the transition by taking HK_TYPE_WQ out from the workqueue code and make it depends on HK_TYPE_DOMAIN only from the housekeeping side. The final goal is to eliminate HK_TYPE_WQ as a housekeeping cpumask type. Signed-off-by: Waiman Long Acked-by: Frederic Weisbecker --- kernel/workqueue.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index e5f69377f0cc..aa8e82439c9f 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -7084,7 +7084,7 @@ int workqueue_unbound_housekeeping_update(const struc= t cpumask *hk) /* * If the operation fails, it will fall back to * wq_requested_unbound_cpumask which is initially set to - * (HK_TYPE_WQ =E2=88=A9 HK_TYPE_DOMAIN) house keeping mask and rewritten + * HK_TYPE_DOMAIN house keeping mask and rewritten * by any subsequent write to workqueue/cpumask sysfs file. */ if (!cpumask_and(cpumask, wq_requested_unbound_cpumask, hk)) @@ -7921,7 +7921,6 @@ void __init workqueue_init_early(void) =20 cpumask_copy(wq_online_cpumask, cpu_online_mask); cpumask_copy(wq_unbound_cpumask, cpu_possible_mask); - restrict_unbound_cpumask("HK_TYPE_WQ", housekeeping_cpumask(HK_TYPE_WQ)); restrict_unbound_cpumask("HK_TYPE_DOMAIN", housekeeping_cpumask(HK_TYPE_D= OMAIN)); if (!cpumask_empty(&wq_cmdline_cpumask)) restrict_unbound_cpumask("workqueue.unbound_cpus", &wq_cmdline_cpumask); --=20 2.53.0