lkml.org 
[lkml]   [2010]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [ltt-dev] LTTng0.158 Linux-2629-RT kernel BUG: sleeping function called from invalid context at kernel/rtmutex.c:685
* Thomas Gleixner (tglx@linutronix.de) wrote:
> On Tue, 16 Feb 2010, Mathieu Desnoyers wrote:
> > > The function is called from an IPI. That's a LTTNG problem, not a RT one.
> >
> > I use del_timer in IPI to delete lttng per-cpu timers on all CPUs. I
> > have to do this because timers created with add_timer_on are documented
> > to be incompatible with del_timer_sync():
> >
> > * Synchronization rules: Callers must prevent restarting of the timer,
> > * otherwise this function is meaningless. It must not be called from
> > * interrupt contexts. The caller must not hold locks which would prevent
> > * completion of the timer's handler. The timer's handler must not call
> > * add_timer_on(). Upon exit the timer is not queued and the handler is
> > * not running on any CPU.
>
> Errm. The documentation says:
>
> "The timer's handler must not call add_timer_on()."
>
> It's not talking about a timer which was initialized with
> add_timer_on().
>
> And your per cpu timer handlers have no requirement to call
> add_timer_on() simply because add/mod_timer() is requeueing the timer
> on the same cpu on which the handler runs.
>
> So the IPI is just a solution for a non existing problem.

Oh, right. Thanks for the explanation. I'll look into moving LTTng to a
saner del_timer_sync() scheme to delete the timers.

Thanks,

Mathieu

>
> Thanks,
>
> tglx
>

--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68


\
 
 \ /
  Last update: 2010-02-16 18:07    [W:0.752 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site