From: "Mallesh, Koujalagi" <mallesh.koujalagi@intel.com>
To: "Nilawar, Badal" <badal.nilawar@intel.com>
Cc: <anshuman.gupta@intel.com>, <vinay.belgaumkar@intel.com>,
<riana.tauro@intel.com>, <karthik.poosa@intel.com>,
<sk.anirban@intel.com>, <raag.jadav@intel.com>,
<aravind.iddamsetty@linux.intel.com>,
<jani.nikula@linux.intel.com>,
"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Matthew Brost <matthew.brost@intel.com>
Subject: Re: [PATCH v3 4/6] drm/xe/cper: Make software CPER emission atomic-safe
Date: Wed, 11 Nov 2026 10:29:13 +0530 [thread overview]
Message-ID: <67e73d89-4476-4ecc-a9f8-4d434fada796@intel.com> (raw)
In-Reply-To: <de3b077f-49d4-4c5e-b3fb-dc95279e85a4@intel.com>
On 10-11-2026 08:31 pm, Nilawar, Badal wrote:
>
> On 05-11-2026 14:23, Mallesh Koujalagi wrote:
>> Use GFP_ATOMIC for software CPER records, as software
>> SIGID logging may occur in atomic context.
>>
>> Keep hardware CPER handling unchanged.
>>
>> Cc: Badal Nilawar <badal.nilawar@intel.com>
>> Signed-off-by: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
>> ---
>> v3:
>> - Handle atomic context when SIGIDs are logged. (Sashiko)
>> ---
>> drivers/gpu/drm/xe/xe_cper.c | 10 ++++++----
>> 1 file changed, 6 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_cper.c b/drivers/gpu/drm/xe/xe_cper.c
>> index 9510dcd1754c..8c683e320194 100644
>> --- a/drivers/gpu/drm/xe/xe_cper.c
>> +++ b/drivers/gpu/drm/xe/xe_cper.c
>> @@ -173,7 +173,7 @@ static void cper_init_section_desc(struct
>> xe_device *xe, u8 severity,
>> static void cper_record_emit(struct xe_device *xe, u8 severity,
>> const guid_t *notification_type,
>> const struct xe_cper_intel_hdr *ihdr,
>> - const void *einfo, u32 einfo_len)
>> + const void *einfo, u32 einfo_len, gfp_t gfp)
> May be bool can_sleep or bool atomic?
>> {
>> struct cper_section_descriptor *sdesc;
>> struct xe_cper_nonstd_record *rec;
>> @@ -181,7 +181,7 @@ static void cper_record_emit(struct xe_device
>> *xe, u8 severity,
>> u32 total_len;
>> total_len = sizeof(struct xe_cper_nonstd_record) + einfo_len;
>> - rec = kzalloc(total_len, GFP_KERNEL);
>> + rec = kzalloc(total_len, gfp);
>> if (!rec)
>> return;
>> @@ -228,7 +228,8 @@ void xe_cper_emit_counter(struct xe_device *xe,
>> int cper_sev, enum xe_sigid sigi
>> cper_init_intel_hdr(xe, &error_class, response->timestamp,
>> sigid, response->value, &ihdr);
>> - cper_record_emit(xe, cper_sev, &INTEL_CPER_NOTIFY_GPU_ERROR,
>> &ihdr, NULL, 0);
>> + cper_record_emit(xe, cper_sev, &INTEL_CPER_NOTIFY_GPU_ERROR,
>> &ihdr, NULL, 0,
>> + GFP_KERNEL);
>> }
>> static void cper_emit_hw_err(struct xe_device *xe, int cper_sev,
>> enum xe_sigid sigid,
>> @@ -275,7 +276,8 @@ static void cper_emit_sw_err(struct xe_device
>> *xe, int cper_sev, enum xe_sigid s
>> msg_len = cper_format_sw_msg(vaf, msg, sizeof(msg));
>> cper_init_intel_hdr(xe, &error_class, timestamp, sigid, 1,
>> &ihdr);
>> - cper_record_emit(xe, cper_sev, &INTEL_CPER_NOTIFY_DRV_ERROR,
>> &ihdr, msg, msg_len);
>> + cper_record_emit(xe, cper_sev, &INTEL_CPER_NOTIFY_DRV_ERROR,
>> &ihdr, msg, msg_len,
>> + GFP_ATOMIC | __GFP_NOWARN);
>
> Why __GFP_NOWARN needed here?
If allocation failed in atomic context, it's going to logged in dmesg.
__GFP_NOWARN help to avoid
filling dmesg with additional allocator warning (reduce dmesg noise).
Thanks,
-/Mallesh
>
> Thanks,
> Badal
>
>> }
>> /**
next prev parent reply other threads:[~2026-11-11 4:59 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 8:53 [PATCH v3 0/6] drm/xe/cper: Software (driver-detected) CPER error reporting Mallesh Koujalagi
2026-11-05 8:53 ` [PATCH v3 1/6] drm/xe/cper: Add software CPER emission entry point Mallesh Koujalagi
2026-11-10 13:28 ` Nilawar, Badal
2026-11-10 13:49 ` Mallesh, Koujalagi
2026-11-10 14:58 ` Nilawar, Badal
2026-11-11 8:51 ` Mallesh, Koujalagi
2026-11-05 8:53 ` [PATCH v3 2/6] drm/xe/cper: Prepare CPER headers for software errors Mallesh Koujalagi
2026-11-10 13:55 ` Nilawar, Badal
2026-11-11 10:31 ` Mallesh, Koujalagi
2026-11-05 8:53 ` [PATCH v3 3/6] drm/xe/cper: Emit software CPER records Mallesh Koujalagi
2026-11-10 15:12 ` Nilawar, Badal
2026-11-11 8:20 ` Mallesh, Koujalagi
2026-11-05 8:53 ` [PATCH v3 4/6] drm/xe/cper: Make software CPER emission atomic-safe Mallesh Koujalagi
2026-11-10 15:01 ` Nilawar, Badal
2026-11-11 4:59 ` Mallesh, Koujalagi [this message]
2026-11-05 8:53 ` [PATCH v3 5/6] drm/xe/log: Add software CPER information to KUnit output Mallesh Koujalagi
2026-11-05 8:53 ` [PATCH v3 6/6] drm/xe/log: Test software CPER emission parameters Mallesh Koujalagi
2026-11-05 9:03 ` ✓ CI.KUnit: success for drm/xe/cper: Software (driver-detected) CPER error reporting (rev3) Patchwork
2026-11-05 9:39 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-06 4:19 ` ✗ Xe.CI.FULL: failure " 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=67e73d89-4476-4ecc-a9f8-4d434fada796@intel.com \
--to=mallesh.koujalagi@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=aravind.iddamsetty@linux.intel.com \
--cc=badal.nilawar@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=karthik.poosa@intel.com \
--cc=matthew.brost@intel.com \
--cc=raag.jadav@intel.com \
--cc=riana.tauro@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=sk.anirban@intel.com \
--cc=vinay.belgaumkar@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.