Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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.

Note that the previous code path included a BUG_ON() if the static key
was already disabled. Dropped that as part of this change because:
1) Use of BUG_ON() is highly discouraged.
2) There is a WARN_ON() in the static_branch_disable() code path
that would provide adequate breadcrumbs to debug any issue.

Link: https://lkml.kernel.org/r/aWU4tfTju1l3oZCu@agluck-desk3
Signed-off-by: Tony Luck <tony.luck@intel.com>
Reported-by: Reinette Chatre <reinette.chatre@intel.com>
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Luck, Tony and committed by
Andrew Morton
e8eef69a 8cafcb88

+1 -1
+1 -1
lib/once.c
··· 93 93 { 94 94 *done = true; 95 95 mutex_unlock(&once_mutex); 96 - once_disable_jump(once_key, mod); 96 + static_branch_disable(once_key); 97 97 } 98 98 EXPORT_SYMBOL(__do_once_sleepable_done);