2020-01-02 18:02:37

by Borislav Petkov

[permalink] [raw]
Subject: Re: [RFC PATCH] apei/ghes: fix ghes_poll_func by registering in non-deferrable mode

On Tue, Dec 17, 2019 at 11:03:38PM -0800, Bhaskar Upadhaya wrote:
> Currently Linux register ghes_poll_func with TIMER_DEFERRABLE flag,
> because of which it is serviced when the CPU eventually wakes up with a
> subsequent non-deferrable timer and not at the configured polling interval.
>
> For polling mode, the polling interval configured by firmware should not
> be exceeded as per ACPI_6_3 spec[refer Table 18-394],

I see

"Table 18-394 Hardware Error Notification Structure"

where does it say that the interval should not be exceeded and what is
going to happen if it gets exceeded?

IOW, are you fixing something you're observing on some platform or
you're reading the spec only?

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette


2020-01-06 11:05:33

by Bhaskar Upadhaya

[permalink] [raw]
Subject: Re: [RFC PATCH] apei/ghes: fix ghes_poll_func by registering in non-deferrable mode

On Thu, Jan 2, 2020 at 11:31 PM Borislav Petkov <[email protected]> wrote:
>
> On Tue, Dec 17, 2019 at 11:03:38PM -0800, Bhaskar Upadhaya wrote:
> > Currently Linux register ghes_poll_func with TIMER_DEFERRABLE flag,
> > because of which it is serviced when the CPU eventually wakes up with a
> > subsequent non-deferrable timer and not at the configured polling interval.
> >
> > For polling mode, the polling interval configured by firmware should not
> > be exceeded as per ACPI_6_3 spec[refer Table 18-394],
>
> I see
>
> "Table 18-394 Hardware Error Notification Structure"
>
> where does it say that the interval should not be exceeded and what is
> going to happen if it gets exceeded?

Definition of poll interval as per spec (referred ACPI 6.3):
"Indicates the poll interval in milliseconds OSPM should use to
periodically check the error source for the presence of an error
condition."

This indicates OSPM should periodically check error source within poll
interval, but with timer being configured with TIMER_DEFERRABLE, timer
is not called within poll interval limit
>
> IOW, are you fixing something you're observing on some platform or
> you're reading the spec only?

We are observing an issue in our ThunderX2 platforms wherein
ghes_poll_func is not called within poll interval when timer is
configured with TIMER_DEFERRABLE flag(For NO_HZ kernel) and hence we
are losing the error records.
>
> --
> Regards/Gruss,
> Boris.
>
> https://people.kernel.org/tglx/notes-about-netiquette

2020-01-06 13:11:16

by Borislav Petkov

[permalink] [raw]
Subject: Re: [RFC PATCH] apei/ghes: fix ghes_poll_func by registering in non-deferrable mode

On Mon, Jan 06, 2020 at 04:33:19PM +0530, Bhaskar Upadhaya wrote:
> Definition of poll interval as per spec (referred ACPI 6.3):
> "Indicates the poll interval in milliseconds OSPM should use to
> periodically check the error source for the presence of an error
> condition."

Please add that...

> We are observing an issue in our ThunderX2 platforms wherein
> ghes_poll_func is not called within poll interval when timer is
> configured with TIMER_DEFERRABLE flag(For NO_HZ kernel) and hence we
> are losing the error records.

... and that to your commit message then, so that it is crystal clear
*why* you're making this change.

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

2020-01-07 11:04:54

by Bhaskar Upadhaya

[permalink] [raw]
Subject: Re: [RFC PATCH] apei/ghes: fix ghes_poll_func by registering in non-deferrable mode

On Mon, Jan 6, 2020 at 6:39 PM Borislav Petkov <[email protected]> wrote:
>
> On Mon, Jan 06, 2020 at 04:33:19PM +0530, Bhaskar Upadhaya wrote:
> > Definition of poll interval as per spec (referred ACPI 6.3):
> > "Indicates the poll interval in milliseconds OSPM should use to
> > periodically check the error source for the presence of an error
> > condition."
>
> Please add that...
>
> > We are observing an issue in our ThunderX2 platforms wherein
> > ghes_poll_func is not called within poll interval when timer is
> > configured with TIMER_DEFERRABLE flag(For NO_HZ kernel) and hence we
> > are losing the error records.
>
> ... and that to your commit message then, so that it is crystal clear
> *why* you're making this change.

Thanks Borislav, I will edit the commit message with you comments in
the next patch.
Can I get your Ack in the next patch ?

>
> Thx.
>
> --
> Regards/Gruss,
> Boris.
>
> https://people.kernel.org/tglx/notes-about-netiquette

2020-01-07 13:07:23

by Robert Richter

[permalink] [raw]
Subject: Re: [RFC PATCH] apei/ghes: fix ghes_poll_func by registering in non-deferrable mode

On 07.01.20 16:33:24, Bhaskar Upadhaya wrote:
> On Mon, Jan 6, 2020 at 6:39 PM Borislav Petkov <[email protected]> wrote:
> >
> > On Mon, Jan 06, 2020 at 04:33:19PM +0530, Bhaskar Upadhaya wrote:
> > > Definition of poll interval as per spec (referred ACPI 6.3):
> > > "Indicates the poll interval in milliseconds OSPM should use to
> > > periodically check the error source for the presence of an error
> > > condition."
> >
> > Please add that...
> >
> > > We are observing an issue in our ThunderX2 platforms wherein
> > > ghes_poll_func is not called within poll interval when timer is
> > > configured with TIMER_DEFERRABLE flag(For NO_HZ kernel) and hence we
> > > are losing the error records.
> >
> > ... and that to your commit message then, so that it is crystal clear
> > *why* you're making this change.
>
> Thanks Borislav, I will edit the commit message with you comments in
> the next patch.
> Can I get your Ack in the next patch ?

I guess Boris will apply the patch to his tree as maintainer, so no
need to ack it.

-Robert

2020-01-07 20:03:34

by Borislav Petkov

[permalink] [raw]
Subject: Re: [RFC PATCH] apei/ghes: fix ghes_poll_func by registering in non-deferrable mode

On Tue, Jan 07, 2020 at 01:04:29PM +0000, Robert Richter wrote:
> > Thanks Borislav, I will edit the commit message with you comments in
> > the next patch.
> > Can I get your Ack in the next patch ?

Acks are being given when the new version arrives. Look at LKML archives
for examples.

> I guess Boris will apply the patch to his tree as maintainer, so no
> need to ack it.

Nah, apei/ghes stuff goes through Rafael. I'm just a reviewer for the
APEI side.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette