From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932470AbbFWKP7 (ORCPT ); Tue, 23 Jun 2015 06:15:59 -0400 Received: from www.linutronix.de ([62.245.132.108]:39731 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753370AbbFWKPw (ORCPT ); Tue, 23 Jun 2015 06:15:52 -0400 Date: Tue, 23 Jun 2015 12:15:52 +0200 (CEST) From: Thomas Gleixner To: Andriy Gapon cc: "linux-kernel@vger.kernel.org" Subject: Re: clockevents_shutdown vs pending interrupt In-Reply-To: <55892D34.7060504@FreeBSD.org> Message-ID: References: <55892D34.7060504@FreeBSD.org> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 23 Jun 2015, Andriy Gapon wrote: > 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. Can you provide a full dmesg please? Thanks, tglx