From: "Guilherme G. Piccoli" <gpiccoli@canonical.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-rtc@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
"H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Alessandro Zummo <a.zummo@towertech.it>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/8] rtc: cmos: Use shared IRQ only for Microsoft Surface 3
Date: Wed, 22 Jan 2020 10:27:18 -0300 [thread overview]
Message-ID: <a4a30d2e-b7eb-0f2e-933d-97f5bb006428@canonical.com> (raw)
In-Reply-To: <20200117175626.56358-1-andriy.shevchenko@linux.intel.com>
On 17/01/2020 14:56, Andy Shevchenko wrote:
> As reported by Guilherme:
>
> The rtc-cmos interrupt setting was changed in the commit 079062b28fb4
> ("rtc: cmos: prevent kernel warning on IRQ flags mismatch") in order
> to allow shared interrupts; according to that commit's description,
> some machine got kernel warnings due to the interrupt line being shared
> between rtc-cmos and other hardware, and rtc-cmos didn't allow IRQ sharing
> that time.
>
> After the aforementioned commit though it was observed a huge increase
> in lost HPET interrupts in some systems, observed through the following
> kernel message:
>
> [...] hpet1: lost 35 rtc interrupts
>
> After investigation, it was narrowed down to the shared interrupts
> usage when having the kernel option "irqpoll" enabled. In this case,
> all IRQ handlers are called for non-timer interrupts, if such handlers
> are setup in shared IRQ lines. The rtc-cmos IRQ handler could be set to
> hpet_rtc_interrupt(), which will produce the kernel "lost interrupts"
> message after doing work - lots of readl/writel to HPET registers, which
> are known to be slow.
>
> This patch changes this behavior by preventing shared interrupts for
> everything, but Microsoft Surface 3 as stated in the culprit commit message.
> Although "irqpoll" is not a default kernel option, it's used in some contexts,
> one being the kdump kernel (which is an already "impaired" kernel usually
> running with 1 CPU available), so the performance burden could be considerable.
> Also, the same issue would happen (in a shorter extent though) when using
> "irqfixup" kernel option.
>
> In a quick experiment, a virtual machine with uptime of 2 minutes produced
>> 300 calls to hpet_rtc_interrupt() when "irqpoll" was set, whereas without
> sharing interrupts this number reduced to 1 interrupt. Machines with more
> hardware than a VM should generate even more unnecessary HPET interrupts
> in this scenario.
>
> Fixes: 079062b28fb4 ("rtc: cmos: prevent kernel warning on IRQ flags mismatch")
> Reported-by: Guilherme G. Piccoli <gpiccoli@canonical.com>
> Suggested-by: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Andy, thanks for the great patch! It works for me, I've tested it on top
of 5.5-rc7, no more RTC lost interrupts while using the "irqpoll"
parameter. So, feel free to add my:
Tested-by: Guilherme G. Piccoli <gpiccoli@canonical.com>
Cheers,
Guilherme
next prev parent reply other threads:[~2020-01-22 13:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-17 17:56 Andy Shevchenko
2020-01-17 17:56 ` [PATCH v1 2/8] x86/platform: Rename x86/apple.h -> x86/machine.h Andy Shevchenko
2020-01-17 17:56 ` [PATCH v1 3/8] x86/quirks: Add missed include to satisfy static checker Andy Shevchenko
2020-01-17 17:56 ` [PATCH v1 4/8] x86/quirks: Convert DMI matching to use a table Andy Shevchenko
2020-01-17 17:56 ` [PATCH v1 5/8] x86/quirks: Add a DMI quirk for Microsoft Surface 3 Andy Shevchenko
2020-01-20 12:09 ` Mark Brown
2020-01-20 12:21 ` Andy Shevchenko
2020-01-17 17:56 ` [PATCH v1 6/8] platform/x86: surface3_wmi: Switch DMI table match to a test of variable Andy Shevchenko
2020-01-17 17:56 ` [PATCH v1 7/8] ASoC: Intel: " Andy Shevchenko
2020-01-17 19:10 ` Pierre-Louis Bossart
2020-01-20 10:17 ` Andy Shevchenko
2020-01-17 17:56 ` [PATCH v1 8/8] rtc: cmos: " Andy Shevchenko
2020-01-22 13:27 ` Guilherme G. Piccoli [this message]
2020-01-22 13:38 ` [PATCH v1 1/8] rtc: cmos: Use shared IRQ only for Microsoft Surface 3 Andy Shevchenko
2020-01-22 13:53 ` Guilherme Piccoli
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=a4a30d2e-b7eb-0f2e-933d-97f5bb006428@canonical.com \
--to=gpiccoli@canonical.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®