From: Andriy Gapon <avg@FreeBSD.org>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: clockevents_shutdown vs pending interrupt
Date: Tue, 23 Jun 2015 12:56:04 +0300 [thread overview]
Message-ID: <55892D34.7060504@FreeBSD.org> (raw)
Pardon if I am asking something obvious or silly...
tick_check_new_device() has the following code:
if (tick_is_broadcast_device(curdev)) {
clockevents_shutdown(curdev);
curdev = NULL;
}
and
void clockevents_shutdown(struct clock_event_device *dev)
{
clockevents_set_mode(dev, CLOCK_EVT_MODE_SHUTDOWN);
dev->next_event.tv64 = KTIME_MAX;
}
This is all done while interrupts are disabled on the current CPU.
But what if there is already a pending interrupt from the current source?
Is it possible that the timer interrupt would be processed by the device that
was put in the shutdown mode?
Some context: I am experiencing exactly the same symptoms as described here
http://thread.gmane.org/gmane.linux.kernel/1483297. But I run a kernel where
that bug is fixed. And my problem happens in a VM, so it's possible that there
are timing issues which are very unlikely on real hardware.
--
Andriy Gapon
next reply other threads:[~2015-06-23 10:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-23 9:56 Andriy Gapon [this message]
2015-06-23 10:15 ` clockevents_shutdown vs pending interrupt Thomas Gleixner
2015-07-01 9:45 ` Andriy Gapon
2015-07-01 14:57 ` Thomas Gleixner
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=55892D34.7060504@FreeBSD.org \
--to=avg@freebsd.org \
--cc=linux-kernel@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.