From: "Laguna, Lukasz" <lukasz.laguna@intel.com>
To: "Piórkowski, Piotr" <piotr.piorkowski@intel.com>,
intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v1 1/2] drm/xe: Add dbg_ratelimited printk wrappers
Date: Thu, 23 Jul 2026 09:06:09 +0200 [thread overview]
Message-ID: <6d6c04dc-4d01-4fac-b447-93f299149da0@intel.com> (raw)
In-Reply-To: <20260721093116.4011940-2-piotr.piorkowski@intel.com>
On 7/21/2026 11:31, Piórkowski, Piotr wrote:
> From: Piotr Piórkowski <piotr.piorkowski@intel.com>
>
> Add dbg_ratelimited() wrappers for Xe logging helpers.
>
> These wrappers provide a debug logging equivalent of the existing
> rate-limited error messages and allow callers to limit repeated debug
> prints to reduce log spam and makes debugging easier.
>
> Signed-off-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Reviewed-by: Lukasz Laguna <lukasz.laguna@intel.com>
> ---
> drivers/gpu/drm/xe/xe_gt_printk.h | 3 +++
> drivers/gpu/drm/xe/xe_gt_sriov_printk.h | 3 +++
> drivers/gpu/drm/xe/xe_printk.h | 3 +++
> drivers/gpu/drm/xe/xe_sriov_printk.h | 3 +++
> drivers/gpu/drm/xe/xe_tile_printk.h | 3 +++
> drivers/gpu/drm/xe/xe_tile_sriov_printk.h | 3 +++
> 6 files changed, 18 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_gt_printk.h b/drivers/gpu/drm/xe/xe_gt_printk.h
> index 1313d32862db..1598098d2987 100644
> --- a/drivers/gpu/drm/xe/xe_gt_printk.h
> +++ b/drivers/gpu/drm/xe/xe_gt_printk.h
> @@ -35,6 +35,9 @@
> #define xe_gt_dbg(_gt, _fmt, ...) \
> xe_gt_printk((_gt), dbg, _fmt, ##__VA_ARGS__)
>
> +#define xe_gt_dbg_ratelimited(_gt, _fmt, ...) \
> + xe_gt_printk((_gt), dbg_ratelimited, _fmt, ##__VA_ARGS__)
> +
> #define xe_gt_WARN_type(_gt, _type, _condition, _fmt, ...) \
> xe_tile_WARN##_type((_gt)->tile, _condition, _fmt, ## __VA_ARGS__)
>
> diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_printk.h b/drivers/gpu/drm/xe/xe_gt_sriov_printk.h
> index d3457d608db8..ada0ee9f45e5 100644
> --- a/drivers/gpu/drm/xe/xe_gt_sriov_printk.h
> +++ b/drivers/gpu/drm/xe/xe_gt_sriov_printk.h
> @@ -27,6 +27,9 @@
> #define xe_gt_sriov_dbg(_gt, _fmt, ...) \
> __xe_gt_sriov_printk(_gt, dbg, _fmt, ##__VA_ARGS__)
>
> +#define xe_gt_sriov_dbg_ratelimited(_gt, _fmt, ...) \
> + __xe_gt_sriov_printk(_gt, dbg_ratelimited, _fmt, ##__VA_ARGS__)
> +
> /* for low level noisy debug messages */
> #ifdef CONFIG_DRM_XE_DEBUG_SRIOV
> #define xe_gt_sriov_dbg_verbose(_gt, _fmt, ...) xe_gt_sriov_dbg(_gt, _fmt, ##__VA_ARGS__)
> diff --git a/drivers/gpu/drm/xe/xe_printk.h b/drivers/gpu/drm/xe/xe_printk.h
> index c5be2385aa95..87f51d7edfa8 100644
> --- a/drivers/gpu/drm/xe/xe_printk.h
> +++ b/drivers/gpu/drm/xe/xe_printk.h
> @@ -36,6 +36,9 @@
> #define xe_dbg(_xe, _fmt, ...) \
> xe_printk((_xe), dbg, _fmt, ##__VA_ARGS__)
>
> +#define xe_dbg_ratelimited(_xe, _fmt, ...) \
> + xe_printk((_xe), dbg_ratelimited, _fmt, ##__VA_ARGS__)
> +
> #define xe_WARN_type(_xe, _type, _condition, _fmt, ...) \
> drm_WARN##_type(&(_xe)->drm, _condition, _fmt, ## __VA_ARGS__)
>
> diff --git a/drivers/gpu/drm/xe/xe_sriov_printk.h b/drivers/gpu/drm/xe/xe_sriov_printk.h
> index 4c6b5c3d2190..5931c918655f 100644
> --- a/drivers/gpu/drm/xe/xe_sriov_printk.h
> +++ b/drivers/gpu/drm/xe/xe_sriov_printk.h
> @@ -36,6 +36,9 @@
> #define xe_sriov_dbg(xe, fmt, ...) \
> xe_sriov_printk((xe), dbg, fmt, ##__VA_ARGS__)
>
> +#define xe_sriov_dbg_ratelimited(xe, fmt, ...) \
> + xe_sriov_printk((xe), dbg_ratelimited, fmt, ##__VA_ARGS__)
> +
> /* for low level noisy debug messages */
> #ifdef CONFIG_DRM_XE_DEBUG_SRIOV
> #define xe_sriov_dbg_verbose(xe, fmt, ...) xe_sriov_dbg(xe, fmt, ##__VA_ARGS__)
> diff --git a/drivers/gpu/drm/xe/xe_tile_printk.h b/drivers/gpu/drm/xe/xe_tile_printk.h
> index 738433a764bd..c87c07e14fd1 100644
> --- a/drivers/gpu/drm/xe/xe_tile_printk.h
> +++ b/drivers/gpu/drm/xe/xe_tile_printk.h
> @@ -34,6 +34,9 @@
> #define xe_tile_dbg(_tile, _fmt, ...) \
> xe_tile_printk((_tile), dbg, _fmt, ##__VA_ARGS__)
>
> +#define xe_tile_dbg_ratelimited(_tile, _fmt, ...) \
> + xe_tile_printk((_tile), dbg_ratelimited, _fmt, ##__VA_ARGS__)
> +
> #define xe_tile_WARN_type(_tile, _type, _condition, _fmt, ...) \
> xe_WARN##_type((_tile)->xe, _condition, _fmt, ## __VA_ARGS__)
>
> diff --git a/drivers/gpu/drm/xe/xe_tile_sriov_printk.h b/drivers/gpu/drm/xe/xe_tile_sriov_printk.h
> index 68323512872c..c23e698bc8db 100644
> --- a/drivers/gpu/drm/xe/xe_tile_sriov_printk.h
> +++ b/drivers/gpu/drm/xe/xe_tile_sriov_printk.h
> @@ -27,6 +27,9 @@
> #define xe_tile_sriov_dbg(_tile, _fmt, ...) \
> xe_tile_sriov_printk(_tile, dbg, _fmt, ##__VA_ARGS__)
>
> +#define xe_tile_sriov_dbg_ratelimited(_tile, _fmt, ...) \
> + xe_tile_sriov_printk(_tile, dbg_ratelimited, _fmt, ##__VA_ARGS__)
> +
> #define xe_tile_sriov_dbg_verbose(_tile, _fmt, ...) \
> xe_tile_sriov_printk(_tile, dbg_verbose, _fmt, ##__VA_ARGS__)
>
next prev parent reply other threads:[~2026-07-23 7:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 9:31 [PATCH v1 0/2] Reduce MERT debug log spam Piórkowski, Piotr
2026-07-21 9:31 ` [PATCH v1 1/2] drm/xe: Add dbg_ratelimited printk wrappers Piórkowski, Piotr
2026-07-23 7:06 ` Laguna, Lukasz [this message]
2026-07-21 9:31 ` [PATCH v1 2/2] drm/xe/mert: Rate limit VF LMTT fault debug log Piórkowski, Piotr
2026-07-23 7:06 ` Laguna, Lukasz
2026-07-21 9:38 ` ✓ CI.KUnit: success for Reduce MERT debug log spam Patchwork
2026-07-21 10:32 ` ✓ Xe.CI.BAT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6d6c04dc-4d01-4fac-b447-93f299149da0@intel.com \
--to=lukasz.laguna@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=piotr.piorkowski@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox