mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: Stehle Vincent-B46079 <B46079@freescale.com>,
	"linux-next@vger.kernel.org" <linux-next@vger.kernel.org>,
	John Stultz <john.stultz@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Mark Rutland <mark.rutland@arm.com>
Subject: Re: next-20130627 breaks i.MX6 sabre sd UART console
Date: Tue, 2 Jul 2013 00:22:25 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.02.1307020016580.4013@ionos.tec.linutronix.de> (raw)
In-Reply-To: <51D1FF40.2030805@codeaurora.org>

On Mon, 1 Jul 2013, Stephen Boyd wrote:
> On 07/01/13 14:24, Thomas Gleixner wrote:
> > On Mon, 1 Jul 2013, Stephen Boyd wrote:
> >> On 07/01/13 13:14, Thomas Gleixner wrote:
> >>> The issue is very subtle. What happens is:
> >>>
> >>> CPU0						CPU1
> >>>
> >>> Switch to oneshot mode
> >>>
> >>>  Copy the bits from tick_broadcast_mask to
> >>>  tick_broadcast_oneshot_mask. We need to do
> >>>  that so the other cpus reach the timer irq
> >>>  and the softirq which switches them to
> >>>  oneshot.
> >>>
> >>>  Kick the broadcast device into oneshot.
> >>>
> >>> 						Timer interrupt fires
> >>> 						
> >>> 						irq_enter sees the cpu in
> >>> 						tick_broadcast_oneshot_mask and
> >>> 						sets the device to oneshot mode
> >>> 						
> >>> 						handle_periodic:
> >>> 						 Sees oneshot mode and adds
> >>> 						 period to
> >>> 						 dev->next_event(KTIME_MAX)
> >>> 			
> >> Yep. It is also racing with the timer interrupt so having more than two
> >> CPUs must help widen the window (which is why we see it on the higher
> >> numbered CPUs).
> > The race above is about the timer interrupt. You mean the broadcast
> > one which is still enabled due to the dummy -> functional transition
> > issue, right? That helps a lot to make this more visible, because we
> > double the number of events.
> 
> I was thinking that tick_check_oneshot_broadcast() is racing with
> tick_switch_to_oneshot() and because we have more CPUs we're more likely
> to have a CPU fix up the handler in tick_switch_to_oneshot() after
> tick_check_oneshot_broadcast() forces that CPU to oneshot mode and the
> periodic handler runs. I wonder if I can reproduce it locally by making
> tick_switch_to_oneshot() spin for a jiffy or two on CPU1.

tick_switch_to_oneshot() is invoked with interrupts disabled, so that
wont help. 


  reply	other threads:[~2013-07-01 22:22 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-27 18:49 Stehle Vincent-B46079
2013-06-28 12:09 ` Thomas Gleixner
2013-06-28 15:57   ` Stephen Boyd
2013-06-28 16:58     ` Stehle Vincent-B46079
2013-06-28 17:06       ` Stephen Boyd
2013-06-29  2:07         ` Stephen Boyd
2013-07-01 10:04           ` Mark Rutland
2013-07-01 10:29           ` Stehle Vincent-B46079
2013-07-01 13:04             ` Thomas Gleixner
2013-07-01 13:22               ` Stehle Vincent-B46079
2013-07-01 17:49                 ` Thomas Gleixner
2013-07-01 19:45                   ` Stehle Vincent-B46079
2013-07-01 19:50                   ` Stephen Boyd
2013-07-01 20:14                     ` Thomas Gleixner
2013-07-01 20:54                       ` Stephen Boyd
2013-07-01 21:24                         ` Thomas Gleixner
2013-07-01 22:14                           ` Stephen Boyd
2013-07-01 22:22                             ` Thomas Gleixner [this message]
2013-07-02  7:18                       ` Stehle Vincent-B46079
2013-07-02 12:31                       ` [tip:timers/core] tick: Prevent uncontrolled switch to oneshot mode tip-bot for Thomas Gleixner
2013-07-02 12:31                       ` [tip:timers/core] tick: Sanitize broadcast control logic tip-bot for 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=alpine.DEB.2.02.1307020016580.4013@ionos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=B46079@freescale.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=sboyd@codeaurora.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®