From: Bhaskar Upadhaya <bupadhaya@marvell.com>
To: <linux-kernel@vger.kernel.org>, <linux-acpi@vger.kernel.org>,
<linux-edac@vger.kernel.org>, <lenb@kernel.org>,
<rafael@kernel.org>
Cc: <gkulkarni@marvell.com>, <rrichter@marvell.com>,
<bhaskar.upadhaya.linux@gmail.com>,
Bhaskar Upadhaya <bupadhaya@marvell.com>
Subject: [RFC PATCH] apei/ghes: fix ghes_poll_func by registering in non-deferrable mode
Date: Tue, 17 Dec 2019 23:03:38 -0800 [thread overview]
Message-ID: <1576652618-27017-1-git-send-email-bupadhaya@marvell.com> (raw)
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.
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.
Signed-off-by: Bhaskar Upadhaya <bupadhaya@marvell.com>
---
drivers/acpi/apei/ghes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index 777f6f7122b4..c8f9230f69fb 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -1181,7 +1181,7 @@ static int ghes_probe(struct platform_device *ghes_dev)
switch (generic->notify.type) {
case ACPI_HEST_NOTIFY_POLLED:
- timer_setup(&ghes->timer, ghes_poll_func, TIMER_DEFERRABLE);
+ timer_setup(&ghes->timer, ghes_poll_func, 0);
ghes_add_timer(ghes);
break;
case ACPI_HEST_NOTIFY_EXTERNAL:
--
2.17.1
next reply other threads:[~2019-12-18 7:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-18 7:03 Bhaskar Upadhaya [this message]
2020-01-02 10:49 ` [RFC PATCH] apei/ghes: fix ghes_poll_func by registering in non-deferrable mode Bhaskar Upadhaya
2020-01-02 18:01 ` Borislav Petkov
2020-01-06 11:03 ` Bhaskar Upadhaya
2020-01-06 13:09 ` Borislav Petkov
2020-01-07 11:03 ` Bhaskar Upadhaya
2020-01-07 13:04 ` Robert Richter
2020-01-07 20:02 ` Borislav Petkov
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=1576652618-27017-1-git-send-email-bupadhaya@marvell.com \
--to=bupadhaya@marvell.com \
--cc=bhaskar.upadhaya.linux@gmail.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).