lkml.org 
[lkml]   [2014]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: BUG: spinlock trylock failure on UP, i.MX28 3.12.15-rt25
On Fri, 2 May 2014, Thomas Gleixner wrote:
> On Fri, 2 May 2014, Sebastian Andrzej Siewior wrote:
> > * Steven Rostedt | 2014-04-22 14:16:50 [-0400]:
> > > /*
> > > * Called by the local, per-CPU timer interrupt on SMP.
> > > */
> > >@@ -1467,7 +1473,7 @@ void run_local_timers(void)
> > > return;
> > > }
> > >
> > >- if (!spin_do_trylock(&base->lock)) {
> > >+ if (timer_should_raise_softirq(&base->lock)) {
> > > raise_softirq(TIMER_SOFTIRQ);
> > > return;
> > > }
> >
> > Okay. So Peter said that it is okay to apply this since FULL_NO_HZ users
> > wouldn't complain on UP. I still wouldn't say it is broken but that is a
> > different story.
> > We have two users of this trylock. run_local_timers() which pops up
> > quite often (and you patched here) and the other is
> > get_next_timer_interrupt(). What do you suggest we do here? It is
> > basically the same thing.
>
> It's different as it CANNOT fail on UP. That's called from the idle
> code and there is no way that anything holds that lock on UP when idle
> runs.

So yeah, you are right, that it's called from irq_exit() so it needs
an annotation at least. Maybe it's really cleaner to make it #if SMP
as well just for clarity raisins.

Thanks,

tglx


\
 
 \ /
  Last update: 2014-05-02 21:41    [W:0.091 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site