Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Mallesh, Koujalagi" <mallesh.koujalagi@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <anshuman.gupta@intel.com>,
	<badal.nilawar@intel.com>, <riana.tauro@intel.com>,
	<karthik.poosa@intel.com>, <sk.anirban@intel.com>,
	<raag.jadav@intel.com>, <himal.prasad.ghimiray@intel.com>,
	<tejas.upadhyay@intel.com>, <aravind.iddamsetty@linux.intel.com>
Subject: Re: [PATCH v1 3/4] drm/xe/ras: Skip reports for repeated DB-ECC errors
Date: Thu, 3 Dec 2026 11:59:01 +0530	[thread overview]
Message-ID: <40ab2ddf-e054-4da6-87ae-296dd94d9a79@intel.com> (raw)
In-Reply-To: <axBhw3UHcIu4IdFb@intel.com>

[-- Attachment #1: Type: text/plain, Size: 4077 bytes --]


On 02-12-2026 11:51 pm, Rodrigo Vivi wrote:
> On Wed, Dec 02, 2026 at 05:27:18PM +0530, Mallesh Koujalagi wrote:
>> DB-ECC errors may be reported repeatedly for pages that firmware has
>> already hard-offlined. These repeated reports are not actionable but
>> still generate log messages and error events.
>>
>> Suppress reporting for such pages to reduce noise. Keep reporting when
>> VRAM page offlining is disabled, as the page remains in use.
>>
>> Cc: Raag Jadav<raag.jadav@intel.com>
>> Cc: Riana Tauro<riana.tauro@intel.com>
>> Cc: Himal Prasad Ghimiray<himal.prasad.ghimiray@intel.com>
>> Cc: Tejas Upadhyay<tejas.upadhyay@intel.com>
>> Signed-off-by: Mallesh Koujalagi<mallesh.koujalagi@intel.com>
>> ---
>>   drivers/gpu/drm/xe/xe_ras.c | 30 ++++++++++++++++++++++++------
>>   1 file changed, 24 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_ras.c b/drivers/gpu/drm/xe/xe_ras.c
>> index fa23325fb691..b92295539499 100644
>> --- a/drivers/gpu/drm/xe/xe_ras.c
>> +++ b/drivers/gpu/drm/xe/xe_ras.c
>> @@ -398,6 +398,22 @@ static bool ras_counter_is_valid(struct xe_device *xe, struct xe_ras_error_class
>>   	return true;
>>   }
>>   
>> +/* Check for a repeated DB-ECC error on an already hard-offlined page */
>> +static bool is_recurrent_db_ecc(struct xe_device *xe, struct xe_ras_error_array *arr)
>> +{
>> +	struct xe_ras_memory_error *info = (void *)arr->details;
>> +
>> +	if (arr->counter.common.component != XE_RAS_COMP_DEVICE_MEMORY ||
>> +	    info->category != XE_RAS_MEMORY_DB_ECC)
>> +		return false;
>> +
>> +	/* Report all errors when page offlining is disabled */
>> +	if (!xe_ras_get_enable_vram_page_offline(xe))
>> +		return false;
>> +
>> +	return page_is_hard_offlined(xe, info->sw_address);
>> +}
>> +
>>   /*
>>    * Fetch and process offline list and queue from firmware via mailbox. @notify_fw controls
>>    * whether firmware is notified of the offline/remove action.
>> @@ -880,13 +896,15 @@ enum xe_ras_recovery_action xe_ras_process_errors(struct xe_device *xe)
>>   			if (!ras_counter_is_valid(xe, &arr->counter))
>>   				continue;
>>   
>> -			xe_info(xe, "[RAS]: %s %s detected\n", comp_to_str(component),
>> -				sev_to_str(severity));
>> +			if (!is_recurrent_db_ecc(xe, arr)) {
>> +				xe_info(xe, "[RAS]: %s %s detected\n", comp_to_str(component),
>> +					sev_to_str(severity));
> hmm...
>
> here we go quiet before we even try to handle the error below...
>
> If the handling then fails, we wedge the device, but userspace never
> got the drm_ras event.
>
> If you think that's fine, just say it in the commit message.
>
> But I think it's simpler to let the memory handler decide, since it's
> the one that knows if things went well. We just need to shift things
> a bit. Then we don't even need the patch 4.
>
> In handle_device_memory_errors(), add a bool *quiet and set it for
> the DB-ECC case:
>
>          recurrent = xe_ras_get_enable_vram_page_offline(xe) &&
>                      page_is_hard_offlined(xe, info->sw_address);
>          ret = handle_page_offline(xe, info->sw_address, true);
>          *quiet = recurrent && !ret;
>
> and skip the CPER when quiet. The recurrent check has to stay before
> handle_page_offline(), since the handling itself can hard-offline the
> page.
>
> Then in xe_ras_process_errors(), move the "detected" log and the event
> from before the switch to after it, and skip them when quiet, with just
> an xe_dbg().
>
> With that, is_recurrent_db_ecc() goes away, and this patch and 4/4
> become one...

Thanks Rodrigo!

I'll make next revision with above changes and remove 
is_recurrent_db_ecc() function as well.

Thanks,

-/Mallesh

>>   
>> -			/* Send event once per component */
>> -			if (!(sent & BIT(component))) {
>> -				sent |= BIT(component);
>> -				ras_send_error_event(xe, severity, component);
>> +				/* Send event once per component */
>> +				if (!(sent & BIT(component))) {
>> +					sent |= BIT(component);
>> +					ras_send_error_event(xe, severity, component);
>> +				}
>>   			}
>>   
>>   			switch (component) {
>> -- 
>> 2.48.1
>>

[-- Attachment #2: Type: text/html, Size: 5204 bytes --]

  reply	other threads:[~2026-12-03  6:29 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 11:57 [PATCH v1 0/4] drm/xe/ras: Suppress repeated DB-ECC reports Mallesh Koujalagi
2026-12-02 11:57 ` [PATCH v1 1/4] drm/xe/ras: Add helper to check hard-offlined pages Mallesh Koujalagi
2026-12-02 13:16   ` Raag Jadav
2026-12-02 13:47     ` Mallesh, Koujalagi
2026-12-02 17:51   ` Rodrigo Vivi
2026-12-03  5:29   ` Tauro, Riana
2026-12-03  6:44     ` Mallesh, Koujalagi
2026-12-02 11:57 ` [PATCH v1 2/4] drm/xe/ras: Downgrade repeated page removal message to debug Mallesh Koujalagi
2026-12-02 17:52   ` Rodrigo Vivi
2026-12-03  5:27   ` Tauro, Riana
2026-12-03  6:53     ` Mallesh, Koujalagi
2026-12-03  7:44       ` Tauro, Riana
2026-12-02 11:57 ` [PATCH v1 3/4] drm/xe/ras: Skip reports for repeated DB-ECC errors Mallesh Koujalagi
2026-12-02 12:08   ` sashiko-bot
2026-12-02 18:21   ` Rodrigo Vivi
2026-12-03  6:29     ` Mallesh, Koujalagi [this message]
2026-12-03  5:28   ` Tauro, Riana
2026-12-03  7:04     ` Mallesh, Koujalagi
2026-12-03  7:38       ` Tauro, Riana
2026-12-02 11:57 ` [PATCH v1 4/4] drm/xe/ras: Avoid duplicate logging for recurrent " Mallesh Koujalagi
2026-12-02 12:06   ` sashiko-bot
2026-12-02 17:53   ` Rodrigo Vivi
2026-12-03  5:33   ` Tauro, Riana
2026-12-03  7:06     ` Mallesh, Koujalagi
2026-12-02 13:36 ` ✓ CI.KUnit: success for drm/xe/ras: Suppress repeated DB-ECC reports Patchwork
2026-12-02 14:08 ` ✓ 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=40ab2ddf-e054-4da6-87ae-296dd94d9a79@intel.com \
    --to=mallesh.koujalagi@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=aravind.iddamsetty@linux.intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=himal.prasad.ghimiray@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=karthik.poosa@intel.com \
    --cc=raag.jadav@intel.com \
    --cc=riana.tauro@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=sk.anirban@intel.com \
    --cc=tejas.upadhyay@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