[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260108232717.14411-1-tony.luck@intel.com>
Date: Thu, 8 Jan 2026 15:27:17 -0800
From: Tony Luck <tony.luck@...el.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Eric Dumazet <edumazet@...gle.com>,
Reinette Chatre <reinette.chatre@...el.com>,
linux-kernel@...r.kernel.org,
patches@...ts.linux.dev,
Tony Luck <tony.luck@...el.com>
Subject: [PATCH] once: Don't use a work queue to reset sleepable static key
Pointless overhead to use a work queue to reset the static key
for a DO_ONCE_SLEEPABLE() invocation.
Reported-by: Reinette Chatre <reinette.chatre@...el.com>
Signed-off-by: Tony Luck <tony.luck@...el.com>
---
lib/once.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/once.c b/lib/once.c
index 2c306f0e891e..d83bdde78ced 100644
--- a/lib/once.c
+++ b/lib/once.c
@@ -93,6 +93,7 @@ void __do_once_sleepable_done(bool *done, struct static_key_true *once_key,
{
*done = true;
mutex_unlock(&once_mutex);
- once_disable_jump(once_key, mod);
+ BUG_ON(!static_key_enabled(once_key));
+ static_branch_disable(once_key);
}
EXPORT_SYMBOL(__do_once_sleepable_done);
--
2.52.0
Powered by blists - more mailing lists