linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: naresh kamboju <naresh.kernel@gmail.com>
To: Mathieu Desnoyers <compudj@krystal.dyndns.org>
Cc: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	ltt-dev@lists.casi.polymtl.ca, linux-kernel@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>,
	linux-rt-users@vger.kernel.org
Subject: Re: [ltt-dev] LTTng0.158 Linux-2629-RT kernel BUG: sleeping function  called from invalid context at kernel/rtmutex.c:685
Date: Wed, 17 Feb 2010 16:06:28 +0530	[thread overview]
Message-ID: <f5a7b3811002170236i6c560eadp2de7deb10082db4f@mail.gmail.com> (raw)
In-Reply-To: <20100216170540.GA28039@Krystal>

Hi,

On Tue, Feb 16, 2010 at 10:35 PM, Mathieu Desnoyers
<compudj@krystal.dyndns.org> wrote:
> * 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.

yes. it's seems be a LTTng0.158 problem.
I have tested with below combinations.

2.6.29                        ->no issues
2.6.29+LTTng0.100      ->no issues
2.6.29+LTTng0.158     ->no issues

2.6.29-RT                   ->no issues
2.6.29-RT+LTTng0.100 ->no issues
2.6.29-RT+LTTng0.158 ->BUG reported.

>> >
>> > 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.

Could you give more info regarding, what kind of changes we can work on.
let me also work around on it.

Best regards,
Naresh Kamboju

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

  reply	other threads:[~2010-02-17 10:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-16 15:17 LTTng0.158 Linux-2629-RT kernel BUG: sleeping function called from invalid context at kernel/rtmutex.c:685 naresh kamboju
2010-02-16 16:24 ` Steven Rostedt
2010-02-16 16:30   ` Thomas Gleixner
2010-02-16 16:47     ` [ltt-dev] " Mathieu Desnoyers
2010-02-16 17:01       ` Thomas Gleixner
2010-02-16 17:05         ` Mathieu Desnoyers
2010-02-17 10:36           ` naresh kamboju [this message]
2010-02-17 23:08             ` [ltt-dev] LTTng 0.193 fixes RT kernel support Mathieu Desnoyers
2010-02-22 15:37               ` naresh kamboju
2010-02-23 11:29                 ` naresh kamboju
2010-02-23 12:30                   ` Mathieu Desnoyers
2010-02-23 15:35                     ` naresh kamboju
2010-02-23 15:52                       ` Mathieu Desnoyers
2010-02-24 16:01                         ` naresh kamboju

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=f5a7b3811002170236i6c560eadp2de7deb10082db4f@mail.gmail.com \
    --to=naresh.kernel@gmail.com \
    --cc=compudj@krystal.dyndns.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=ltt-dev@lists.casi.polymtl.ca \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).