From nobody Thu Apr 9 20:26:02 2026 Received: from mail-ot1-f48.google.com (mail-ot1-f48.google.com [209.85.210.48]) (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 629B62DEA9B for ; Fri, 6 Mar 2026 01:50:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772761860; cv=none; b=OQO+9ss5QWNcG/MN/nhMIvHVogu6hD4mJ3KRaKqx/eMf3kItr8nxAnnWjWyHEceuuTwqZmniU7j/BKGNnO8stHwabNJEnA7Kil+h82L4BJAJopiFrs+wwv/d+APuC8Hp1gCThzm6X1TvOAzIfOn9RdxJKTfLqPolZoSuEDGGSww= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772761860; c=relaxed/simple; bh=nerg5Sj4B/7cIkUkLRlGkjS7d3O0Xr3NjbqfJgzkPk4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dNEPf0EQQJKcvfceyI4ijzmz1vHVuwjBp1a1CLR6l2GFjmYOMamgQ72XCciyTFsJOv+iYJnkycV1fCFcfwG6EbobnZkeT1DL829s5xj9aGyBkHTjwWn2TMj8f9EVRkXloU1biY7ombJB2UTXMg7LGTmu+DkzoHIuaNVd0zNfupI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=MvTEP6iE; arc=none smtp.client-ip=209.85.210.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MvTEP6iE" Received: by mail-ot1-f48.google.com with SMTP id 46e09a7af769-7d4c85307b2so5978896a34.0 for ; Thu, 05 Mar 2026 17:50:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772761857; x=1773366657; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4BixrpmblYk1fVfc//g7Bejl2P3I3dQW/tYhS8Iov94=; b=MvTEP6iEUxVlv9yYTBLPDJFtNBaTjGwXjU663JEAtnlFDtJDGY+mZCj43rwml3XVji gld4HLcBA9abpOUMp3Ouza5w6i46jWlsNj7KWsUAPpkOJ4TrLEclMK0KYDSK4kQxoaUv QQ2yclwOec7iRlHZyQqLtQa/SUflsWxf4wqzIWLnDviJg4UKEJXbcSV4je7EJELRqF5B mR0uJG9kHx6owMn0J0kJ6kvEMXXHnt50mcQ4r4ySIncWC8wbu2hLvNPy5zyxZ+8PdOcX gmPHML/JD2o9Hmk1bxQIOerfigQ7kUlwis6rnUMjzSKaqH568PzftVug3q/SchMqwBHS gGWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772761857; x=1773366657; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=4BixrpmblYk1fVfc//g7Bejl2P3I3dQW/tYhS8Iov94=; b=h44smE920pBf6F6BRw1ev0IKjXH523+keREx3f9+l8TKg7McK3HIVjwRSXz3e/293r T4x5nMu7R3npksJpYWBvJZBQTk/LXuoKiH2CLQhI6OFfEq3PerSOj6wrbO28ZnWnJ97i LlHyr6hU5qbmcVfqyTAaO3C7R+vJnzVt5XprlMTbavfZ/GTnyKQpaDp6aUokJo/J6i7l PrUXHXEHTTFF5nnS8ErifG1FYeRZFXO5qHYKquUqPVSzad1AYuotrhbHxb4j1kq0nDnn ONB93mAinQRV7z09Deq/Zmgjj0m0q+xLyyRq6qzceHILaUCXsom44jSYNGXpYOvwJmtq 6nsg== X-Gm-Message-State: AOJu0Yzs/JY0HWbRP39UEqR36c42piLPpOWuzFhUejv9G7E8jkMDj983 2Xac8oyRNXIrilOD1GtGqW9j1iV4eim+sAOUY8TTY/HUiA+9E2YfqGwuUSR6DA== X-Gm-Gg: ATEYQzxrvanhO1jsaXMefp1TVkJAm6eytuTZGJ27BbmCwy2lTE6vi359i+CGaCTKk5l pXKv5odQpzeXkjrRNLuLDmafu61k59imA4MnP983CKp21YfdggRyaLS9KIxYeFhrlxZA92xQ0A9 Y04fUFix1ZJiVp/wlb/UCUSCq6QOqFC4PeZcElOoOJKmZBk74qhBapw1KuHOVdH3Hz4W4uK/byN X7uoyjYwTs5v7o2g6WLGMrfZXf5ilSHP7T2kvvogwRlhu/EihxJ5L84uyuVZ9tRAOS3LYq601QX o9yihFrZiEgKs43YFk/S55b4RtrkUSVi7tuWXTzgcb6Et9sDOxZ6J0gCTfwxyt4/if7MKOM0f6u URxvP6HdT3zOCRQL/VfyKvdKBgaKt6bulpL8c0ERhPiZDM/ChsLIdxN6P+mDEl57+WDPu1b1Arp 7VLkEvKlT+adLpoW0LMmL8jEr1THBq+yD/fg/7p1A8+8Ypqu6c X-Received: by 2002:a05:6820:4410:b0:677:2ac6:3beb with SMTP id 006d021491bc7-67b9bd49539mr338521eaf.55.1772761856874; Thu, 05 Mar 2026 17:50:56 -0800 (PST) Received: from frodo (c-98-38-17-99.hsd1.co.comcast.net. [98.38.17.99]) by smtp.googlemail.com with ESMTPSA id 006d021491bc7-67b9cc1a627sm115245eaf.6.2026.03.05.17.50.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Mar 2026 17:50:56 -0800 (PST) From: Jim Cromie To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: Jim Cromie , Jason Baron , Peter Zijlstra , Josh Poimboeuf , Thomas Gleixner , Alice Ryhl , Steven Rostedt , Ard Biesheuvel , Alexandre Chartre , Juergen Gross , Andy Lutomirski , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Kees Cook , Nathan Chancellor , Lukas Bulwahn Subject: [RFC PATCH 1/7] jump_label: expose queueing API for batched static key updates Date: Thu, 5 Mar 2026 18:50:04 -0700 Message-ID: <20260306015022.1940986-2-jim.cromie@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260306015022.1940986-1-jim.cromie@gmail.com> References: <20260306015022.1940986-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Currently, `HAVE_JUMP_LABEL_BATCH` provides an architecture-level mechanism to defer instruction synchronization (`text_poke_sync()`) when patching a sequence of static keys. However, this deferred batching capability is not exposed as a public kernel API. Subsystems that need to toggle a large number of static keys (e.g., dynamic_debug) currently suffer from O(N) overhead due to repeated machine-wide synchronizations (stop_machine). This patch introduces a public queueing API to expose this deferred synchronization mechanism to the rest of the kernel. This allows multiple static keys to be enabled/disabled by queueing their architecture-level updates, before applying a single machine-wide synchronization barrier after all instructions are modified. The new API consists of: - static_key_enable_queued(key) - static_key_disable_queued(key) - static_key_apply_queued() (the global barrier/flush) - static_branch_enable_queued(x) / static_branch_disable_queued(x) macros NOTES: The '_queued' API suffix was chosen to match the underlying 'arch_jump_label_transform_queue' and to avoid confusion with the existing rate-limited 'static_key_deferred' API. Also unify the names under the 'static_key_*' prefix, renaming jump_label_apply_queued to static_key_apply_queued (with a compatibility macro) for consistency. A pr_debug() is added to show the poked addresses, this exposed the semi-random ordering coming from dynamic-debug, despite its ordered descriptors. So x86/kernel/alternatives gets new code to do an insert-sort, by memcpy & memmove after appending. This sorting yields a dramatic IPI reduction; a following patch to dynamic-debug uses the API, and includes the numbers. Cc: Jason Baron Cc: Peter Zijlstra Cc: Josh Poimboeuf Cc: Thomas Gleixner Cc: Alice Ryhl Cc: Steven Rostedt Cc: Ard Biesheuvel Cc: Alexandre Chartre Cc: Juergen Gross Cc: Andy Lutomirski Signed-off-by: Jim Cromie --- arch/Kconfig | 3 + arch/x86/Kconfig | 1 + arch/x86/kernel/alternative.c | 50 +++++++++----- arch/x86/kernel/jump_label.c | 13 +++- include/linux/jump_label.h | 24 +++++++ kernel/jump_label.c | 125 +++++++++++++++++++++++++++++++--- 6 files changed, 186 insertions(+), 30 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 102ddbd4298e..388a73545005 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -505,6 +505,9 @@ config HAVE_ARCH_JUMP_LABEL config HAVE_ARCH_JUMP_LABEL_RELATIVE bool =20 +config HAVE_JUMP_LABEL_BATCH + bool + config MMU_GATHER_TABLE_FREE bool =20 diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index e2df1b147184..4d7705890558 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -249,6 +249,7 @@ config X86 select HAVE_IOREMAP_PROT select HAVE_IRQ_EXIT_ON_IRQ_STACK if X86_64 select HAVE_IRQ_TIME_ACCOUNTING + select HAVE_JUMP_LABEL_BATCH select HAVE_JUMP_LABEL_HACK if HAVE_OBJTOOL select HAVE_KERNEL_BZIP2 select HAVE_KERNEL_GZIP diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index a888ae0f01fb..85df82c36543 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c @@ -3137,26 +3137,19 @@ static void __smp_text_poke_batch_add(void *addr, c= onst void *opcode, size_t len } =20 /* - * We hard rely on the text_poke_array.vec being ordered; ensure this is s= o by flushing - * early if needed. + * We hard rely on the text_poke_array.vec being ordered; ensure this + * by finding where to insert to preserve the order, and mem-moving + * into place after appending it. */ -static bool text_poke_addr_ordered(void *addr) +static int text_poke_get_insert_idx(void *addr) { - WARN_ON_ONCE(!addr); + int i; =20 - if (!text_poke_array.nr_entries) - return true; - - /* - * If the last current entry's address is higher than the - * new entry's address we'd like to add, then ordering - * is violated and we must first flush all pending patching - * requests: - */ - if (text_poke_addr(text_poke_array.vec + text_poke_array.nr_entries-1) > = addr) - return false; - - return true; + for (i =3D 0; i < text_poke_array.nr_entries; i++) { + if (text_poke_addr(&text_poke_array.vec[i]) > addr) + return i; + } + return text_poke_array.nr_entries; } =20 /** @@ -3174,9 +3167,30 @@ static bool text_poke_addr_ordered(void *addr) */ void __ref smp_text_poke_batch_add(void *addr, const void *opcode, size_t = len, const void *emulate) { - if (text_poke_array.nr_entries =3D=3D TEXT_POKE_ARRAY_MAX || !text_poke_a= ddr_ordered(addr)) + int insert_idx; + + pr_debug("incoming addr=3D%px, current_qlen=3D%d\n", + addr, text_poke_array.nr_entries); + + if (text_poke_array.nr_entries =3D=3D TEXT_POKE_ARRAY_MAX) smp_text_poke_batch_finish(); + + insert_idx =3D text_poke_get_insert_idx(addr); __smp_text_poke_batch_add(addr, opcode, len, emulate); + + if (insert_idx < text_poke_array.nr_entries - 1) { + struct smp_text_poke_loc tmp; + int last =3D text_poke_array.nr_entries - 1; + /* Copy the newly appended item out */ + memcpy(&tmp, &text_poke_array.vec[last], sizeof(tmp)); + + /* Shift everything from insert_idx over by 1 */ + memmove(&text_poke_array.vec[insert_idx + 1], + &text_poke_array.vec[insert_idx], + (last - insert_idx) * sizeof(struct smp_text_poke_loc)); + /* Drop the new item into its sorted home */ + memcpy(&text_poke_array.vec[insert_idx], &tmp, sizeof(tmp)); + } } =20 /** diff --git a/arch/x86/kernel/jump_label.c b/arch/x86/kernel/jump_label.c index a7949a54a0ff..6b5bab5f34e8 100644 --- a/arch/x86/kernel/jump_label.c +++ b/arch/x86/kernel/jump_label.c @@ -120,6 +120,8 @@ void arch_jump_label_transform(struct jump_entry *entry, jump_label_transform(entry, type, 0); } =20 +static int jump_label_queue_len; + bool arch_jump_label_transform_queue(struct jump_entry *entry, enum jump_label_type type) { @@ -135,14 +137,23 @@ bool arch_jump_label_transform_queue(struct jump_entr= y *entry, =20 mutex_lock(&text_mutex); jlp =3D __jump_label_patch(entry, type); - smp_text_poke_batch_add((void *)jump_entry_code(entry), jlp.code, jlp.siz= e, NULL); + smp_text_poke_batch_add((void *)jump_entry_code(entry), + jlp.code, jlp.size, NULL); + jump_label_queue_len++; mutex_unlock(&text_mutex); return true; } =20 void arch_jump_label_transform_apply(void) { + if (!jump_label_queue_len) { + pr_debug("no queued jump_labels to apply\n"); + return; + } + + pr_debug("applying %d queued jump_labels\n", jump_label_queue_len); mutex_lock(&text_mutex); smp_text_poke_batch_finish(); + jump_label_queue_len =3D 0; mutex_unlock(&text_mutex); } diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h index fdb79dd1ebd8..17f572abe4bb 100644 --- a/include/linux/jump_label.h +++ b/include/linux/jump_label.h @@ -234,10 +234,20 @@ extern void static_key_slow_dec_cpuslocked(struct sta= tic_key *key); extern int static_key_count(struct static_key *key); extern void static_key_enable(struct static_key *key); extern void static_key_disable(struct static_key *key); +extern void static_key_enable_queued(struct static_key *key); +extern void static_key_disable_queued(struct static_key *key); +extern void static_key_apply_queued(void); extern void static_key_enable_cpuslocked(struct static_key *key); extern void static_key_disable_cpuslocked(struct static_key *key); extern enum jump_label_type jump_label_init_type(struct jump_entry *entry); =20 +#define static_branch_enable(x) static_key_enable(&(x)->key) +#define static_branch_disable(x) static_key_disable(&(x)->key) +#define static_branch_enable_queued(x) static_key_enable_queued(&(x)->key) +#define static_branch_disable_queued(x) static_key_disable_queued(&(x)->k= ey) +#define static_branch_enable_cpuslocked(x) static_key_enable_cpuslocked(&(= x)->key) +#define static_branch_disable_cpuslocked(x) static_key_disable_cpuslocked(= &(x)->key) + /* * We should be using ATOMIC_INIT() for initializing .enabled, but * the inclusion of atomic.h is problematic for inclusion of jump_label.h @@ -340,6 +350,18 @@ static inline void static_key_disable(struct static_ke= y *key) atomic_set(&key->enabled, 0); } =20 +static inline void static_key_enable_queued(struct static_key *key) +{ + static_key_enable(key); +} + +static inline void static_key_disable_queued(struct static_key *key) +{ + static_key_disable(key); +} + +static inline void static_key_apply_queued(void) {} + #define static_key_enable_cpuslocked(k) static_key_enable((k)) #define static_key_disable_cpuslocked(k) static_key_disable((k)) =20 @@ -535,6 +557,8 @@ extern bool ____wrong_branch_error(void); =20 #define static_branch_enable(x) static_key_enable(&(x)->key) #define static_branch_disable(x) static_key_disable(&(x)->key) +#define static_branch_enable_queued(x) static_key_enable_queued(&(x)->key) +#define static_branch_disable_queued(x) static_key_disable_queued(&(x)->k= ey) #define static_branch_enable_cpuslocked(x) static_key_enable_cpuslocked(&(= x)->key) #define static_branch_disable_cpuslocked(x) static_key_disable_cpuslocked(= &(x)->key) =20 diff --git a/kernel/jump_label.c b/kernel/jump_label.c index 7cb19e601426..76a0f4e68b73 100644 --- a/kernel/jump_label.c +++ b/kernel/jump_label.c @@ -91,6 +91,7 @@ jump_label_sort_entries(struct jump_entry *start, struct = jump_entry *stop) } =20 static void jump_label_update(struct static_key *key); +static void jump_label_update_queued(struct static_key *key); =20 /* * There are similar definitions for the !CONFIG_JUMP_LABEL case in jump_l= abel.h. @@ -250,6 +251,41 @@ void static_key_disable(struct static_key *key) } EXPORT_SYMBOL_GPL(static_key_disable); =20 +void static_key_enable_queued(struct static_key *key) +{ + STATIC_KEY_CHECK_USE(key); + + if (atomic_read(&key->enabled) > 0) { + WARN_ON_ONCE(atomic_read(&key->enabled) !=3D 1); + return; + } + + jump_label_lock(); + if (atomic_read(&key->enabled) =3D=3D 0) { + atomic_set(&key->enabled, -1); + jump_label_update_queued(key); + atomic_set_release(&key->enabled, 1); + } + jump_label_unlock(); +} +EXPORT_SYMBOL_GPL(static_key_enable_queued); + +void static_key_disable_queued(struct static_key *key) +{ + STATIC_KEY_CHECK_USE(key); + + if (atomic_read(&key->enabled) !=3D 1) { + WARN_ON_ONCE(atomic_read(&key->enabled) !=3D 0); + return; + } + + jump_label_lock(); + if (atomic_cmpxchg(&key->enabled, 1, 0) =3D=3D 1) + jump_label_update_queued(key); + jump_label_unlock(); +} +EXPORT_SYMBOL_GPL(static_key_disable_queued); + static bool static_key_dec_not_one(struct static_key *key) { int v; @@ -488,39 +524,59 @@ static bool jump_label_can_update(struct jump_entry *= entry, bool init) return true; } =20 -#ifndef HAVE_JUMP_LABEL_BATCH static void __jump_label_update(struct static_key *key, struct jump_entry *entry, struct jump_entry *stop, bool init) { +#ifndef HAVE_JUMP_LABEL_BATCH for (; (entry < stop) && (jump_entry_key(entry) =3D=3D key); entry++) { if (jump_label_can_update(entry, init)) arch_jump_label_transform(entry, jump_label_type(entry)); } -} #else -static void __jump_label_update(struct static_key *key, - struct jump_entry *entry, - struct jump_entry *stop, - bool init) -{ for (; (entry < stop) && (jump_entry_key(entry) =3D=3D key); entry++) { =20 if (!jump_label_can_update(entry, init)) continue; =20 if (!arch_jump_label_transform_queue(entry, jump_label_type(entry))) { - /* - * Queue is full: Apply the current queue and try again. - */ arch_jump_label_transform_apply(); - BUG_ON(!arch_jump_label_transform_queue(entry, jump_label_type(entry))); + WARN_ON_ONCE(!arch_jump_label_transform_queue(entry, jump_label_type(en= try))); } } arch_jump_label_transform_apply(); +#endif } + +static void __jump_label_update_queued(struct static_key *key, + struct jump_entry *entry, + struct jump_entry *stop, + bool init) +{ +#ifdef HAVE_JUMP_LABEL_BATCH + for (; (entry < stop) && (jump_entry_key(entry) =3D=3D key); entry++) { + + if (!jump_label_can_update(entry, init)) + continue; + + if (!arch_jump_label_transform_queue(entry, jump_label_type(entry))) { + arch_jump_label_transform_apply(); + WARN_ON_ONCE(!arch_jump_label_transform_queue(entry, jump_label_type(en= try))); + } + } +#else + __jump_label_update(key, entry, stop, init); +#endif +} + +void static_key_apply_queued(void) +{ +#ifdef HAVE_JUMP_LABEL_BATCH + arch_jump_label_transform_apply(); #endif +} +EXPORT_SYMBOL_GPL(static_key_apply_queued); =20 void __init jump_label_init(void) { @@ -696,6 +752,27 @@ static void __jump_label_mod_update(struct static_key = *key) } } =20 +static void __jump_label_mod_update_queued(struct static_key *key) +{ + struct static_key_mod *mod; + + for (mod =3D static_key_mod(key); mod; mod =3D mod->next) { + struct jump_entry *stop; + struct module *m; + + if (!mod->entries) + continue; + + m =3D mod->mod; + if (!m) + stop =3D __stop___jump_table; + else + stop =3D m->jump_entries + m->num_jump_entries; + __jump_label_update_queued(key, mod->entries, stop, + m && m->state =3D=3D MODULE_STATE_COMING); + } +} + static int jump_label_add_module(struct module *mod) { struct jump_entry *iter_start =3D mod->jump_entries; @@ -919,6 +996,32 @@ static void jump_label_update(struct static_key *key) __jump_label_update(key, entry, stop, init); } =20 +static void jump_label_update_queued(struct static_key *key) +{ + struct jump_entry *stop =3D __stop___jump_table; + bool init =3D system_state < SYSTEM_RUNNING; + struct jump_entry *entry; +#ifdef CONFIG_MODULES + struct module *mod; + + if (static_key_linked(key)) { + __jump_label_mod_update_queued(key); + return; + } + + scoped_guard(rcu) { + mod =3D __module_address((unsigned long)key); + if (mod) { + stop =3D mod->jump_entries + mod->num_jump_entries; + init =3D mod->state =3D=3D MODULE_STATE_COMING; + } + } +#endif + entry =3D static_key_entries(key); + if (entry) + __jump_label_update_queued(key, entry, stop, init); +} + #ifdef CONFIG_STATIC_KEYS_SELFTEST static DEFINE_STATIC_KEY_TRUE(sk_true); static DEFINE_STATIC_KEY_FALSE(sk_false); --=20 2.53.0 From nobody Thu Apr 9 20:26:02 2026 Received: from mail-oa1-f41.google.com (mail-oa1-f41.google.com [209.85.160.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 DBCFE322768 for ; Fri, 6 Mar 2026 01:51:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772761870; cv=none; b=Y1UhpG0rFoc87YiNypbHO/kZUxSuA0AdbUD/4menxoAvYnEmS8DGA37eZa1E9QoLOUNNpyrsfm4M8UPskQ5nYfaqOFRPoa/cnMJbV53mBB5mAh1tqBbPufa0sCRKvc8SQA2ZpRCppdyUA61IJZAZ7gAEESgo+ntgQSXV4HnKLDI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772761870; c=relaxed/simple; bh=Z9tuv80Wd+Z17aBWjfBPCZL5x2tayG5z4hbZl6oUNtQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PBZxzcaRelBAtZW6PfcOsmmYNzIMLGTP9x0C7rVnAypw6uAjRAJwMzKO0FjQCOqQco71NYvbTHPeuI4KR0F7pBNTET2dcIYvKuo182zvHPOXp6KQN+nbn7GvB8vL2s0NoKqTiw/poSWwNrNXkBhiHwtM7ECXXlEJWlsX9/iWta0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=OMVji4ni; arc=none smtp.client-ip=209.85.160.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OMVji4ni" Received: by mail-oa1-f41.google.com with SMTP id 586e51a60fabf-4043b909ed4so2682889fac.3 for ; Thu, 05 Mar 2026 17:51:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772761864; x=1773366664; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=F0rsOoswj5eD7nQPQpmkp6jfLbhrwTpwHV3qnnV31B8=; b=OMVji4niGvKSkH+PsjA5mLoNTHpwKYucSOyKDtGorrrZg0xahOaHYzNz9uxB28x/AZ tFuWznQVo2O5Y08f/xonFvy93PdM5JGWQ1xrIdg4MURsL5MGPevBizYMBGgOFZsvq0HL 6EXMjp5bUhceCsI80OekdQcQNO0erS2XPFMfeyBxlL3WdnIdY2woE/yd08NxHzpc4b4V GaP2GisDLAqS6ndpSFYrKMZ8Pu8oM3Q/lUTN0wyuBge95okJfA/DsgK3c9P5aR8cFUFe F4A31jHedbzcKrRt9skFPTP2qfDKcM8KbqMVDduXXdGIKcl1I91uhs/bOPyM7gysxGC1 AF6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772761864; x=1773366664; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=F0rsOoswj5eD7nQPQpmkp6jfLbhrwTpwHV3qnnV31B8=; b=rENUJ3tbD16Xw6RQdhFyKzB6wHPtfmAjXFb+25lXinKml4QYfnrNRsD8BNPSjX0dGf mlqrqRgjDOkcxj+KWnejcYyp8TLKljpiBNfmXuwsSaxfVtMX/GuOHy6rTSZ7NqZFw5BB U5xMM5t7ETFVWHLWPiSSIb87IYq33zV8eqst0CSFy5Uc0DMiP72fEjMuaAQpcrndEIp0 D3t0VAm3hzz9uvLYfDoThkcMuo0C76pAoonJtns73Qqgbfh32nu68a7DCRj38JmD60Fp yL4mqd/u88ju7FOUb2kkGZ8+eaI485rl1nDHF+HQw/AR3UBRom/k/hRcIYY3yS1JQSLM 1wlw== X-Gm-Message-State: AOJu0Yy/eitY4mjmW40i/MNpziWz88RWFd5a+GHFRSPcA8rQ6n9QoXtf eiBUz5UKhklql5HuEY+CqcZ3utSEssx+FgfgW8dl8IJwTNZ8WStA8+/a/Q9XCQ== X-Gm-Gg: ATEYQzzYJcPu95K2e/CTCzoTRniRe8ItjhCXCad9Pf2gAmZuOUCusXmuWGojbYX36W/ BndZQa6/lG2TuRzCMvLW2m/U4MKLkCgu3Ah0wn5rDJQpuJCC+zhRY6kBsFGXjp0uF/UWXO/BZS5 XohNfm2YJGKtcSQYkdlXgyNxaXgRY6HZRF7wDwWQVBP8Zm8jnA4ss2ahaar3UiGF/UCq18qyXMA 2QXPGgLXZfiLEb3BIw3iSidtRtm4Vq6V+Jm768J3Akl9ab+JGu0EDkXVGnD3GCmF7fPySUWfEWX 80StYu0TzeoC7gezV0ctK9oVhzDiHUuxIPaYc6Jg+nrzQv9Sjy7wq5J1NjfcDzCsf/X4/3ITQAY Ok75tyFQMMDOc925TKtAs8P6DxNX8vigTIGQ7cuSYRPY2zARbrmseQoUwanT1qRgiVsxaDp0KLB IOn2JaEd7AsOnw/WzG7CBtCJ6YaRTlOKLa93T1vYJC/OZ5fhSpg1CDFq1kn4Y= X-Received: by 2002:a05:6820:162a:b0:679:9873:5e7e with SMTP id 006d021491bc7-67b9bd1af62mr408389eaf.42.1772761863366; Thu, 05 Mar 2026 17:51:03 -0800 (PST) Received: from frodo (c-98-38-17-99.hsd1.co.comcast.net. [98.38.17.99]) by smtp.googlemail.com with ESMTPSA id 006d021491bc7-67b9cc1a627sm115245eaf.6.2026.03.05.17.50.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Mar 2026 17:50:58 -0800 (PST) From: Jim Cromie To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: Jim Cromie , "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo , =?UTF-8?q?Eugenio=20P=C3=A9rez?= , Sumit Semwal , =?UTF-8?q?Christian=20K=C3=B6nig?= , virtualization@lists.linux.dev, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org Subject: [RFC PATCH 2/7] virtio: use pr_debug_ratelimited to avoid flooding Date: Thu, 5 Mar 2026 18:50:05 -0700 Message-ID: <20260306015022.1940986-3-jim.cromie@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260306015022.1940986-1-jim.cromie@gmail.com> References: <20260306015022.1940986-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When I test dynamic-debug's static-key toggling performance in a virtme-ng session, it is too easy to create an enormous flood of printks to the console. #> echo +p > /proc/dynamic_debug/control #> echo -p > /proc/dynamic_debug/control Now theres no "good reason" to shoot your own foot, but this is also easy to fix, by ratelimiting the sources of the flood. I don't think theres a loss of utility to virtio. Example console output is below the snip. For this test-case, ratelimiting suppresses >900k callbacks. It also allows this simple load test for the static-key toggling performance in a following patch. Signed-off-by: Jim Cromie --- root@drm-misc-fixes-2026-02-26-80-g9a2f253ad689:/home/jimc/projects/lx/wk-D= /b0-dd# ddcmdq -p [ 619.868567] dyndbg: query 0: "-p" mod:* Delta-CAL (IPI): 71 - above is a noop baseline. root@drm-misc-fixes-2026-02-26-80-g9a2f253ad689:/home/jimc/projects/lx/wk-D= /b0-dd# ddcmdq +p [ 648.876520] dyndbg: query 0: "+p" mod:* [ 648.878263] dyndbg: match on module: led_class [ 648.878350] dyndbg: match on module: probe [ 648.878474] dyndbg: match on module: pci [ 648.878636] dyndbg: match on module: pci_driver [ 648.878743] dyndbg: match on module: irq [ 648.878845] dyndbg: match on module: setup_bus [ 648.879032] dyndbg: match on module: pcieportdrv [ 648.879139] dyndbg: match on module: bwctrl [ 648.879197] dyndbg: match on module: aspm [ 648.879241] dyndbg: match on module: slot [ 648.879328] dyndbg: match on module: pci_acpi [ 648.879431] dyndbg: match on module: quirks [ 648.879521] dyndbg: match on module: pci_hotplug [ 648.879576] dyndbg: match on module: vgaarb [ 648.879710] dyndbg: match on module: backlight [ 648.879826] dyndbg: match on module: fb [ 648.879900] dyndbg: match on module: tables [ 648.880012] dyndbg: match on module: acpi [ 648.880977] dyndbg: match on module: ac [ 648.881021] dyndbg: match on module: button [ 648.881097] dyndbg: match on module: fan [ 648.881196] dyndbg: match on module: video [ 648.881295] dyndbg: match on module: processor [ 648.881558] dyndbg: match on module: thermal_lib [ 648.881671] dyndbg: match on module: thermal [ 648.881784] dyndbg: match on module: srat [ 648.881860] dyndbg: match on module: battery [ 648.881938] dyndbg: match on module: acpi_x86 [ 648.882088] dyndbg: match on module: pnp [ 648.882219] dyndbg: match on module: dmaengine [ 648.882351] dyndbg: match on module: virt_dma [ 648.882429] dyndbg: match on module: acpi_dma [ 648.882518] dyndbg: match on module: dw_dmac_core [ 648.882619] dyndbg: match on module: virtio_ring [ 648.882833] dyndbg: match on module: tty_io [ 648.882835] virtqueue_get_buf_ctx_split: 852672 callbacks suppressed [ 648.882836] No more buffers in queue [ 648.882837] virtqueue_add_split: 4962 callbacks suppressed [ 648.882838] Added buffer head 0 to 00000000531af360 [ 648.882842] No more buffers in queue [ 648.882843] No more buffers in queue [ 648.882843] No more buffers in queue [ 648.882844] No more buffers in queue [ 648.882844] No more buffers in queue [ 648.882845] No more buffers in queue [ 648.882845] No more buffers in queue [ 648.882846] No more buffers in queue [ 648.882846] No more buffers in queue [ 648.882857] Added buffer head 0 to 00000000531af360 [ 648.882869] Added buffer head 0 to 00000000531af360 [ 648.882874] vring_interrupt: 88637 callbacks suppressed [ 648.882876] virtqueue interrupt with no work for 00000000e20c0e9d [ 648.882882] Added buffer head 0 to 00000000531af360 [ 648.882899] Added buffer head 0 to 00000000531af360 [ 648.882909] Added buffer head 0 to 00000000531af360 [ 648.882919] Added buffer head 0 to 00000000531af360 [ 648.882930] Added buffer head 0 to 00000000531af360 [ 648.882941] Added buffer head 0 to 00000000531af360 [ 648.882951] Added buffer head 0 to 00000000531af360 [ 648.883860] virtqueue interrupt with no work for 00000000531af360 [ 648.883920] virtqueue interrupt with no work for 0000000088284d45 [ 648.883980] virtqueue interrupt with no work for 000000006b8c4aa3 [ 648.884033] virtqueue interrupt with no work for 00000000f205a9b7 [ 648.884085] virtqueue interrupt with no work for 0000000021930e68 [ 648.884138] virtqueue interrupt with no work for 0000000081dad94c [ 648.884190] virtqueue interrupt with no work for 0000000097d16d2d [ 648.884243] virtqueue interrupt with no work for 00000000b4539010 [ 648.884296] virtqueue interrupt with no work for 00000000ac870038 [ 648.884418] dyndbg: match on module: tty_jobctrl [ 648.884476] dyndbg: match on module: vt_ioctl [ 648.884528] dyndbg: match on module: serial_base [ 648.884625] dyndbg: match on module: 8250 [ 648.884698] dyndbg: match on module: 8250_base [ 648.884795] dyndbg: match on module: 8250_exar [ 648.884856] dyndbg: match on module: 8250_pci [ 648.884962] dyndbg: match on module: 8250_pericom [ 648.885014] dyndbg: match on module: virtio_console [ 648.885091] dyndbg: match on module: iommu [ 648.885132] dyndbg: match on module: init [ 648.885174] dyndbg: match on module: ppr [ 648.885216] dyndbg: match on module: iommu [ 648.885256] dyndbg: match on module: dmar [ 648.885334] dyndbg: match on module: iommu [ 648.885419] dyndbg: match on module: virtio_iommu [ 648.885481] dyndbg: match on module: drm [ 648.885577] dyndbg: match on module: ttm [ 648.885651] dyndbg: match on module: component [ 648.885756] dyndbg: match on module: core [ 648.885979] dyndbg: match on module: bus [ 648.886081] dyndbg: match on module: dd [ 648.886238] dyndbg: match on module: syscore [ 648.886339] dyndbg: match on module: class [ 648.886429] dyndbg: match on module: platform [ 648.886519] dyndbg: match on module: faux [ 648.886567] dyndbg: match on module: main [ 648.886664] dyndbg: match on module: wakeup [ 648.886765] dyndbg: match on module: firmware_class [ 648.886925] dyndbg: match on module: regmap [ 648.886971] dyndbg: match on module: regcache [ 648.887089] dyndbg: match on module: regcache_flat [ 648.887142] dyndbg: match on module: regmap_debugfs [ 648.887195] dyndbg: match on module: mei [ 648.887914] dyndbg: match on module: mei_me [ 648.888149] dyndbg: match on module: dax [ 648.888267] dyndbg: match on module: dma_buf [ 648.888322] dyndbg: match on module: scsi_mod [ 648.888413] dyndbg: match on module: virtio_scsi [ 648.888486] dyndbg: match on module: libata [ 648.888736] dyndbg: match on module: ahci [ 648.888816] dyndbg: match on module: libahci [ 648.888895] dyndbg: match on module: ata_piix [ 648.888960] dyndbg: match on module: pata_amd [ 648.889050] dyndbg: match on module: pata_oldpiix [ 648.889124] dyndbg: match on module: pata_sch [ 648.889172] dyndbg: match on module: mdio_bus [ 648.889229] dyndbg: match on module: libphy [ 648.889303] dyndbg: match on module: realtek [ 648.889395] dyndbg: match on module: fwnode_mdio [ 648.889468] dyndbg: match on module: virtio_net [ 648.889697] dyndbg: match on module: pcmcia_core [ 648.889848] dyndbg: match on module: pcmcia [ 648.890263] dyndbg: match on module: pci_quirks [ 648.890322] dyndbg: match on module: i8042 [ 648.890355] dyndbg: match on module: libps2 [ 648.890441] dyndbg: match on module: input_core [ 648.890546] dyndbg: match on module: ff_memless [ 648.890670] dyndbg: match on module: atkbd [ 648.890724] dyndbg: match on module: psmouse [ 648.890981] dyndbg: match on module: rtc_core [ 648.891135] dyndbg: match on module: rtc_cmos [ 648.891242] dyndbg: match on module: i2c_boardinfo [ 648.891303] dyndbg: match on module: i2c_core [ 648.891519] dyndbg: match on module: i2c_smbus [ 648.891624] dyndbg: match on module: i2c_i801 [ 648.891757] dyndbg: match on module: pps_core [ 648.891925] dyndbg: match on module: power_supply [ 648.892085] dyndbg: match on module: hwmon [ 648.892129] dyndbg: match on module: thermal_sys [ 648.892260] dyndbg: match on module: therm_throt [ 648.892315] dyndbg: match on module: md_mod [ 648.892570] dyndbg: match on module: dm_mod [ 648.892696] dyndbg: match on module: sysfs [ 648.892741] dyndbg: match on module: dmi_scan [ 648.892787] dyndbg: match on module: qemu_fw_cfg [ 648.892889] dyndbg: match on module: esrt [ 648.892935] dyndbg: match on module: mailbox [ 648.893006] dyndbg: match on module: pcc [ 648.893051] dyndbg: match on module: nvmem_core [ 648.893103] dyndbg: match on module: snd [ 648.893191] dyndbg: match on module: snd_timer [ 648.893249] dyndbg: match on module: snd_pcm [ 648.893356] dyndbg: match on module: snd_seq [ 648.893514] dyndbg: match on module: snd_intel8x0 [ 648.893572] dyndbg: match on module: snd_ac97_codec [ 648.893667] dyndbg: match on module: snd_hda_core [ 648.893867] dyndbg: match on module: snd_intel_dspcfg [ 648.894017] dyndbg: match on module: snd_intel_sdw_acpi [ 648.894131] dyndbg: match on module: snd_hda_codec [ 648.894336] dyndbg: match on module: snd_hda_codec_realtek_lib [ 648.894479] dyndbg: match on module: snd_hda_codec_alc269 [ 648.894585] dyndbg: match on module: snd_hda_scodec_component [ 648.894655] dyndbg: match on module: snd_hda_codec_generic [ 648.894775] dyndbg: match on module: snd_hda_intel [ 648.894939] dyndbg: match on module: sock [ 648.894987] dyndbg: match on module: dev [ 648.895119] dyndbg: match on module: sch_api [ 648.895174] dyndbg: match on module: route [ 648.895215] dyndbg: match on module: ip_fragment [ 648.895264] dyndbg: match on module: ip_output [ 648.895313] dyndbg: match on module: tcp [ 648.895350] dyndbg: match on module: tcp_input [ 648.895468] dyndbg: match on module: tcp_output [ 648.895575] dyndbg: match on module: tcp_timer [ 648.895634] dyndbg: match on module: tcp_ipv4 [ 648.895687] dyndbg: match on module: tcp_cong [ 648.895743] dyndbg: match on module: tcp_fastopen [ 648.895796] dyndbg: match on module: tcp_recovery [ 648.895854] dyndbg: match on module: udp [ 648.895951] dyndbg: match on module: arp [ 648.895994] dyndbg: match on module: icmp [ 648.896096] dyndbg: match on module: devinet [ 648.896151] dyndbg: match on module: fib_trie [ 648.896250] dyndbg: match on module: ping [ 648.896409] dyndbg: match on module: sysctl_net_ipv4 [ 648.896505] dyndbg: match on module: ipconfig [ 648.896567] dyndbg: match on module: tcp_cubic [ 648.896625] dyndbg: match on module: ip6_checksum [ 648.896718] dyndbg: match on module: sysctl_net [ 648.896832] dyndbg: match on module: i386 [ 648.896886] dyndbg: match on module: mmconfig_shared [ 648.896944] dyndbg: match on module: fixup [ 648.897029] dyndbg: match on module: acpi [ 648.897087] dyndbg: match on module: irq [ 648.897185] dyndbg: match on module: decompress [ 648.897253] dyndbg: match on module: kobject [ 648.897366] dyndbg: match on module: kobject_uevent [ 648.897478] dyndbg: applied queued updates to 1900 sites in total [ 648.897586] applying 1879 queued jump_labels [ 648.898378] virtqueue callback for 00000000b8493952 (000000004941ab6e) [ 648.898493] virtio_fs_send_req: opcode 5 unique 0x45a0 nodeid 0x23 in.le= n 40 out.len 4095 queue_id 1 [ 648.898493] virtio_fs_send_req: opcode 5 unique 0x459e nodeid 0x23 in.le= n 40 out.len 4095 queue_id 1 [ 648.898582] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.898752] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.898905] virtio_fs_send_req: opcode 5 unique 0x45a2 nodeid 0x2f2 in.l= en 40 out.len 4095 queue_id 1 [ 648.898912] virtio_fs_send_req: opcode 5 unique 0x45a4 nodeid 0x23 in.le= n 40 out.len 4095 queue_id 1 [ 648.899066] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.899183] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.899276] virtio_fs_send_req: opcode 5 unique 0x45a6 nodeid 0x23 in.le= n 40 out.len 4095 queue_id 1 [ 648.899281] virtio_fs_send_req: opcode 5 unique 0x45a8 nodeid 0x23 in.le= n 40 out.len 4095 queue_id 1 [ 648.899413] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.899528] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.899608] virtio_fs_send_req: opcode 5 unique 0x45ac nodeid 0x23 in.le= n 40 out.len 4095 queue_id 1 [ 648.899608] virtio_fs_send_req: opcode 5 unique 0x45aa nodeid 0x2f2 in.l= en 40 out.len 4095 queue_id 1 [ 648.899711] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.899850] virtqueue callback for 00000000531af360 (00000000df837aee) [ 648.899957] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.899989] virtio_fs_send_req: opcode 5 unique 0x45ae nodeid 0x23 in.le= n 40 out.len 4095 queue_id 1 [ 648.899992] virtio_fs_send_req: opcode 5 unique 0x45b0 nodeid 0x23 in.le= n 40 out.len 4095 queue_id 1 [ 648.900080] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.900084] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.900520] virtio_fs_send_req: opcode 5 unique 0x45b2 nodeid 0x2f2 in.l= en 40 out.len 4095 queue_id 1 [ 648.900557] virtio_fs_send_req: opcode 5 unique 0x45b4 nodeid 0x23 in.le= n 40 out.len 4095 queue_id 1 [ 648.900725] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.901958] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.902056] virtio_fs_send_req: opcode 5 unique 0x45b6 nodeid 0x23 in.le= n 40 out.len 4095 queue_id 1 [ 648.902069] virtio_fs_send_req: opcode 14 unique 0x45b8 nodeid 0x245 in.= len 48 out.len 16 queue_id 1 [ 648.902292] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.902409] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.902506] virtio_fs_send_req: opcode 5 unique 0x45ba nodeid 0x2f2 in.l= en 40 out.len 4095 queue_id 1 [ 648.902507] overlayfs: open(00000000cc553079[bin/grep/l], 0100040) -> (0= 0000000ebc0a9b2, 01100040) [ 648.902707] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.902793] virtio_fs_send_req: opcode 5 unique 0x45bc nodeid 0x26 in.le= n 40 out.len 4095 queue_id 1 [ 648.902861] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.903071] virtio_fs_send_req: opcode 14 unique 0x45be nodeid 0x28 in.l= en 48 out.len 16 queue_id 1 [ 648.903072] virtio_fs_send_req: opcode 5 unique 0x45c0 nodeid 0x23 in.le= n 40 out.len 4095 queue_id 1 [ 648.903325] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.903329] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.903546] overlayfs: open(0000000044db1ed7[lib64/ld-linux-x86-64.so.2/= l], 0100040) -> (00000000ce7f73a3, 01100040) [ 648.903629] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.903800] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.903896] virtio_fs_send_req: opcode 5 unique 0x45c2 nodeid 0x2f2 in.l= en 40 out.len 4095 queue_id 1 [ 648.903921] virtio_fs_send_req: opcode 14 unique 0x45c4 nodeid 0x2b in.l= en 48 out.len 16 queue_id 1 [ 648.904123] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.904252] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.904382] overlayfs: open(0000000044db1ed7[/ld.so.cache/l], 0100000) -= > (00000000a546e0ec, 01100000) [ 648.904421] virtio_fs_send_req: opcode 5 unique 0x45c6 nodeid 0x23 in.le= n 40 out.len 4095 queue_id 1 [ 648.904521] virtio_fs_send_req: opcode 25 unique 0x45c8 nodeid 0x2b in.l= en 64 out.len 0 queue_id 1 [ 648.904698] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.904849] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.904982] virtio_fs_send_req: opcode 5 unique 0x45ca nodeid 0x2f2 in.l= en 40 out.len 4095 queue_id 1 [ 648.905003] virtio_fs_send_req: opcode 5 unique 0x45cc nodeid 0x26 in.le= n 40 out.len 4095 queue_id 1 [ 648.905214] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.905333] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.905469] virtio_fs_send_req: opcode 14 unique 0x45ce nodeid 0x2f3 in.= len 48 out.len 16 queue_id 1 [ 648.905476] virtio_fs_send_req: opcode 5 unique 0x45d0 nodeid 0x4b in.le= n 40 out.len 4095 queue_id 1 [ 648.905672] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.905803] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.905910] overlayfs: open(00000000b23a5ecd[bin/gawk/l], 0100040) -> (0= 000000042a63553, 01100040) [ 648.905918] virtio_fs_send_req: opcode 14 unique 0x45d2 nodeid 0x4c in.l= en 48 out.len 16 queue_id 1 [ 648.906095] virtio_fs_send_req: opcode 5 unique 0x45d4 nodeid 0x26 in.le= n 40 out.len 4095 queue_id 1 [ 648.906255] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.906359] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.906486] overlayfs: open(0000000044db1ed7[lib64/libpcre2-8.so.0.15.0/= l], 0100000) -> (00000000761f1272, 01100000) [ 648.906498] virtio_fs_send_req: opcode 14 unique 0x45d6 nodeid 0x28 in.l= en 48 out.len 16 queue_id 1 [ 648.906653] virtio_fs_send_req: opcode 25 unique 0x45d8 nodeid 0x4c in.l= en 64 out.len 0 queue_id 1 [ 648.906842] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.906929] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.907050] overlayfs: open(000000001dc27c49[lib64/ld-linux-x86-64.so.2/= l], 0100040) -> (00000000cb9765b4, 01100040) [ 648.907060] virtio_fs_send_req: opcode 5 unique 0x45da nodeid 0x26 in.le= n 40 out.len 4095 queue_id 1 [ 648.907329] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.907428] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.907453] virtio_fs_send_req: opcode 14 unique 0x45dc nodeid 0x2b in.l= en 48 out.len 16 queue_id 1 [ 648.907633] virtio_fs_send_req: opcode 14 unique 0x45de nodeid 0x30 in.l= en 48 out.len 16 queue_id 1 [ 648.907709] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.907848] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.907943] overlayfs: open(0000000044db1ed7[lib64/libc.so.6/l], 0100000= ) -> (000000003b97b39b, 01100000) [ 648.907943] overlayfs: open(000000001dc27c49[/ld.so.cache/l], 0100000) -= > (00000000fce78bd3, 01100000) [ 648.908091] virtio_fs_send_req: opcode 25 unique 0x45e0 nodeid 0x30 in.l= en 64 out.len 0 queue_id 1 [ 648.908169] virtio_fs_send_req: opcode 25 unique 0x45e2 nodeid 0x2b in.l= en 64 out.len 0 queue_id 1 [ 648.908341] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.908447] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.908581] virtio_fs_send_req: opcode 5 unique 0x45e4 nodeid 0x26 in.le= n 40 out.len 4095 queue_id 1 [ 648.908724] virtio_fs_send_req: opcode 18 unique 0x45e6 nodeid 0x2b in.l= en 64 out.len 0 queue_id 1 [ 648.908776] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.908895] virtio_fs_send_req: opcode 14 unique 0x45e8 nodeid 0x2a7 in.= len 48 out.len 16 queue_id 1 [ 648.908956] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.909155] virtio_fs_send_req: opcode 5 unique 0x45ea nodeid 0x2f4 in.l= en 40 out.len 4095 queue_id 1 [ 648.909156] overlayfs: open(0000000044db1ed7[locale/locale-archive/l], 0= 100000) -> (00000000a546e0ec, 01100000) [ 648.909346] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.909427] virtio_fs_send_req: opcode 25 unique 0x45ec nodeid 0x2a7 in.= len 64 out.len 0 queue_id 1 [ 648.909506] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.909725] virtio_fs_send_req: opcode 14 unique 0x45ee nodeid 0x2f5 in.= len 48 out.len 16 queue_id 1 [ 648.909764] virtio_fs_send_req: opcode 14 unique 0x45f0 nodeid 0x2a9 in.= len 48 out.len 16 queue_id 1 [ 648.910023] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.910119] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.910240] overlayfs: open(0000000044db1ed7[gconv/gconv-modules.cache/l= ], 0100000) -> (0000000046b528d3, 01100000) [ 648.910245] overlayfs: open(000000001dc27c49[lib64/libreadline.so.8.3/l]= , 0100000) -> (000000006c3dd911, 01100000) [ 648.910382] virtio_fs_send_req: opcode 25 unique 0x45f2 nodeid 0x2a9 in.= len 64 out.len 0 queue_id 1 [ 648.910515] virtio_fs_send_req: opcode 25 unique 0x45f4 nodeid 0x2f5 in.= len 64 out.len 0 queue_id 1 [ 648.910662] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.910775] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.910915] virtio_fs_send_req: opcode 5 unique 0x45f6 nodeid 0x26 in.le= n 40 out.len 4095 queue_id 1 [ 648.910930] virtio_fs_send_req: opcode 14 unique 0x45f8 nodeid 0x2b2 in.= len 48 out.len 16 queue_id 1 [ 648.911124] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.911233] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.911331] overlayfs: open(0000000044db1ed7[locale/locale.alias/l], 010= 0000) -> (000000001b94a7b7, 01100000) [ 648.911332] virtio_fs_send_req: opcode 5 unique 0x45fa nodeid 0x2f6 in.l= en 40 out.len 4095 queue_id 1 [ 648.911483] virtio_fs_send_req: opcode 25 unique 0x45fc nodeid 0x2b2 in.= len 64 out.len 0 queue_id 1 [ 648.911664] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.911757] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.911865] virtio_fs_send_req: opcode 18 unique 0x45fe nodeid 0x2b2 in.= len 64 out.len 0 queue_id 1 [ 648.911870] virtio_fs_send_req: opcode 14 unique 0x4600 nodeid 0x2f7 in.= len 48 out.len 16 queue_id 1 [ 648.912086] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.912188] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.912284] overlayfs: open(000000001dc27c49[lib64/libmpfr.so.6.2.2/l], = 0100000) -> (00000000dd259cff, 01100000) [ 648.912289] virtio_fs_send_req: opcode 18 unique 0x4602 nodeid 0x28 in.l= en 64 out.len 0 queue_id 1 [ 648.912456] virtio_fs_send_req: opcode 25 unique 0x4604 nodeid 0x2f7 in.= len 64 out.len 0 queue_id 1 [ 648.912515] virtio_fs_send_req: opcode 18 unique 0x4606 nodeid 0x2a9 in.= len 64 out.len 0 queue_id 1 [ 648.912599] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.912603] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.912924] virtio_fs_send_req: opcode 18 unique 0x4608 nodeid 0x4c in.l= en 64 out.len 0 queue_id 1 [ 648.912943] virtio_fs_send_req: opcode 5 unique 0x460a nodeid 0x26 in.le= n 40 out.len 4095 queue_id 1 [ 648.913017] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.913020] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.913078] virtio_fs_send_req: opcode 18 unique 0x460c nodeid 0x30 in.l= en 64 out.len 0 queue_id 1 [ 648.913298] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.913356] virtio_fs_send_req: opcode 18 unique 0x460e nodeid 0x2a7 in.= len 64 out.len 0 queue_id 1 [ 648.913463] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.913537] virtio_fs_send_req: opcode 18 unique 0x4610 nodeid 0x245 in.= len 64 out.len 0 queue_id 1 [ 648.913877] virtio_fs_send_req: opcode 5 unique 0x4612 nodeid 0x2f8 in.l= en 40 out.len 4095 queue_id 1 [ 648.913927] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.914084] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.914219] virtio_fs_send_req: opcode 14 unique 0x4614 nodeid 0x2f9 in.= len 48 out.len 16 queue_id 1 [ 648.914388] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.914488] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.914586] overlayfs: open(000000001dc27c49[lib64/libgmp.so.10.5.0/l], = 0100000) -> (00000000c480dc70, 01100000) [ 648.914746] virtio_fs_send_req: opcode 25 unique 0x4616 nodeid 0x2f9 in.= len 64 out.len 0 queue_id 1 [ 648.914898] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.914993] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.915130] virtio_fs_send_req: opcode 5 unique 0x4618 nodeid 0x26 in.le= n 40 out.len 4095 queue_id 1 [ 648.915297] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.915391] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.915500] virtio_fs_send_req: opcode 14 unique 0x461a nodeid 0x42 in.l= en 48 out.len 16 queue_id 1 [ 648.915676] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.915772] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.915873] overlayfs: open(000000001dc27c49[lib64/libm.so.6/l], 0100000= ) -> (00000000aab89989, 01100000) [ 648.916022] virtio_fs_send_req: opcode 25 unique 0x461c nodeid 0x42 in.l= en 64 out.len 0 queue_id 1 [ 648.916184] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.916282] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.916386] virtio_fs_send_req: opcode 5 unique 0x461e nodeid 0x26 in.le= n 40 out.len 4095 queue_id 1 [ 648.916559] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.916656] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.916756] virtio_fs_send_req: opcode 14 unique 0x4620 nodeid 0x30 in.l= en 48 out.len 16 queue_id 1 [ 648.916947] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.917045] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.917171] overlayfs: open(000000001dc27c49[lib64/libc.so.6/l], 0100000= ) -> (00000000065b2aff, 01100000) [ 648.917339] virtio_fs_send_req: opcode 25 unique 0x4622 nodeid 0x30 in.l= en 64 out.len 0 queue_id 1 [ 648.917498] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.917596] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.917710] virtio_fs_send_req: opcode 5 unique 0x4624 nodeid 0x26 in.le= n 40 out.len 4095 queue_id 1 [ 648.917901] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.917998] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.918105] virtio_fs_send_req: opcode 5 unique 0x4626 nodeid 0x1ed in.l= en 40 out.len 4095 queue_id 1 [ 648.918283] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.918380] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.918489] virtio_fs_send_req: opcode 14 unique 0x4628 nodeid 0x1ee in.= len 48 out.len 16 queue_id 1 [ 648.918682] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.918780] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.918881] overlayfs: open(000000001dc27c49[lib64/libtinfo.so.6.5/l], 0= 100000) -> (0000000057c26190, 01100000) [ 648.919054] virtio_fs_send_req: opcode 25 unique 0x462a nodeid 0x1ee in.= len 64 out.len 0 queue_id 1 [ 648.919219] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.919318] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.919997] virtio_fs_send_req: opcode 18 unique 0x462c nodeid 0x2b in.l= en 64 out.len 0 queue_id 1 [ 648.920159] virtio_fs_send_req: opcode 14 unique 0x462e nodeid 0x2a7 in.= len 48 out.len 16 queue_id 1 [ 648.920169] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.920368] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.920492] overlayfs: open(000000001dc27c49[locale/locale-archive/l], 0= 100000) -> (00000000fce78bd3, 01100000) [ 648.920627] virtio_fs_send_req: opcode 25 unique 0x4630 nodeid 0x2a7 in.= len 64 out.len 0 queue_id 1 [ 648.920772] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.920871] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.921036] virtio_fs_send_req: opcode 14 unique 0x4632 nodeid 0x2a9 in.= len 48 out.len 16 queue_id 1 [ 648.921211] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.921308] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.921400] overlayfs: open(000000001dc27c49[gconv/gconv-modules.cache/l= ], 0100000) -> (00000000d54e120f, 01100000) [ 648.921523] virtio_fs_send_req: opcode 25 unique 0x4634 nodeid 0x2a9 in.= len 64 out.len 0 queue_id 1 [ 648.921666] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.921770] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.921832] virtqueue callback for 00000000531af360 (00000000df837aee) [ 648.922226] virtio_fs_send_req: opcode 18 unique 0x4636 nodeid 0x28 in.l= en 64 out.len 0 queue_id 1 [ 648.922326] virtio_fs_send_req: opcode 18 unique 0x4638 nodeid 0x2a9 in.= len 64 out.len 0 queue_id 1 [ 648.922400] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.922416] virtio_fs_send_req: opcode 18 unique 0x463a nodeid 0x2f5 in.= len 64 out.len 0 queue_id 1 [ 648.922482] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.922564] virtio_fs_send_req: opcode 18 unique 0x463c nodeid 0x2f7 in.= len 64 out.len 0 queue_id 1 [ 648.922690] virtio_fs_send_req: opcode 18 unique 0x463e nodeid 0x2f9 in.= len 64 out.len 0 queue_id 1 [ 648.922762] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.922780] virtio_fs_send_req: opcode 18 unique 0x4640 nodeid 0x42 in.l= en 64 out.len 0 queue_id 1 [ 648.922847] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.922929] virtio_fs_send_req: opcode 18 unique 0x4642 nodeid 0x30 in.l= en 64 out.len 0 queue_id 1 [ 648.923060] virtio_fs_send_req: opcode 18 unique 0x4644 nodeid 0x1ee in.= len 64 out.len 0 queue_id 1 [ 648.923126] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.923166] virtio_fs_send_req: opcode 18 unique 0x4646 nodeid 0x2a7 in.= len 64 out.len 0 queue_id 1 [ 648.923228] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.923311] virtio_fs_send_req: opcode 18 unique 0x4648 nodeid 0x2f3 in.= len 64 out.len 0 queue_id 1 [ 648.923487] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.923557] virtiofs virtio0: virtio_fs_vq_done requests.0 Delta-CAL (IPI): 6007 - this number is before the insert-sort, final number is better. [ 648.926990] virtio_fs_send_req: opcode 14 unique 0x464a nodeid 0xae in.l= en 48 out.len 16 queue_id 1 [ 648.927221] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.927312] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.927409] overlayfs: open(00000000ae2b3a37[/machine-id/l], 0100000) ->= (00000000ebc0a9b2, 01100000) [ 648.927537] virtio_fs_send_req: opcode 25 unique 0x464c nodeid 0xae in.l= en 64 out.len 0 queue_id 1 [ 648.927709] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.927798] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.927888] virtio_fs_send_req: opcode 18 unique 0x464e nodeid 0xae in.l= en 64 out.len 0 queue_id 1 [ 648.928052] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.928135] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.928914] virtqueue callback for 00000000b8493952 (000000004941ab6e) [ 648.929008] virtio_fs_send_req: opcode 5 unique 0x4650 nodeid 0x23 in.le= n 40 out.len 4095 queue_id 1 [ 648.929175] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.929246] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.929318] virtio_fs_send_req: opcode 5 unique 0x4652 nodeid 0x23 in.le= n 40 out.len 4095 queue_id 1 [ 648.929467] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.929535] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.929604] virtio_fs_send_req: opcode 5 unique 0x4654 nodeid 0x23 in.le= n 40 out.len 4095 queue_id 1 [ 648.929751] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.929824] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.929899] virtio_fs_send_req: opcode 5 unique 0x4656 nodeid 0x23 in.le= n 40 out.len 4095 queue_id 1 [ 648.930043] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.930110] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.930188] virtio_fs_send_req: opcode 5 unique 0x4658 nodeid 0x23 in.le= n 40 out.len 4095 queue_id 1 [ 648.930331] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.930399] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.930503] virtio_fs_send_req: opcode 5 unique 0x465a nodeid 0x23 in.le= n 40 out.len 4095 queue_id 1 [ 648.930648] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.930717] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.930795] virtio_fs_send_req: opcode 14 unique 0x465c nodeid 0x204 in.= len 48 out.len 16 queue_id 1 [ 648.930976] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.931046] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.931132] overlayfs: open(00000000b23a5ecd[bin/sed/l], 0100040) -> (00= 00000074755de1, 01100040) [ 648.931288] virtio_fs_send_req: opcode 5 unique 0x465e nodeid 0x26 in.le= n 40 out.len 4095 queue_id 1 [ 648.931448] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.931517] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.931600] virtio_fs_send_req: opcode 14 unique 0x4660 nodeid 0x28 in.l= en 48 out.len 16 queue_id 1 [ 648.931751] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.931826] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.931906] overlayfs: open(00000000fea37e0c[lib64/ld-linux-x86-64.so.2/= l], 0100040) -> (00000000ebc0a9b2, 01100040) [ 648.932282] virtio_fs_send_req: opcode 14 unique 0x4662 nodeid 0x2b in.l= en 48 out.len 16 queue_id 1 [ 648.932437] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.932508] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.932593] overlayfs: open(00000000fea37e0c[/ld.so.cache/l], 0100000) -= > (00000000a546e0ec, 01100000) [ 648.932710] virtio_fs_send_req: opcode 25 unique 0x4664 nodeid 0x2b in.l= en 64 out.len 0 queue_id 1 [ 648.932868] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.932945] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.933038] virtio_fs_send_req: opcode 5 unique 0x4666 nodeid 0x26 in.le= n 40 out.len 4095 queue_id 1 [ 648.933203] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.933285] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.933377] virtio_fs_send_req: opcode 5 unique 0x4668 nodeid 0x2c in.le= n 40 out.len 4095 queue_id 1 [ 648.933528] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.933606] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.933695] virtio_fs_send_req: opcode 14 unique 0x466a nodeid 0x2d in.l= en 48 out.len 16 queue_id 1 [ 648.933850] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.933924] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.934031] overlayfs: open(00000000fea37e0c[lib64/libacl.so.1.1.2302/l]= , 0100000) -> (000000003b97b39b, 01100000) [ 648.934194] virtio_fs_send_req: opcode 25 unique 0x466c nodeid 0x2d in.l= en 64 out.len 0 queue_id 1 [ 648.934349] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.934427] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.934513] virtio_fs_send_req: opcode 5 unique 0x466e nodeid 0x26 in.le= n 40 out.len 4095 queue_id 1 [ 648.934668] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.934745] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.934835] virtio_fs_send_req: opcode 14 unique 0x4670 nodeid 0x41 in.l= en 48 out.len 16 queue_id 1 [ 648.934991] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.935069] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.935152] overlayfs: open(00000000fea37e0c[lib64/libselinux.so.1/l], 0= 100000) -> (00000000761f1272, 01100000) [ 648.935308] virtio_fs_send_req: opcode 25 unique 0x4672 nodeid 0x41 in.l= en 64 out.len 0 queue_id 1 [ 648.935462] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.935540] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.935650] virtio_fs_send_req: opcode 5 unique 0x4674 nodeid 0x26 in.le= n 40 out.len 4095 queue_id 1 [ 648.935800] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.935899] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.935994] virtio_fs_send_req: opcode 14 unique 0x4676 nodeid 0x30 in.l= en 48 out.len 16 queue_id 1 [ 648.936148] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.936226] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.936316] overlayfs: open(00000000fea37e0c[lib64/libc.so.6/l], 0100000= ) -> (0000000046b528d3, 01100000) [ 648.936448] virtio_fs_send_req: opcode 25 unique 0x4678 nodeid 0x30 in.l= en 64 out.len 0 queue_id 1 [ 648.936612] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.936691] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.936784] virtio_fs_send_req: opcode 5 unique 0x467a nodeid 0x26 in.le= n 40 out.len 4095 queue_id 1 [ 648.936943] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.937022] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.937125] virtio_fs_send_req: opcode 5 unique 0x467c nodeid 0x43 in.le= n 40 out.len 4095 queue_id 1 [ 648.937274] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.937353] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.937447] virtio_fs_send_req: opcode 14 unique 0x467e nodeid 0x44 in.l= en 48 out.len 16 queue_id 1 [ 648.937604] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.937683] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.937769] overlayfs: open(00000000fea37e0c[lib64/libattr.so.1.1.2502/l= ], 0100000) -> (00000000ce7f73a3, 01100000) [ 648.937964] virtio_fs_send_req: opcode 25 unique 0x4680 nodeid 0x44 in.l= en 64 out.len 0 queue_id 1 [ 648.938148] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.938229] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.938329] virtio_fs_send_req: opcode 5 unique 0x4682 nodeid 0x26 in.le= n 40 out.len 4095 queue_id 1 [ 648.938499] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.938577] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.938669] virtio_fs_send_req: opcode 5 unique 0x4684 nodeid 0x4b in.le= n 40 out.len 4095 queue_id 1 [ 648.938831] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.938914] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.939013] virtio_fs_send_req: opcode 14 unique 0x4686 nodeid 0x4c in.l= en 48 out.len 16 queue_id 1 [ 648.939192] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.939272] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.939361] overlayfs: open(00000000fea37e0c[lib64/libpcre2-8.so.0.15.0/= l], 0100000) -> (000000001b94a7b7, 01100000) [ 648.939502] virtio_fs_send_req: opcode 25 unique 0x4688 nodeid 0x4c in.l= en 64 out.len 0 queue_id 1 [ 648.939654] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.939734] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.940088] virtio_fs_send_req: opcode 18 unique 0x468a nodeid 0x2b in.l= en 64 out.len 0 queue_id 1 [ 648.940214] virtio_fs_send_req: opcode 1 unique 0x468c nodeid 0x1 in.len= 48 out.len 128 queue_id 1 [ 648.940273] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.940394] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.940552] virtio_fs_send_req: opcode 14 unique 0x468e nodeid 0x2a7 in.= len 48 out.len 16 queue_id 1 [ 648.940730] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.940819] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.940910] overlayfs: open(00000000fea37e0c[locale/locale-archive/l], 0= 100000) -> (00000000a546e0ec, 01100000) [ 648.941042] virtio_fs_send_req: opcode 25 unique 0x4690 nodeid 0x2a7 in.= len 64 out.len 0 queue_id 1 [ 648.941215] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.941295] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.941413] virtio_fs_send_req: opcode 14 unique 0x4692 nodeid 0x2a9 in.= len 48 out.len 16 queue_id 1 [ 648.941577] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.941654] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.941735] overlayfs: open(00000000fea37e0c[gconv/gconv-modules.cache/l= ], 0100000) -> (000000007d5f2653, 01100000) [ 648.941867] virtio_fs_send_req: opcode 25 unique 0x4694 nodeid 0x2a9 in.= len 64 out.len 0 queue_id 1 [ 648.942022] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.942105] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.942374] virtio_fs_send_req: opcode 18 unique 0x4696 nodeid 0x28 in.l= en 64 out.len 0 queue_id 1 [ 648.942487] virtio_fs_send_req: opcode 18 unique 0x4698 nodeid 0x2a9 in.= len 64 out.len 0 queue_id 1 [ 648.942559] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.942599] virtio_fs_send_req: opcode 18 unique 0x469a nodeid 0x2d in.l= en 64 out.len 0 queue_id 1 [ 648.942660] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.942757] virtio_fs_send_req: opcode 18 unique 0x469c nodeid 0x41 in.l= en 64 out.len 0 queue_id 1 [ 648.942912] virtio_fs_send_req: opcode 18 unique 0x469e nodeid 0x30 in.l= en 64 out.len 0 queue_id 1 [ 648.942973] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.943020] virtio_fs_send_req: opcode 18 unique 0x46a0 nodeid 0x44 in.l= en 64 out.len 0 queue_id 1 [ 648.943084] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.943247] virtio_fs_send_req: opcode 18 unique 0x46a2 nodeid 0x4c in.l= en 64 out.len 0 queue_id 1 [ 648.943318] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.943353] virtio_fs_send_req: opcode 18 unique 0x46a4 nodeid 0x2a7 in.= len 64 out.len 0 queue_id 1 [ 648.943417] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.943514] virtio_fs_send_req: opcode 18 unique 0x46a6 nodeid 0x204 in.= len 64 out.len 0 queue_id 1 [ 648.943698] virtqueue callback for 00000000ffb9412a (00000000c5ce06f7) [ 648.943776] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 648.948394] uart_wait_until_sent(0), jiffies=3D4295316070, expire=3D4295= 316142... root@drm-misc-fixes-2026-02-26-80-g9a2f253ad689:/home/jimc/projects/lx/wk-D= /b0-dd# --- drivers/virtio/virtio_ring.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 335692d41617..99f9e547d264 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -759,7 +759,7 @@ static inline int virtqueue_add_split(struct vring_virt= queue *vq, vq->split.avail_idx_shadow); vq->num_added++; =20 - pr_debug("Added buffer head %i to %p\n", head, vq); + pr_debug_ratelimited("Added buffer head %i to %p\n", head, vq); END_USE(vq); =20 /* This is very unlikely, but theoretically possible. Kick @@ -930,7 +930,7 @@ static void *virtqueue_get_buf_ctx_split(struct vring_v= irtqueue *vq, } =20 if (!more_used_split(vq)) { - pr_debug("No more buffers in queue\n"); + pr_debug_ratelimited("No more buffers in queue\n"); END_USE(vq); return NULL; } @@ -1595,7 +1595,7 @@ static int virtqueue_add_indirect_packed(struct vring= _virtqueue *vq, =20 vq->num_added +=3D 1; =20 - pr_debug("Added buffer head %i to %p\n", head, vq); + pr_debug_ratelimited("Added buffer head %i to %p\n", head, vq); END_USE(vq); =20 return 0; @@ -1744,7 +1744,7 @@ static inline int virtqueue_add_packed(struct vring_v= irtqueue *vq, vq->packed.vring.desc[head].flags =3D head_flags; vq->num_added +=3D descs_used; =20 - pr_debug("Added buffer head %i to %p\n", head, vq); + pr_debug_ratelimited("Added buffer head %i to %p\n", head, vq); END_USE(vq); =20 return 0; @@ -1902,7 +1902,7 @@ static inline int virtqueue_add_packed_in_order(struc= t vring_virtqueue *vq, vq->packed.vring.desc[head].flags =3D head_flags; vq->num_added +=3D total_sg; =20 - pr_debug("Added buffer head %i to %p\n", head, vq); + pr_debug_ratelimited("Added buffer head %i to %p\n", head, vq); END_USE(vq); =20 return 0; @@ -3231,7 +3231,7 @@ irqreturn_t vring_interrupt(int irq, void *_vq) struct vring_virtqueue *vq =3D to_vvq(_vq); =20 if (!more_used(vq)) { - pr_debug("virtqueue interrupt with no work for %p\n", vq); + pr_debug_ratelimited("virtqueue interrupt with no work for %p\n", vq); return IRQ_NONE; } =20 --=20 2.53.0 From nobody Thu Apr 9 20:26:02 2026 Received: from mail-oo1-f49.google.com (mail-oo1-f49.google.com [209.85.161.49]) (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 241C53254B3 for ; Fri, 6 Mar 2026 01:51:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772761871; cv=none; b=chM6BMZe/8qTTnlDoR8XFb0tJl064+Iq8oMnjZwYgXIxm56ZaVrWIhpInPJvYbt8eTI6MwKb2Egv1JujHyiZGRNOzLs543lrhTZ3+RPsE58VFZEbq2at2Cax7I3+hgIv4Z3EhUfvLd1Fvz8KgyJ1PkmeO0uZeYcRUkCwJEA5drM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772761871; c=relaxed/simple; bh=tXNu4K2qwxQZWqVrmJaj8+HnAS6ukw2OelG6cwxhfp0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=U4QqqZQQFGilLZCvDmooRKbHhaR8AAufhIF+JWThw7Oj4CXpOtvEQhuc2LBNJeX26nzl+L+Q8jSXaHOoLmi4OUvOGIY8TtbkCzrnNurpPmt2ufkReyRH+HDJZUnDEz+VB5kyzgeLn6piLAOfPpPKqJ36oc9kG8p1b+sg21VlwKA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=TESTeWDT; arc=none smtp.client-ip=209.85.161.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TESTeWDT" Received: by mail-oo1-f49.google.com with SMTP id 006d021491bc7-662efd1bdd4so6117077eaf.0 for ; Thu, 05 Mar 2026 17:51:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772761869; x=1773366669; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bUT8OXayauJDeUXGjkmGNUpTYIk2PPPOV9CpVsGLhj0=; b=TESTeWDTv967lCziSUvostSRTQYHlkcB/+wyqeKvt9MYYLxFzC2+Fa0v/k/e+ypi/j OFxN5qkb9h6n1EPWo9QiWtZqGgFVll9kgGM24FWQKlpADk8NcAhGokyZFiCA0vR0bUS/ BKBh9ECIkYMTv2E7WJj69uZgEwhHGFHpcqtH5MVjpLgKTnAG2GNxpSYgjvgvaBjU06Hq 076LjmGT2K5lp9tRoHdD86mTwlGNHUo9xDS+5cxZXvrqj6cxjXITYJqYKNFxHc7hROR7 Ku02Go1UzijzlMzszL3sBlIZaoZmFphciZ1Cmx6qSl33dXYMoVAyGQR8Eo2G/aKV1as6 4NdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772761869; x=1773366669; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=bUT8OXayauJDeUXGjkmGNUpTYIk2PPPOV9CpVsGLhj0=; b=GZd+58A5rGvX+nhj/DqIcnH40CmTtToKJL2LwzlZxp/MSKsAxFOAo9UrYlpdHsU3j4 yqhKR6+HpuPC2jUEd7SjULM7AuGjxdZ1zYiWS2f3DS595i9OokwHkB8KszITojqFffxC DHP1l8215X709veQW9OF3UjwCSfaayGlCJt+Bq3kwCxBo6cSelbz51IOKksq6QtyQdm+ k8hdfug6vrpCkx9oMfkMBl6jzP/1Oquv4fpCMPLYFBAZFpG4bOLgFGaMEvhg/uCUC0Ld 3CMf7BDyQRgXIV4uTOVa8MO9/WYbaprcs8CK9zVReADrN4ncPgtZ6XOnoiN4Mea7aKnG n3nw== X-Gm-Message-State: AOJu0YyILVM1bxwaUcBBB74z0t/2vVNNFfX0MIbwF8bNt9JyAn+x1iGW L6kpWtLzMrVpqJHhavXSWWHT6p8RPB2pLaOXhGDox/bzcAILQlRYj2oFTL7jWDzD X-Gm-Gg: ATEYQzxnAgY38kbg/MM3lb0eMpiwJbaF9uXGLcX86ojTEXFUrt9tR4auqdU5SyiDi8G e2vUYiDT/cbCpOH8DrSZe3F2r3dr25DMmXf+8VC9a29VxH6khr22PXr7NYoOPuBGvZRxZsn8/KS mGc2zPPoQxW63kx/Qd3VtMWAgFtVoxWMNapI+gwgm6CoFv+mN1174xc2orRBwMksb5XoUSjAQ06 0Nm+LiN8V43kSd/Go+Ne9CJtkOGx9E3KXo/nB7PsEbKZUgCSB67tRDDsRXTB4xxInj+h57nGl2L 8RE9hNvq+0t47j/HZQVTZ/k8jURN2URKR1yL3ML4WOU+anrlWZrDCzxrjvrMT29bXWTfM0hlewC GFWnlaSKtiSQtXob2II7pEBsjSYviV83HpA1aMfNu2og8RQGLMO/pxz9OkpfUqsFAPLBN9mYHjy o0t5mDOx1KfD4o5vBRNyzBBck8cBsk3orQiTjbdzxfADDFYE21 X-Received: by 2002:a4a:ee14:0:b0:677:3b8f:43a4 with SMTP id 006d021491bc7-67b9c485db9mr276619eaf.36.1772761868900; Thu, 05 Mar 2026 17:51:08 -0800 (PST) Received: from frodo (c-98-38-17-99.hsd1.co.comcast.net. [98.38.17.99]) by smtp.googlemail.com with ESMTPSA id 006d021491bc7-67b9cc1a627sm115245eaf.6.2026.03.05.17.51.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Mar 2026 17:51:08 -0800 (PST) From: Jim Cromie To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: Jim Cromie , Greg Kroah-Hartman , Jiri Slaby , Petr Mladek , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , "Dr. David Alan Gilbert" , Joseph Tilahun , linux-serial@vger.kernel.org Subject: [RFC PATCH 3/7] drivers/tty/serial/serial_core: ratelimit uart_wait_until_sent Date: Thu, 5 Mar 2026 18:50:06 -0700 Message-ID: <20260306015022.1940986-4-jim.cromie@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260306015022.1940986-1-jim.cromie@gmail.com> References: <20260306015022.1940986-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Ratelimiting these pr_debug()s can reduce the console flood during bulk dynamic-debug activation, in environments where a serial console is used. Signed-off-by: Jim Cromie --- drivers/tty/serial/serial_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_c= ore.c index 487756947a96..6db465619c70 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -1790,8 +1790,8 @@ static void uart_wait_until_sent(struct tty_struct *t= ty, int timeout) =20 expire =3D jiffies + timeout; =20 - pr_debug("uart_wait_until_sent(%u), jiffies=3D%lu, expire=3D%lu...\n", - port->line, jiffies, expire); + pr_debug_ratelimited("waiting on (%u) jiffies=3D%lu, expire=3D%lu...\n", + port->line, jiffies, expire); =20 /* * Check whether the transmitter is empty every 'char_time'. --=20 2.53.0 From nobody Thu Apr 9 20:26:02 2026 Received: from mail-oo1-f51.google.com (mail-oo1-f51.google.com [209.85.161.51]) (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 8047B328B5E for ; Fri, 6 Mar 2026 01:51:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772761873; cv=none; b=HTlIcu/3RwVMov7wqAaeif/vZIobdbLeBvY6eDPgvXjcq5lwdW+NOQ2qUEvMiIey7VFiq4XfXEdbJRo5TbgtVLAiUN+Ma+Cx9vIqjwJ7Up4hlp0KE9/Z7ecz8X7MbmnHe1NRFjsHKAAQRngFTHMrTkXNRd0C6kIWHsLJRe9VPZs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772761873; c=relaxed/simple; bh=Ig37ASLNyzhHhw4r8SlCxJbDGQqwH+NxeD6emYA+zJ4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=k4EVW/Q00e+3xCdZ2X1FZQq39oNSMxknMb85BAhNQWHFlRnPqdhLLZL8LwIYwaq0i3Hpqr/0nXrBj9sVfORUGS/dqASrJthz1pYP9rTmUy6MdQkyx+6k2NiQdMWhVkznIczZgVSPNMNCyQOLMTCX8q9qaPtz/tGgfJjG2c06hZ4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=KT6oA333; arc=none smtp.client-ip=209.85.161.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KT6oA333" Received: by mail-oo1-f51.google.com with SMTP id 006d021491bc7-679aebf4e56so5755393eaf.3 for ; Thu, 05 Mar 2026 17:51:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772761870; x=1773366670; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LBdiOYK9OqacwkN82GElrUr530ZKa03hWcr3nX6dVyA=; b=KT6oA3334d9gMaNL/gP78Kod4I4jJniuh7kWLPmA990BGlkLahBEg85hm4gve9bbc2 CLKz5/Y3fSXvyVefZODxVMa9QMQc8cImAQUh93dtE4EuK8l+myYJgFQ/L0XIz9TBD9Xa FWXomgW4dYn5u59lgqLOkQnC25casbFCjwp8z7BVp7nlcOfTL31mLATAdmY/ApId7/nS SqpKDOFK6/ybCXz7efKN68lW6SZ6PJ2uoFWekVcIRqrjcQ4bPHVUcFPUGria3rsgAiSQ fExD+WQrh0tedA/sh90RjENP2QXvLs1tOoRM+h0LEMuQoCB1guhwZWa+B5f0XJ+AG38P ylnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772761870; x=1773366670; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=LBdiOYK9OqacwkN82GElrUr530ZKa03hWcr3nX6dVyA=; b=jmTGwuEep4nyr+MbIt9SgwujgHHyXWsYeO4XcTanS5rTLXAdWAFcRoKFmiXc9ulSkN CrGXwWT/4xl7Mc2q4RIhvuF9dR0WU1W+VAHVBO+Y3nAL1HrAqeqPvXnM1ecUhVtoVjnr zxKJaKglWDlcWhj+SGnAYvkUULgCFQY2fedownJrLxnJGO2bij+F7GpF+wLIsIkXLxpR R/LtY6WKOU6B3hFmf24vgJ0ueFmUe5LzUtTLZLEXjdCKqAbeX6sY9IFdNeemciRJWTuw Yog+W4iwKMEdAhzjF9iKNxnCSliZhLndCAHfoClZ3sfH1GTrzPaZHPKw8uEBeqrNvNbl S6Sw== X-Gm-Message-State: AOJu0YwkQOr/XlHzQs0AF4+hNCLF7YBlyPzMW44WKwQCkhri4dc+P07X NQBjYtLZm66BuJfB2VBTXqZdTZZwDK0/U42VHUKd1dLDuJBTCJgGPbVYhca9H00H X-Gm-Gg: ATEYQzwjE2aXkSpo/MvH7t4xISihQe9Pe7Qv+jobQARAJ9p3hPD1GdHDx5x/Pi800CG Q3RRGkQCS0S/YDbWP8Gyy/YForuKAlKTZ3xe6jSZ+HFl6xcsn0EMmk6GBBsZUOyrWr8l3oWEbqL xH+RkKrNNQ+wFW/E6Fo5hVDyGdhDMji847DLdYW4EpUQ1E+Z6yEttuK2pMIiMIK05HUNRh8EMD0 O0q58EhCMvttff7tpeV8Q0J5H3R34vjvZRlMr0RRIBYlXLulU1bPxZdFurfKWOWpHXuB2dMB3WM zSlZkCIp90IoXIRKL0TiwtPrLS2sKMn0/zV1oqdYvK888ioD4/J9vxAyYOyXYEukU3gTLn5oON0 a8Mz9hIh9leO6wrV/c89iFbyJrANDQgv/0nf9szTUpS11wlTgMJ9KtbOI96l+E6MH7OACkALHJS MbQv3yA+Co5SwVf4YJPE+h/X21S/Ra47pFG8hvST07wxyzEFdx X-Received: by 2002:a05:6820:198e:b0:672:fec8:e61 with SMTP id 006d021491bc7-67b9bcc0fabmr433464eaf.32.1772761870142; Thu, 05 Mar 2026 17:51:10 -0800 (PST) Received: from frodo (c-98-38-17-99.hsd1.co.comcast.net. [98.38.17.99]) by smtp.googlemail.com with ESMTPSA id 006d021491bc7-67b9cc1a627sm115245eaf.6.2026.03.05.17.51.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Mar 2026 17:51:09 -0800 (PST) From: Jim Cromie To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: Jim Cromie , Jason Baron , Peter Zijlstra , Josh Poimboeuf , Thomas Gleixner , Andrew Morton Subject: [RFC PATCH 4/7] dyndbg: use static-key queueing API in dynamic-debug Date: Thu, 5 Mar 2026 18:50:07 -0700 Message-ID: <20260306015022.1940986-5-jim.cromie@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260306015022.1940986-1-jim.cromie@gmail.com> References: <20260306015022.1940986-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the new static-key queueing API in dynamic-debug function _get_cal_count() { # Sum all CPU columns for the 'CAL' (Function call interrupts) line grep CAL /proc/interrupts | awk '{ sum=3D0; for(i=3D2; i /proc/dynamic_debug/control local cal_after=3D$(_get_cal_count) printf "Delta-CAL (IPI): %d\n" "$((cal_after - cal_before))" } Before: #> ddcmdq +p #> ddcmdq -p ... [ 37.165860] virtqueue callback for 000000009e760656 (00000000011de1b1) [ 37.165952] virtiofs virtio0: virtio_fs_vq_done requests.0 [ 37.166119] dyndbg: query 0: "-p" mod:* Delta-CAL (IPI): 16154 After: ... [ 32.189131] dyndbg: batch desc: ffffffff89468028, static_key addr ffff= ffff89468050 (fbcon_startup:1032) [ 32.189225] dyndbg: batch desc: ffffffff89468060, static_key addr ffff= ffff89468088 (acpi_table_parse_entries_array:264) [ 32.189332] dyndbg: batch desc: ffffffff89468098, static_key addr ffff= ffff894680c0 (acpi_table_print_madt_entry:229) Delta-CAL (IPI): 134 Extra context: #> wc /proc/dynamic_debug/control 1903 15092 185427 /proc/dynamic_debug/control #> ddgrep dynamic_debug lib/dynamic_debug.c:386 [dynamic_debug]ddebug_change =3D_ "batch desc: %p= x, static_key addr %px (%s:%d)\n" lib/dynamic_debug.c:397 [dynamic_debug]ddebug_change =3D_ "applied queued= updates to %d sites in total\n" #> dmesg | grep queued [ 26.837520] dyndbg: applied queued updates to 1902 sites in total [ 26.837631] applying 1866 queued jump_labels The baseline has the 2 ratelimited patches cherry-picked in, so both of these numbers include whatever overhead is caused by virtio and dynamic-debugs pr_debug()s. Cc: Jason Baron Cc: Peter Zijlstra Cc: Josh Poimboeuf Cc: Thomas Gleixner Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index aa16782bc93b..e555a8dbdc27 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -371,10 +371,12 @@ static int ddebug_change(const struct ddebug_query *q= uery, struct flag_settings #ifdef CONFIG_JUMP_LABEL if (dp->flags & _DPRINTK_FLAGS_PRINT) { if (!(newflags & _DPRINTK_FLAGS_PRINT)) - static_branch_disable(&dp->key.dd_key_true); + static_branch_disable_queued(&dp->key.dd_key_true); } else if (newflags & _DPRINTK_FLAGS_PRINT) { - static_branch_enable(&dp->key.dd_key_true); + static_branch_enable_queued(&dp->key.dd_key_true); } + pr_debug("batch desc: %px, static_key addr %px (%s:%d)\n", + dp, &dp->key.dd_key_true, dp->function, dp->lineno); #endif v4pr_info("changed %s:%d [%s]%s %s =3D> %s\n", trim_prefix(dp->filename), dp->lineno, @@ -384,6 +386,8 @@ static int ddebug_change(const struct ddebug_query *que= ry, struct flag_settings dp->flags =3D newflags; } } + pr_debug("applied queued updates to %d sites in total\n", nfound); + static_key_apply_queued(); mutex_unlock(&ddebug_lock); =20 return nfound; --=20 2.53.0 From nobody Thu Apr 9 20:26:02 2026 Received: from mail-ot1-f48.google.com (mail-ot1-f48.google.com [209.85.210.48]) (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 9D09C32548B for ; Fri, 6 Mar 2026 01:51:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772761874; cv=none; b=MUB4c3bfkQtxAumE0HjN6R3Apg700/kEa2Jac6xl8tTJf+tH5JAoDGbXVbgCAnX2b8NkNIUveqq6/hYe8Pv3VjrYAKO0gt92jIabQ0DQQQ2oBHXxG3knWrQYdM/MsD9emN3oA2FyOaMsmZ4uW+Rn1b9Zy4kYcAfBP3M1MuH/bp0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772761874; c=relaxed/simple; bh=3DPXpfpOS5nBvd79N+kU/zlbQIi+SS3QcwefZJkYpGg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SHsG8HtDjgG9CiNDErr3WhCaaaBLrnCmz9Bou+e/n2K9XKqQAzX5h4zQTLP9kk8RFcBl7M4wUoB4eEYN0ctEwasJyf71flH2wilxkvBeWnYvp7tr6Holb+1MkjmU/cTmPmtN060K+IK3om9m09vg2IC8MXdt1mjUTYJJ0twL0iU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=GlyC3YM6; arc=none smtp.client-ip=209.85.210.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GlyC3YM6" Received: by mail-ot1-f48.google.com with SMTP id 46e09a7af769-7d4beaf25deso7733395a34.0 for ; Thu, 05 Mar 2026 17:51:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772761871; x=1773366671; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Kg1pvIkGDhzpoqZiSRhgo/PesZkDB1/rihGlwx1MvAg=; b=GlyC3YM6sWJ84Woa0Nio3V2bqrUV6NfRROhsPZrDI6HhFJdTKXGX46KqWuoaxPLEFC Qdil7lhzHhAeIw3qryAYQ9U9S0/P4/IVObOoiM0+NevjuaNU/1Y47Z+TmXmLM4vAmato jgzrKwHUMuyAoomn1IXqclAVrofc7HULK3pnhrika0XR7yCmpwgImJSJuaLpQVU42bJ9 /09lbFAIROGB3cdzp/LAWVUrgFGy0Y1GFT5ANrITNtLBgo2OJcxs4OEB5KeICXicI7MR apl7KuEmuRK732PmXfRcqIoX3N8AVLiK51SRjo9piFINuh8aCwISw/mjFF466iwE2dwC qb5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772761871; x=1773366671; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Kg1pvIkGDhzpoqZiSRhgo/PesZkDB1/rihGlwx1MvAg=; b=X/zG6grK8WecMXZvpA1HKvHovnMPM7MUmf36Tbqxfn0SDed+KKVynKr5yTqZcShxlp n2Wu0g2ScPhlcUu4qoLjd1LXSzNDrEfAOURp6Db3G7Xx6K1vRQSJJWz8GdTzuYm7tZLy ULF5z8wCZqA/JMO+MZYIfT/JxOumqjv7cSenAkO8+dMcKMRwzBPsMOKUaevDWJMT64A/ sRHi6HB14+TQfbjPQGACfpdGnLCD045J4wZyXkI1oVjqrB8S5uMWT/VtemHlKDnrdc93 yuP9mLpByf4+CaSR2fRsxHewLpDjXat/M6CyuPC58nY8KB8jiQedGRVuG83g/heTel8z As5A== X-Gm-Message-State: AOJu0YwqBDeMq0annQ7xiVrB3pqrCkGvA+BM112OZfIiB8nLnCP0PBef 1kG+UkDcu6UOt67gYssBia11mbnTyMlrCxITg0hdBbmDWO651kU493BmekHhceM/ X-Gm-Gg: ATEYQzwf2LnACnbK7I8h7tps5DT3c2pm4DjMKLz6D/Me0G47GGdW7ABfRJn6hL16T0d rVP4gfVUrrgy1CWkTcwwYUZ/1TjxXaEsYKk3BysDFHYUwDUnszFc2hFKGD6O4OBJsky+8V5xV1g 6habbb5mrbF5ft6KPUsIJ7PpiQf93kdE8Mvb6VjuGr5AP9NRBocPby30k3+Orju1/WkTVoBwNiW 1qP2lSeerbHDzYRBUbBWDd6OjtiBcK6WJ31BdRdLCiBbsrMFMH1YQDybewMX6n3c9Xl8G8tAIzw +U8L6HMuQ9381CACWKEoQwig8vu0X4UK9+R8txXUh86kvDJFh8X19sgnrLUADSXk36y3XKACjNh 6AAFgvZlvhZL35yN1P+9IBi6VpbYPxO1zycYnn+mCDBBNu7tLavnip09IuL+g6PTlHqACEKV+Dt ozv62l+drxwRFOHr4qPok3h2O5p27lG7iRVvLPAPDYs+0dVb8m X-Received: by 2002:a05:6820:1521:b0:679:c5f3:b1fe with SMTP id 006d021491bc7-67b9c35cee8mr289127eaf.5.1772761871399; Thu, 05 Mar 2026 17:51:11 -0800 (PST) Received: from frodo (c-98-38-17-99.hsd1.co.comcast.net. [98.38.17.99]) by smtp.googlemail.com with ESMTPSA id 006d021491bc7-67b9cc1a627sm115245eaf.6.2026.03.05.17.51.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Mar 2026 17:51:10 -0800 (PST) From: Jim Cromie To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: Jim Cromie , Jason Baron , Andrew Morton Subject: [RFC PATCH 5/7] dyndbg: hoist static_key_apply_queued up Date: Thu, 5 Mar 2026 18:50:08 -0700 Message-ID: <20260306015022.1940986-6-jim.cromie@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260306015022.1940986-1-jim.cromie@gmail.com> References: <20260306015022.1940986-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- 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 *que= ry, struct flag_settings dp->flags =3D newflags; } } - pr_debug("applied queued updates to %d sites in total\n", nfound); - static_key_apply_queued(); mutex_unlock(&ddebug_lock); =20 return nfound; @@ -719,10 +717,12 @@ static int ddebug_exec_queries(char *query, const cha= r *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; --=20 2.53.0 From nobody Thu Apr 9 20:26:02 2026 Received: from mail-oo1-f48.google.com (mail-oo1-f48.google.com [209.85.161.48]) (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 3DD2830C617 for ; Fri, 6 Mar 2026 01:51:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772761877; cv=none; b=EupM/KFTubquCrTXOyUQtxr1vAvwRTpl2CsQLY4rd2eiwzYql7nBONZUiuSZmTfe2j0rCiiQzKsi+WQS1/JAN/3MLKVKOhRPypldzJyApehZa95pt74r2y9Y8IcgcEgLZS++lVoOqpxRXFMuCmQfzCdd/S98u+cWu/inbE2rbpg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772761877; c=relaxed/simple; bh=SPoeP76Zj5Yh8jMpcnJKmFt0xl803Uq9Fj6qba33IOo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mOHKFZU035WpzW+h8+EJtrBAr4nrKxh0E6C7XKmSZ24Sv9eHvIUf/kW69KFuePRIcrHOAVj+c3TmqBVnM5EbniB8HP/HsRBNwGPV65HELT6PoNelgc5TiBFyFB7SK/Lf0pvQjdBAey2a1rSa1Rhe+446mqNSudTu1WOo0QJZeQw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=UPa/l9xw; arc=none smtp.client-ip=209.85.161.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UPa/l9xw" Received: by mail-oo1-f48.google.com with SMTP id 006d021491bc7-6726f320b54so4969166eaf.1 for ; Thu, 05 Mar 2026 17:51:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772761873; x=1773366673; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bv05xjmvI4rIAw60NQ+tAXnn+K45GBBhYovFXo2xASw=; b=UPa/l9xwlf451qSzsBs3puHPYXBZGz12DMUYKFszuyf+SX9gWAkkyyPWpe9s9dq7Mq xG0aARN5JfYR5fmhwqT3wRX27o8sXddcr7Lq0wE1lnYVgfWmYYTCGp1gtPJ+w/KYxfqX TGY4fFaf0t4QgiANhxx5yOLR3VG9mdSk+zE6HGJCmQQdu7+Rocw3nAdWNsGDMstY4Bmp IbAxdgqQvc/p29IQryQ0oFilhtElXW8T0fR6tWJaDwv8hp2RdrSM/AIDuY/sF/ee49VR j+awvlgcZUIjg1Mj9Y+VUCYYL0vvtsiFc7GOLw3KHt8nppu2cko3beQPeDmEaUSaW1O6 OFYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772761873; x=1773366673; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=bv05xjmvI4rIAw60NQ+tAXnn+K45GBBhYovFXo2xASw=; b=F1y92VzZ0H8i4HxnnAhxv/qv4hHf6mRx0VTDlkBnr0qSdsfTJqGJIJ32dYnMMtZifE IOawGeUl83BoE80vYpTIrkl9MtBKk9oo+xvOVZ2hwRmwbC4xqYqXHgm1MOIpbTXSJQi7 tvUaolyl0tbjNQnxmLJ7pH73Pc3Vu8mwvv/uLK74O1gcD9W1VKhhpBayvV8E1RQovJ/X /4FtTKFdLrIqDKL4tSkdiYYM5k/scrRL6x/QiF68t+mqDPtPTd/QhpjKItHQX/OudIn1 Zz41TDbEQ779y1WYrziPwRn+CVBsiijKRffIhoOxZPywhUHhWIIdBMTOYbraJ38yEt1E GfgQ== X-Gm-Message-State: AOJu0YxO/yVCtgHyHEyLfykkpJdkArj2Q87cD1CeP6+XtLD0eEQXrPvb sUDKQHHA7/sFPfI/7kHNrgYwCAxu0cLmPs4UlhWe7ZSQfTUBCmxWVhmWI0rmeM3z X-Gm-Gg: ATEYQzwoQ/M5YWk9DbeedInBOTphRRk3r/Q5F/Fu16S0/b3I0XS+bsvphPwj2m8c6E0 9xEYHuoLU2+RGzf6sjXn05c/WKjuvRnG33ClFuFnqogvLoilsWnOjJThnMfLPbmKqB595HIqvVd QGo1HDQ1WJoUsmuly0pqirm8PRL/MvnOIfPHID059+nqZIZ0Dt7ntkqUZKUYV3qZw4NQuUIRlQy yohMKwg+w5avZFneaRPQPYdMqpFRSTwmXU98bCwaA2xAAbS2mt7VvraPa1Ksg9JNb4qes3OHe3y IaR1TsLQ2bP2VxmD/zc4FTVvUvs3XMNneOXOCl07fbL3lOykWFuErmcjDvHyVwEqp2R4ZQmwdxe YiZwG2tqXPn9FUH6biiX0xN6aDLcGY+SO6dLm0/yHvD4kz4tH1FElfjNMUeUGOr904y4NNyYutN r+3sNp7y01X8sbFNofweEAmB6hXD7c1swGhhLTpDBLPqk35/nc X-Received: by 2002:a05:6820:4b05:b0:67a:4fe9:a4ba with SMTP id 006d021491bc7-67b9bd49644mr410552eaf.63.1772761872956; Thu, 05 Mar 2026 17:51:12 -0800 (PST) Received: from frodo (c-98-38-17-99.hsd1.co.comcast.net. [98.38.17.99]) by smtp.googlemail.com with ESMTPSA id 006d021491bc7-67b9cc1a627sm115245eaf.6.2026.03.05.17.51.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Mar 2026 17:51:12 -0800 (PST) From: Jim Cromie To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: Jim Cromie , Andrew Morton , Jason Baron Subject: [RFC PATCH 6/7] lib/dynamic_debug: add negation support to queries Date: Thu, 5 Mar 2026 18:50:09 -0700 Message-ID: <20260306015022.1940986-7-jim.cromie@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260306015022.1940986-1-jim.cromie@gmail.com> References: <20260306015022.1940986-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This allow users to invert the selection of any keyword. For example: echo "module !virtio* +p" > /proc/dynamic_debug/control When I test with virtme-ng, this cmd prevents flooding the logs with virtio activity. Its not perfect, because it cannot also avoid flooding from pr_debugs in serial_core or other potential sources. A more robust command is: echo "module !virtio* +p % module serial -p" > /proc/dynamic_debug/control Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 76 +++++++++++++++++++++++++++++++-------------- 1 file changed, 53 insertions(+), 23 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 80fa8d2143e8..a283d12fd64d 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -59,6 +59,10 @@ struct ddebug_query { const char *format; const char *class_string; unsigned int first_lineno, last_lineno; + unsigned int filename_neg:1; + unsigned int module_neg:1; + unsigned int function_neg:1; + unsigned int format_neg:1; }; =20 struct ddebug_iter { @@ -163,11 +167,12 @@ static void vpr_info_dq(const struct ddebug_query *qu= ery, const char *msg) fmtlen--; } =20 - v3pr_info("%s: func=3D\"%s\" file=3D\"%s\" module=3D\"%s\" format=3D\"%.*= s\" lineno=3D%u-%u class=3D%s\n", + v3pr_info("%s: func%s=3D\"%s\" file%s=3D\"%s\" module%s=3D\"%s\" format%s= =3D\"%.*s\" lineno=3D%u-%u class=3D%s\n", msg, - query->function ?: "", - query->filename ?: "", - query->module ?: "", + query->function_neg ? "!" : "", query->function ?: "", + query->filename_neg ? "!" : "", query->filename ?: "", + query->module_neg ? "!" : "", query->module ?: "", + query->format_neg ? "!" : "", fmtlen, query->format ?: "", query->first_lineno, query->last_lineno, query->class_string); } @@ -268,32 +273,34 @@ static bool ddebug_match_desc(const struct ddebug_que= ry *query, int selected_class) { struct _ddebug_class_map *site_map; + bool match; =20 /* match against the source filename */ - if (query->filename && - !match_wildcard(query->filename, dp->filename) && - !match_wildcard(query->filename, - kbasename(dp->filename)) && - !match_wildcard(query->filename, - trim_prefix(dp->filename))) - return false; + if (query->filename) { + match =3D match_wildcard(query->filename, dp->filename) || + match_wildcard(query->filename, kbasename(dp->filename)) || + match_wildcard(query->filename, trim_prefix(dp->filename)); + if (match =3D=3D query->filename_neg) + return false; + } =20 /* match against the function */ - if (query->function && - !match_wildcard(query->function, dp->function)) - return false; + if (query->function) { + match =3D match_wildcard(query->function, dp->function); + if (match =3D=3D query->function_neg) + return false; + } =20 /* match against the format */ if (query->format) { if (*query->format =3D=3D '^') { - char *p; /* anchored search. match must be at beginning */ - p =3D strstr(dp->format, query->format + 1); - if (p !=3D dp->format) - return false; - } else if (!strstr(dp->format, query->format)) { - return false; + match =3D (strstr(dp->format, query->format + 1) =3D=3D dp->format); + } else { + match =3D !!strstr(dp->format, query->format); } + if (match =3D=3D query->format_neg) + return false; } =20 /* match against the line number range */ @@ -345,9 +352,11 @@ static int ddebug_change(const struct ddebug_query *qu= ery, struct flag_settings struct _ddebug_class_map *mods_map; =20 /* match against the module name */ - if (query->module && - !match_wildcard(query->module, di->mod_name)) - continue; + if (query->module) { + bool match =3D match_wildcard(query->module, di->mod_name); + if (match =3D=3D query->module_neg) + continue; + } =20 selected_class =3D _DPRINTK_CLASS_DFLT; if (query->class_string) { @@ -514,6 +523,16 @@ static int parse_linerange(struct ddebug_query *query,= const char *first) return 0; } =20 +static char *check_neg(char *src, unsigned int *neg) +{ + if (*src =3D=3D '!') { + *neg =3D 1; + return src + 1; + } + *neg =3D 0; + return src; +} + static int check_set(const char **dest, char *src, char *name) { int rc =3D 0; @@ -558,10 +577,15 @@ static int ddebug_parse_query(char *words[], int nwor= ds, for (i =3D 0; i < nwords; i +=3D 2) { char *keyword =3D words[i]; char *arg =3D words[i+1]; + unsigned int neg; =20 if (!strcmp(keyword, "func")) { + arg =3D check_neg(arg, &neg); + query->function_neg =3D neg; rc =3D check_set(&query->function, arg, "func"); } else if (!strcmp(keyword, "file")) { + arg =3D check_neg(arg, &neg); + query->filename_neg =3D neg; if (check_set(&query->filename, arg, "file")) return -EINVAL; =20 @@ -572,6 +596,8 @@ static int ddebug_parse_query(char *words[], int nwords, *fline++ =3D '\0'; if (isalpha(*fline) || *fline =3D=3D '*' || *fline =3D=3D '?') { /* take as function name */ + fline =3D check_neg(fline, &neg); + query->function_neg =3D neg; if (check_set(&query->function, fline, "func")) return -EINVAL; } else { @@ -579,11 +605,15 @@ static int ddebug_parse_query(char *words[], int nwor= ds, return -EINVAL; } } else if (!strcmp(keyword, "module")) { + arg =3D check_neg(arg, &neg); + query->module_neg =3D neg; rc =3D check_set(&query->module, arg, "module"); } else if (!strcmp(keyword, "format")) { string_unescape_inplace(arg, UNESCAPE_SPACE | UNESCAPE_OCTAL | UNESCAPE_SPECIAL); + arg =3D check_neg(arg, &neg); + query->format_neg =3D neg; rc =3D check_set(&query->format, arg, "format"); } else if (!strcmp(keyword, "line")) { if (parse_linerange(query, arg)) --=20 2.53.0 From nobody Thu Apr 9 20:26:02 2026 Received: from mail-oo1-f41.google.com (mail-oo1-f41.google.com [209.85.161.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 92FA532548B for ; Fri, 6 Mar 2026 01:51:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772761878; cv=none; b=C4xGR4PTb5aELY/MoSyLMLCe64z5iZzKZKJzYtkGsgi8yQJwNxRGufj8Ng1uKdVyivtH9dhn4Dd8NeRlJv3b0wFM8oWnGMNbah2aaPzOYl7tFj5BluBJYakqZbP8wiRc/YGpl0T660Ws7r4AHq2t7iBDK2nrw4Fy7tK89KNgsVs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772761878; c=relaxed/simple; bh=tcNTyav7JClu5Wv8r77uDiVJ0pTc0RxQAj+RlqLjX8o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DaxxVFohfVE06hp4j0Ck3SmAohZ6SIDnGDz/0RNK+4pZbuqxCVrzvQxLyWZojkMbA8b5BXSKnL1WWWerEq7orKsp859wA16oquc+yAVtrfTsXc20bkihKTmny5qCBBy47xYWpMHNrE7DUr5r7rTY5g4SDuw+Uk3xrEm4BV0msXE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=RPThMdEy; arc=none smtp.client-ip=209.85.161.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RPThMdEy" Received: by mail-oo1-f41.google.com with SMTP id 006d021491bc7-662f9aeb782so6602618eaf.3 for ; Thu, 05 Mar 2026 17:51:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772761874; x=1773366674; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Rjic6E4sYgoKxkNkNG8eG+bbyrYHUHzf7UJjTOVCQkA=; b=RPThMdEyfAVBnSwVFJTGy3QLWLwIbDfIo9KfPZGdF1Fxkknr0njOKrbgEV1bu78xsJ pih2eVbB7/fGnfraLdFOfyLgeR7hyz5ZJhN0n5t3i0j+P9ZP9K54QB2Gp0o5tFErG4kS e4KOpItv0UMMVqqKjxou6TpFvjZl6PFChhIBQAqSfHcQ1Pa8YstxxPnyz2iAQIH89Xkx cj4rZ1O1Xp7Tb0Vg5eN8QTdg5uLt59MYhkAHXRwQw58u3QmnH+LaTn/rvZJ0c66f9jiT uzHJaIY5aWSU5qCzOlJcrTXBzr93qtfPQqVLI5bNTFBHhZOjQOwgoAb4NpntbdRiASjz qxcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772761874; x=1773366674; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Rjic6E4sYgoKxkNkNG8eG+bbyrYHUHzf7UJjTOVCQkA=; b=jkhkppezXRF5AAP4z2MsDkCJaacQBikMzWhrBEq5pvSsZIrrY3rVexM8/SYq7lmFV4 4QF6e1xcp96kSGCMt6hP73O4epwUIHs3hIQBDio5Pl70wQsXNdVkwJ6hYiPaaHVkEvOL +0bdXBVD7tL8LP7v26ZNlGpFfySTFgA8QPkrtdLsJCIlAtcPAIiqC85JGlMQsY0k7WaT +Zr6dt59+30H+2L5DzVRZXcwWGISkTJBL2RHlXSQbnTrjK4xB5j9CPUtM5XG8bm4xvMM ZGJFuNrKokjzD/dpwZ6MrUBrBHdy2chsyqHwtsNR/V9QrKQCcNXhZnNqfGWXr4XtolvH ZekQ== X-Gm-Message-State: AOJu0YyXVsRRQQehrxecgOSsTVB2K8A/WlDyYGAYvq41kHqGA0NheRdP uKCJLYPQn5Pdlbw43pPk3SLqGuIthkFqrWNZvpx1q/VayxOWDYrlZAhE46+ZuZwB X-Gm-Gg: ATEYQzyRVlO/XA+8oEeOCr9KgNencJ7yl+nVvYEymBqD4BZ/dA9sTfMhpALrXO5NuNu kQLx5zuiHtDn0zWDWFc3ftTIrO3gX0t1tIRyb0rjqpc6exe9xsVd23jAMjyzUVsFTuKtAnS3VBs U8ixPrpG4t7fHDTq6ypFBCCCrLEcnYMUtgxv6coMJe14NeSd4SfLHF2viMsNzw6AG/MeovTMUKm aWCQyk5d4QdYvrtORW+PnOZdCygv0NRmsioyewuYqjRPULOsg6jt0MaPXK6WPM25NnUcuEOKyiD R4i35F2Fsv/OWyjPH3Y1aVrLCei+SOMVVm2JEIRGk9Qj+L6z/fm78NKddnF3hvSQuirw5jSeGlm vgdgOIu8qi7/LmtmcHqGQi3TpkIPJqrHa/Z0aIVAnJ+IswFFwN4Rc6TnCnGyO1gGBnsiXVKNaBY Mqz7hg8SN/wUDszoIRTn1bswCYAyHsOcVN5Rtzl7paNgyASDQ6 X-Received: by 2002:a05:6820:3103:b0:663:11b2:d61d with SMTP id 006d021491bc7-67b9bca1e01mr428086eaf.25.1772761874446; Thu, 05 Mar 2026 17:51:14 -0800 (PST) Received: from frodo (c-98-38-17-99.hsd1.co.comcast.net. [98.38.17.99]) by smtp.googlemail.com with ESMTPSA id 006d021491bc7-67b9cc1a627sm115245eaf.6.2026.03.05.17.51.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Mar 2026 17:51:13 -0800 (PST) From: Jim Cromie To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: Jim Cromie , Jason Baron , Shuah Khan , linux-kselftest@vger.kernel.org Subject: [RFC PATCH 7/7] dyndbg-test: test keyword !value negation Date: Thu, 5 Mar 2026 18:50:10 -0700 Message-ID: <20260306015022.1940986-8-jim.cromie@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260306015022.1940986-1-jim.cromie@gmail.com> References: <20260306015022.1940986-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" --- .../dynamic_debug/dyndbg_selftest.sh | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh b/too= ls/testing/selftests/dynamic_debug/dyndbg_selftest.sh index 09937dca3056..5c35d7cc5ecf 100755 --- a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh +++ b/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh @@ -350,12 +350,47 @@ function test_mod_submod { ifrmmod test_dynamic_debug } =20 +function test_negated_keywords { + echo -e "${GREEN}# TEST_NEGATED_KEYWORDS ${NC}" + + # Test 1: Disable negated subset from enabled set + # Enables all 6 in init/main.c, then pulses ONLY those that are NOT ru= n_init_process (the 2 blacklist sites) OFF. + ddcmd =3D_ + ddcmd file init/main.c +p + check_match_ct 'init/main.c:.*=3Dp' 6 -r + ddcmd file init/main.c func !run_init_process -p + # Result: 6 - 2 =3D 4 sites (run_init_process) remain enabled. + check_match_ct 'init/main.c:.*=3Dp' 4 -r + check_match_ct 'run_init_process' 4 -r + + # Test 2: Enable negated subset from clean slate + # Negation !run_init_process should match the 2 blacklist sites. + ddcmd =3D_ + ddcmd file init/main.c func !run_init_process +p + # Verify exactly 2 sites enabled + check_match_ct 'init/main.c:.*=3Dp' 2 -r + check_match_ct 'initcall_blacklist[[:space:]]' 1 -r + check_match_ct 'initcall_blacklisted[[:space:]]' 1 -r + + # Test 3: Enable negated subset with wildcard + # Negation !run_init_* should match the same 2 blacklist sites. + ddcmd =3D_ + ddcmd file init/main.c func !run_init_* +p + # Verify exactly 2 sites enabled + check_match_ct 'init/main.c:.*=3Dp' 2 -r + check_match_ct 'initcall_blacklist[[:space:]]' 1 -r + check_match_ct 'initcall_blacklisted[[:space:]]' 1 -r + + ddcmd =3D_ +} + tests_list=3D( basic_tests # these require test_dynamic_debug*.ko comma_terminator_tests test_percent_splitting test_mod_submod + test_negated_keywords ) =20 # Run tests --=20 2.53.0