From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (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 B2E2A347FD7 for ; Tue, 18 Nov 2025 10:20:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763461251; cv=none; b=n4N42+g/A7rIlVxn9ZyDcgYRVRCLzqFwhf7CfxqIddEU/H1Fztu3eKvO8B9XA2sSywhSE+JD1YIRTcHXNKJwaT0SURRdt0z4u6LzTO9LHtX02Tuyq6RXIxQIAiewWgOdUDgOb6FXUwR+O6gEDgm/keQ4KJY+WBhOth4TpoJ6bBk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763461251; c=relaxed/simple; bh=VRCU+BJ8/NK/EQuiSKud0ApLPLbkLGrtdrkGSCQa8I4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=OrqPoT7SUaB18KdaZFHnww/2OL1Kyv4zpZFvXLQOu9OQmSs5udLE0ySpHccroLgcO3eKHuwMXplk2Nq0XACdNAHmz/QbBUrJuD3i5p6EoCuJMRZrVsxupln3yHepNCYU8/UnvJ7/6WKZPIX/8vfSSWKnCRRmhIA8Sr1NocHjXMk= 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=THTaiYGP; arc=none smtp.client-ip=209.85.221.41 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="THTaiYGP" Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-42bb288c17bso1725168f8f.2 for ; Tue, 18 Nov 2025 02:20:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1763461245; x=1764066045; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=86OsQ8O4igE3G8VqFSqrPCkuxw0MHAvsJzuy/VvzkP4=; b=THTaiYGPlS48MAyQcKyteWWWUGzxBTgXpCssn2PljYyNa4qbEffMot9uqp0GGrC+W7 wkLerNg7e+ahEjglv3wsZ4w+d7BSON1lE0SONS24GLFmuBFiermr3cG0j2UBN4NMkao9 rQSmCpXxUCzZArc3EK4rkJPS6DtbvU7QSxKtLSD4DroY7mwCB9Lb5SSAk5FAemN6jDyT WMV9Z+p+wd5rs34/q91mYOFgVEt0wyauH/hfOSteM+XatWWclcbL2E/mTa6cqxM9j5M5 5H05D/u2WfInd69gAJW5EC/4bVZy+Q2rNhRvc9AOTP3X2XB61t3huxZVtQpuGBzLxrII gePA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763461245; x=1764066045; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=86OsQ8O4igE3G8VqFSqrPCkuxw0MHAvsJzuy/VvzkP4=; b=kgHmkyHbHpqrUZsvhfXlvYIfpK7yCQsW6Z1NR/ib/p7wW/upcJ5Lh4kMtqdbxBgka2 t8o4/KQ2XqUKHuhkNqCVC8EjdvQtZLi3pcjyGVMKLpDVJO+Vxk8qWu94pf6TBeIMNj/V 1Qqf2r6IUmM4myMT2HtJbrhO3re1T1T+cGIlHYPzQIT/jyBlicGHmGi3p8ahS/8tK10x haC4rQrGGfVu6d4A0/0wJaKYuW1nzQ8lPaUdvf/N2kIwqOPncrqzdYkMtE3sy5GFT+7q 7TMHYX47HdXoyAQl3qofbGTy2egYk6kGXhVaEnaXSze9Uk8L8JAFItf8YwBk8SvbENCQ 40SA== X-Gm-Message-State: AOJu0YxPR8sgI3uNx3796kDD0yU4j5ff7PUJj5lCdTmXI61X5SdrJUvL JHc0zRG68gb/U2SJ7ckaLjaNpgM2I5I4f/fcLG2zntyAkHubTGY4BJqiArIY+Xip8rhjLVt2Z61 V/rk5 X-Gm-Gg: ASbGnctFiMvCT0nbdcDvbVfVysOTCS+dih/ZFhCdOy+CQ6TH26VVo1ZSyMdyDNH/iho nOvvVBDuwP1Hq+9dLYEYTQDugR3vT19qiGzxaDj97qEZ/u5M69xcAABf72RBFd4RJ4lLepLgbVI NJGKNhUyur/Apx6L8NyECPndB8Cp5jUM40u8HmV8slgwEQyK04L1qElKrOzeBF+7P2CiSorIVLR pwJS+CLYIjGJAZIlffCE9xpFXie0/Pz3PZob6UvhPMc1zAQ3Rey1ZadeNWd6J2GEvEkWh6WFBu+ HM7nZb4TA9VFUr1lSp5a0IH0o6IWOQFMKpVLaUyNOVOCfCucG9IA89VoP/NTg04sGUnJwiLABje qkmueAbmQjiJM9T6DNiKBe31+8nZhWGJLYdkaoBy3Oh2kwVPPUpZuun3ZwBfkTE9tLk74Kt8PIU D1UQu5VjCOBNyGD8NxMwDzdm0uWpQPtt2Gg+o= X-Google-Smtp-Source: AGHT+IFozv20m/vPtWmuTbUfLoHdmLih4UWquhWYCvwzAinCNYqlglildbIJq9MpgoiBlmIq42A7wg== X-Received: by 2002:a05:6000:2f83:b0:429:ed90:91dd with SMTP id ffacd0b85a97d-42b59323370mr13864071f8f.6.1763461244827; Tue, 18 Nov 2025 02:20:44 -0800 (PST) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42b53f0b894sm32147587f8f.26.2025.11.18.02.20.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Nov 2025 02:20:44 -0800 (PST) From: Marco Crivellari To: linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Ping-Ke Shih Subject: [PATCH v2 0/2] add WQ_UNBOUND to alloc_workqueue users Date: Tue, 18 Nov 2025 11:20:30 +0100 Message-ID: <20251118102032.54375-1-marco.crivellari@suse.com> X-Mailer: git-send-email 2.51.1 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: 8bit Hi, === Current situation: problems === Let's consider a nohz_full system with isolated CPUs: wq_unbound_cpumask is set to the housekeeping CPUs, for !WQ_UNBOUND the local CPU is selected. This leads to different scenarios if a work item is scheduled on an isolated CPU where "delay" value is 0 or greater then 0: schedule_delayed_work(, 0); This will be handled by __queue_work() that will queue the work item on the current local (isolated) CPU, while: schedule_delayed_work(, 1); Will move the timer on an housekeeping CPU, and schedule the work there. 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 consistency cannot be addressed without refactoring the API. === Recent changes to the WQ API === The following, address the recent changes in the Workqueue API: - commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and system_dfl_wq") - commit 930c2ea566af ("workqueue: Add new WQ_PERCPU flag") The old workqueues will be removed in a future release cycle. === Introduced Changes by this series === 1) [P 1-2] add WQ_UNBOUND to alloc_workqueue() This explicitly adds WQ_UNBOUND because this workload has no benefit from being per-cpu. Thanks! --- Changes in v2: - Switch from WQ_PERCPU to WQ_UNBOUND: this workload benefits from an unbound workqueue. - Rebased on 6.18-rc6 Marco Crivellari (2): wifi: rtlwifi: add WQ_UNBOUND to alloc_workqueue users wifi: rtw88: add WQ_UNBOUND to alloc_workqueue users drivers/net/wireless/realtek/rtlwifi/base.c | 2 +- drivers/net/wireless/realtek/rtw88/usb.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) -- 2.51.1