From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from stravinsky.debian.org (stravinsky.debian.org [82.195.75.108]) (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 300963A4520 for ; Mon, 11 May 2026 12:27:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=82.195.75.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778502437; cv=none; b=LmhqvYOQ6qqva2O1kgvvjLEmZ/o6IDLLbnAl/W20MUzmB5SaYfugvUDVBIbqSMvtGuyFTUqLFOISmWsr+ZW8GuQCYlKNGoXJ1Gb84uMeXvVJ2/QAWW/nXDGZEz+V9gTN29wy93RejrMRTVUQFRhxUY0wb/h1w+Fv4mJf+FpHMA4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778502437; c=relaxed/simple; bh=M3lLOjc8Ixio6dzxg+jnAlwRVChI14fk9iiuyTHEHR8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=AUnnodaKi/XvMkzlPYoHaIHo0nCH2Ktj/beIqlahigG038FfGl4rbrkAW2RdQs5vjdsuBl8XeyKqONG114mifUDYoT6ac6ktiiybA+AjrYgSszAOR1SCIy0kRbabD97M750ZlsI/wK3uFzB5aPCrheDFOSqO/VHs0wVM/atzfFw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=debian.org; spf=pass smtp.mailfrom=debian.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b=SEhMuHdZ; arc=none smtp.client-ip=82.195.75.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=debian.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.b="SEhMuHdZ" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:Cc:To:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From: Reply-To:Content-ID:Content-Description:In-Reply-To:References; bh=lgYFVccCaQVud/FORZNnv+NuvqV285b3s8RbFg6tRlA=; b=SEhMuHdZ/o9ZW8hi2fnHYBpkKB TGXxhGZa5YCUccLdkZtiKfxc3FGnG93nL+N0eOraSc4FqPIjn+LWIK+jsxCiVqig4MLb5lfy3kxBz p4XR/ZqS8sfNtuATrQvrTwJ4bMLuAPB202Kp/iuMonbVt3gU1KeAxM5LLfFtsfHDy0AkHvTPoR28v YR0Jd3Y/y9wrNEFwJT0AkIu79xS+kW5vHwjVCawvMPwdGkNv97wn8+6Rm8BaTFZ7nWnJzTdysZ9aS /1gIY8g1L2t+LvjUsMgpvrpG2CFzVDrVfeEUL5muT31ncvueGVFeAZg099stWeD1pUzxNgU0Oyl0Y nRcq+arg==; Received: from authenticated user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1wMPj4-001b42-0Y; Mon, 11 May 2026 12:27:10 +0000 From: Breno Leitao Date: Mon, 11 May 2026 05:26:55 -0700 Subject: [PATCH] workqueue: forbid TEST_WORKQUEUE from being built-in 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: 7bit Message-Id: <20260511-workqueue_fix_test-v1-1-ef460d0e6ea8@debian.org> X-B4-Tracking: v=1; b=H4sIAA7LAWoC/yXM0QqCMBQG4Fc5nGsHblrCXiVC3PytU6C1s5Ugv ntUl9/Nt7EiCZQ9bZzwEpVlZk+2Io7XYb7AyMie2NXuWB+sNe8l3Z8FBf0ka5+h2SBY27QxdK7 puCJ+JEyy/tLT+W8t4YaYvxPv+wem2kaRdgAAAA== X-Change-ID: 20260511-workqueue_fix_test-eb1134cb7237 To: Andrew Morton , Tejun Heo Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com, Breno Leitao X-Mailer: b4 0.16-dev-d5d98 X-Developer-Signature: v=1; a=openpgp-sha256; l=1679; i=leitao@debian.org; h=from:subject:message-id; bh=M3lLOjc8Ixio6dzxg+jnAlwRVChI14fk9iiuyTHEHR8=; b=owEBbQKS/ZANAwAIATWjk5/8eHdtAcsmYgBqAcsax4Wdxiq+LKEpCfERFEwT7PxeuevegoKLY 2qJDTKRPuiJAjMEAAEIAB0WIQSshTmm6PRnAspKQ5s1o5Of/Hh3bQUCagHLGgAKCRA1o5Of/Hh3 bd+xD/0YVfvWjWpT6QDuoXkarckTG/nUUodusRBzW31RNUO0Mns6PVLAy9BUCcZM39xm0ITokUX Y6fMzeicgVhjGs2s1s+5FYuaucq4OauzE3iVLPZWWaHX5Sfcm82LSmCmP32zTDsWRimGPvyA4GM xKsTkAsppcpo2U5HDvRs6rlA2lbn59U7ohAivjKs94lGZ7Bzn96m7VbEa+GNFjMaqa1Ae5ehGO3 opEPLd5bG8S4K1b8Cz7X6jfhhQfS444tfh3mzBtrqE3ZHPRx46CzIgWa9kVbpDj6oAXMsFZC7B/ rSLcTmE/k+ysWtTbx+2OyKkxUA9HcVFchzJCWG5A78XgK4L3RalOiDsCoCTqrFVFYfkbDgz9bq3 tnTv7vi905nRXAsuYLOUXVf0hoYok378k9nbykkmbMecPJGjEHadoKKTkny+2/GKq0iM/iyqcHG GuQaFD/WBoRbIdmw9rTIC/kxfxVw194XgXrpzgImPwIdyZzYkbeGP6+JoD26c6qgk34QaMLjP4d F7HL+8mno9H3rX47qcbrRZKOxcz3DOfuBZs+FnvD9I71Wr0V9ToiplIJsvHwanv3HCVZLQ8670o BUPLrWNNzBnDkcsFLzthwuN3Ss2EwtPvgZeTf7vwMy7OJeztxc1GFWe6KXjOZcyByv+cjHvbk8X ED7Xd/4d89Ix36A== X-Developer-Key: i=leitao@debian.org; a=openpgp; fpr=AC8539A6E8F46702CA4A439B35A3939FFC78776D X-Debian-User: leitao The benchmark drives the workqueue's affinity_scope through sysfs by filp_open()'ing /sys/bus/workqueue/devices/bench_wq/affinity_scope. When CONFIG_TEST_WORKQUEUE=y, the module_init runs during kernel init before userspace has mounted sysfs, so every open returns -ENOENT and the benchmark loop spins emitting: test_workqueue: open /sys/bus/workqueue/devices/bench_wq/affinity_scope failed: -2 Mirror the TEST_BPF pattern and add "depends on m" so Kconfig will not let this be built into the kernel image, and document the reason in the help text. Fixes: 24b2e73f9700 ("workqueue: add test_workqueue benchmark module") Signed-off-by: Breno Leitao --- lib/Kconfig.debug | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 9d54c48d7d982..9dfe6e16de91b 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -2666,12 +2666,17 @@ config TEST_VMALLOC config TEST_WORKQUEUE tristate "Test module for stress/performance analysis of workqueue" + depends on m default n help This builds the "test_workqueue" module for benchmarking workqueue throughput under contention. Useful for evaluating affinity scope changes (e.g., cache_shard vs cache). + The test drives sysfs to switch affinity scopes, so it must be + loaded after userspace has mounted sysfs; building it in (=y) + would run module_init before /sys is available. + If unsure, say N. config TEST_BPF --- base-commit: e98d21c170b01ddef366f023bbfcf6b31509fa83 change-id: 20260511-workqueue_fix_test-eb1134cb7237 Best regards, -- Breno Leitao