linux-edac.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Bhaskar Upadhaya <bupadhaya@marvell.com>
Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-edac@vger.kernel.org, lenb@kernel.org, rafael@kernel.org,
	gkulkarni@marvell.com, rrichter@marvell.com,
	bhaskar.upadhaya.linux@gmail.com
Subject: Re: [PATCH V2] apei/ghes: fix ghes_poll_func by registering in non-deferrable mode
Date: Thu, 9 Jan 2020 10:50:26 +0100	[thread overview]
Message-ID: <20200109095026.GA5603@zn.tnic> (raw)
In-Reply-To: <1578503858-27853-1-git-send-email-bupadhaya@marvell.com>

On Wed, Jan 08, 2020 at 09:17:38AM -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], So Timer need to
> be configured in non-deferrable mode by removing TIMER_DEFERRABLE flag.
> With NO_HZ enabled and timer callback being configured in non-deferrable
> mode, timer callback will get called exactly after polling interval.
> 
> 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"
> 
> 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.
> 
> Impact of removing TIMER_DEFFERABLE flag
> - With NO_HZ enabled, additional timer ticks and unnecessary wakeups of
>  the cpu happens exactly after polling interval.
> 
> - If polling interval is too small than polling function will be called
>  too frequently which may stall the cpu.

If that becomes a problem, the polling interval setting should be fixed
to filter too small values.

Anyway, I went and streamlined your commit message:

    apei/ghes: Do not delay GHES polling

    Currently, the ghes_poll_func() timer callback is registered with the
    TIMER_DEFERRABLE flag. Thus, it is run when the CPU eventually wakes
    up together with a subsequent non-deferrable timer and not at the precisely
    configured polling interval.

    For polling mode, the polling interval configured by firmware should not
    be exceeded according to the ACPI spec 6.3, Table 18-394. The definition
    of the polling interval is:

    "Indicates the poll interval in milliseconds OSPM should use to
    periodically check the error source for the presence of an error
    condition."

    If this interval is extended due to the timer callback deferring, error
    records can get lost. Which we are observing on our ThunderX2 platforms.

    Therefore, remove the TIMER_DEFERRABLE flag so that the timer callback
    executes at the precise interval.

and made it more readable, hopefully.

Rafael, pls fixup when applying.

With that:

Acked-by: Borislav Petkov <bp@suse.de>

Thx.

-- 
Regards/Gruss,
    Boris.

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

  reply	other threads:[~2020-01-09  9:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-08 17:17 [PATCH V2] apei/ghes: fix ghes_poll_func by registering in non-deferrable mode Bhaskar Upadhaya
2020-01-09  9:50 ` Borislav Petkov [this message]
2020-01-13 10:51   ` Rafael J. Wysocki

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=20200109095026.GA5603@zn.tnic \
    --to=bp@alien8.de \
    --cc=bhaskar.upadhaya.linux@gmail.com \
    --cc=bupadhaya@marvell.com \
    --cc=gkulkarni@marvell.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rrichter@marvell.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;
as well as URLs for NNTP newsgroup(s).