[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM4PR12MB52639349DF98DB01A3B155EFEEA39@DM4PR12MB5263.namprd12.prod.outlook.com>
Date: Thu, 23 Sep 2021 15:30:55 +0000
From: "Joshi, Mukul" <Mukul.Joshi@....com>
To: "Ghannam, Yazen" <Yazen.Ghannam@....com>
CC: "linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
"x86@...nel.org" <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"bp@...en8.de" <bp@...en8.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"mchehab@...nel.org" <mchehab@...nel.org>,
"amd-gfx@...ts.freedesktop.org" <amd-gfx@...ts.freedesktop.org>
Subject: RE: [PATCHv3 2/2] drm/amdgpu: Register MCE notifier for Aldebaran RAS
[AMD Official Use Only]
> -----Original Message-----
> From: Ghannam, Yazen <Yazen.Ghannam@....com>
> Sent: Thursday, September 23, 2021 10:29 AM
> To: Joshi, Mukul <Mukul.Joshi@....com>
> Cc: linux-edac@...r.kernel.org; x86@...nel.org; linux-kernel@...r.kernel.org;
> bp@...en8.de; mingo@...hat.com; mchehab@...nel.org; amd-
> gfx@...ts.freedesktop.org
> Subject: Re: [PATCHv3 2/2] drm/amdgpu: Register MCE notifier for Aldebaran
> RAS
>
> On Wed, Sep 22, 2021 at 03:36:20PM -0400, Mukul Joshi wrote:
> > On Aldebaran, GPU driver will handle bad page retirement even though
> > UMC is host managed. As a result, register a bad page retirement
> > handler on the mce notifier chain to retire bad pages on Aldebaran.
> >
>
> I think this should state that the driver will do page retirement for GPU-managed
> memory. As written, it implies that the driver do page retirement in general for
> the system.
>
ACK. I will update the description.
> ...
>
> > +
> > +static int amdgpu_bad_page_notifier(struct notifier_block *nb,
> > + unsigned long val, void *data) {
> > + struct mce *m = (struct mce *)data;
> > + struct amdgpu_device *adev = NULL;
> > + uint32_t gpu_id = 0;
> > + uint32_t umc_inst = 0;
> > + uint32_t ch_inst, channel_index = 0;
> > + struct ras_err_data err_data = {0, 0, 0, NULL};
> > + struct eeprom_table_record err_rec;
> > + uint64_t retired_page;
> > +
> > + /*
> > + * If the error was generated in UMC_V2, which belongs to GPU UMCs,
> > + * and error occurred in DramECC (Extended error code = 0) then only
> > + * process the error, else bail out.
> > + */
> > + if (!m || !((smca_get_bank_type(m->bank) == SMCA_UMC_V2) &&
> > + (XEC(m->status, 0x1f) == 0x0)))
>
> The MCA_STATUS[ErrorCodeExt] field is bits [21:16], so the mask should be
> 0x3f.
Ack. Thanks for catching this.
>
> > + return NOTIFY_DONE;
> > +
> > + /*
> > + * If it is correctable error, return.
> > + */
> > + if (mce_is_correctable(m))
> > + return NOTIFY_OK;
>
> Shouldn't this be "NOTIFY_DONE" if "don't care" about this error?
The thinking is we want to stop calling further consumers since it's a correctable error in GPU UMC and we are not taking any action about the correctable errors.
Thanks,
Mukul
>
> Thanks,
> Yazen
Powered by blists - more mailing lists