[RFC PATCH 5/7] dyndbg: hoist static_key_apply_queued up
From: Jim Cromie
Date: Thu Mar 05 2026 - 20:51:34 EST
hoist static_key_apply_queued from ddebug_change to exec_queries.
This can reduce IPIs when multiple queries are submitted together in
the same command-buffer, as when they're separated by by \n ; or %.
It won't affect single command submissions, or settings of
class-map-params, which are submitted 1 bit at a time.
Signed-off-by: Jim Cromie <jim.cromie@xxxxxxxxx>
---
lib/dynamic_debug.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index e555a8dbdc27..80fa8d2143e8 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -386,8 +386,6 @@ static int ddebug_change(const struct ddebug_query *query, struct flag_settings
dp->flags = newflags;
}
}
- pr_debug("applied queued updates to %d sites in total\n", nfound);
- static_key_apply_queued();
mutex_unlock(&ddebug_lock);
return nfound;
@@ -719,10 +717,12 @@ static int ddebug_exec_queries(char *query, const char *modname)
}
i++;
}
- if (i)
+ if (i) {
v2pr_info("processed %d queries, with %d matches, %d errs\n",
i, nfound, errs);
-
+ pr_debug("applied queued updates to %d sites in total\n", nfound);
+ static_key_apply_queued();
+ }
if (exitcode)
return exitcode;
return nfound;
--
2.53.0