From: sashiko-bot@kernel.org
To: "Mallesh Koujalagi" <mallesh.koujalagi@intel.com>,
intel-xe@lists.freedesktop.org
Subject: Re: [RFC PATCH v1 6/6] drm/xe/guc_ct: Use atomic logging under ct->fast_lock
Date: Thu, 26 Nov 2026 14:10:51 +0000 [thread overview]
Message-ID: <sashiko-outbox-235675@kernel.org> (raw)
In-Reply-To: <20261126135732.2169939-14-mallesh.koujalagi@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] drm/xe/guc_ct: GFP_KERNEL CPER allocation under reclaim-primed
ct->lock
--
commit e4560e278fef133632b212ef80f6300ccc75e51d
Author: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
drm/xe/guc_ct: Use atomic logging under ct->fast_lock
This commit replaces xe_log_err() with xe_log_err_atomic() in several GuC
CT error paths so CPER records are allocated with GFP_ATOMIC instead of
GFP_KERNEL.
> diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
> index 121955ac4abf9..9c96e94b99d03 100644
> --- a/drivers/gpu/drm/xe/xe_guc_ct.c
> +++ b/drivers/gpu/drm/xe/xe_guc_ct.c
> @@ -889,9 +889,9 @@ static bool h2g_has_room(struct xe_guc_ct *ct, u32 cmd_len)
>
> desc_write(xe, h2g, status, desc_status | GUC_CTB_STATUS_OVERFLOW);
>
> - xe_log_err(ct_to_gt(ct), GUC, -EPIPE,
> - "CT: invalid head offset %u >= %u)\n",
> - h2g->info.head, h2g->info.size);
> + xe_log_err_atomic(ct_to_gt(ct), GUC, -EPIPE,
> + "CT: invalid head offset %u >= %u)\n",
> + h2g->info.head, h2g->info.size);
> CT_DEAD(ct, h2g, H2G_HAS_ROOM);
> return false;
> }
[Severity: High]
Should the remaining xe_log_err() calls in xe_guc_ct.c that run under
ct->lock also use xe_log_err_atomic()?
primelockdep() primes ct->lock under fs_reclaim_acquire(GFP_KERNEL):
drivers/gpu/drm/xe/xe_guc_ct.c:primelockdep() {
...
fs_reclaim_acquire(GFP_KERNEL);
might_lock(&ct->lock);
fs_reclaim_release(GFP_KERNEL);
}
While h2g_has_room() is converted here, guc_ct_send_locked(),
guc_handle_crash_dump_msg(), guc_handle_exception_msg(),
parse_g2h_response(), parse_g2h_msg(), and process_g2h_msg() all execute
with ct->lock held and still call xe_log_err(). When has_driver_cper is
enabled, xe_log_err() allocates the CPER record with GFP_KERNEL, which
inverts the fs_reclaim -> ct->lock lock order and can trigger a lockdep
splat or reclaim deadlock under memory pressure.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261126135732.2169939-8-mallesh.koujalagi@intel.com?part=6
prev parent reply other threads:[~2026-11-26 14:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 13:57 [RFC PATCH v1 0/6] drm/xe: Support xe_log_* helpers in atomic context Mallesh Koujalagi
2026-11-26 13:57 ` [RFC PATCH v1 1/6] drm/xe/cper: Software CPER-Do not review Mallesh Koujalagi
2026-11-26 13:57 ` [RFC PATCH v1 2/6] drm/xe/log: Add xe_log_* logging helpers for atomic context Mallesh Koujalagi
2026-11-26 13:57 ` [RFC PATCH v1 3/6] drm/xe/cper: Add gfp argument to xe_cper_emit() Mallesh Koujalagi
2026-11-26 14:13 ` sashiko-bot
2026-11-26 13:57 ` [RFC PATCH v1 4/6] drm/xe/tests: Update log tests for atomic logging support Mallesh Koujalagi
2026-11-26 13:57 ` [RFC PATCH v1 5/6] drm/xe/pagefault: Use xe_log_err_atomic() for queue full errors Mallesh Koujalagi
2026-11-26 13:57 ` [RFC PATCH v1 6/6] drm/xe/guc_ct: Use atomic logging under ct->fast_lock Mallesh Koujalagi
2026-11-26 14:10 ` sashiko-bot [this message]
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=sashiko-outbox-235675@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=mallesh.koujalagi@intel.com \
--cc=sashiko-reviews@lists.linux.dev \
/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