From nobody Thu Apr 9 21:51:31 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