Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757195Ab0BXQBg (ORCPT ); Wed, 24 Feb 2010 11:01:36 -0500 Received: from mail-pw0-f46.google.com ([209.85.160.46]:42885 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757127Ab0BXQBd convert rfc822-to-8bit (ORCPT ); Wed, 24 Feb 2010 11:01:33 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=who2ldKsIT4hQdhVqB67VmwGp2TVqgYf6trF8tg7ekpArOAElK+VrsYKdjsphLiYbS 9ygvSrM86pDiy/YyAN7fEo8AFzJp2Xm9gGYl6cUV8Z2hZOo1AGBUFaKn7AB9Gq+W7uDN NYHSp1paeBCxl3wuqivvmte6BBELrjmy/pfQs= MIME-Version: 1.0 In-Reply-To: <20100223155217.GA7210@Krystal> References: <20100216170540.GA28039@Krystal> <20100217230854.GA25636@Krystal> <20100223123016.GA12857@Krystal> <20100223155217.GA7210@Krystal> Date: Wed, 24 Feb 2010 21:31:32 +0530 Message-ID: Subject: Re: LTTng 0.193 fixes RT kernel support From: naresh kamboju To: Mathieu Desnoyers Cc: linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org, Steven Rostedt , ltt-dev@lists.casi.polymtl.ca, Thomas Gleixner , Ingo Molnar Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4414 Lines: 122 On Tue, Feb 23, 2010 at 9:22 PM, Mathieu Desnoyers wrote: > * naresh kamboju (naresh.kernel@gmail.com) wrote: >> On Tue, Feb 23, 2010 at 6:00 PM, Mathieu Desnoyers >> >> >> >> with out this patch on SMP reported the previous bug as BUG: sleeping >> >> function called from invalid context at kernel/rtmutex.c:685 >> >> >> >> However, i'll investigate. >> > >> > Hrm, we should turn the arch/{arm/mach-omap2,x86/kernel}/trace-clock.c: >> > trace_clock_lock into a mutex, and kernel/trace/trace-clock-32-to-64.c: >> > synthetic_tsc_lock into a mutex too. >> >> I have modified kernel/trace/trace-clock-32-to-64.c spin_lock to >> mutex_lock to all the calls >> >> -static DEFINE_SPINLOCK(synthetic_tsc_lock); >> +static DEFINE_MUTEX(synthetic_tsc_lock); >> >> - ? ? ? spin_lock(&synthetic_tsc_lock); >> + ? ? ? mutex_lock(&synthetic_tsc_lock); >> >> for arch/{arm/mach-omap2/kernel}/trace-clock.c is already modified as >> above from the patch >> omap-trace-clock-fix-mutex.patch >> from LTTng patches 02-Feb-2009. >> this patch was prepared by you to fix >> BUG: sleeping function called from invalid context at kernel/mutex.c:207. >> >> Still reporting same bug at my end :-( >> >> let me try in all possible ways. > Hi Mathieu, > Please note that at the end of 2009, I moved the ARM LTTng omap trace clock to a > neater per-cpu design. yes. i'll review per-cpu related patch and investigating. > So it's possible that the old implementation you use has > problems with the mutex. This could be fixed with the newer implementation. currently i am using lttng-0.158 version patches of course these are OCT-2009. now i'll check the with latest LTTng version patches and changes made in latest repo. > > If you can tell us more about the BUG you get with the mutex-based synthetic tsc > (what the callers are) I could tell you if this problem really goes away in > newer version. As I said previously, i was able to fix this BUG on ARM-UP kernels after your fix patches :-) currently checking the what could the issue making BUG on ARM-SMP, doing workarounds on what are the function calls are differing in the context of smp call which are making delay in spin locks and how the lttng will lookafter timing issues w.r.t to RT kernels when i execute lttng test cases. If you have any inputs regarding lttng vs timers n locking, please welcome :-) FYI of course, it would be difficult to have same env to reproduce this BUG at your end just want to share my analysis report. generic_smp_call_function_single_interrupt ---------- kernel/smp.c | \/ disable_synthetic_tsc_ip ---------------------------------- kernel/trace/trace-clock-32-to-64.c | \/ del_timer ------------------------------------------------- kernel/timer.c | \/ lock_timer_base --------------------------------------- kernel/timer.c | \/ rt_spin_lock --------------------------------kernel/rtmutex.c | \/ __might_sleep ------------------------ kernel/sched.c BUG: sleeping function called from invalid context at kernel/rtmutex.c:685 in_atomic(): 1, irqs_disabled(): 128, pid: 720, name: lttd Backtrace: [] (dump_backtrace+0x0/0x10c) from [] (dump_stack+0x18/0x1c) r7:000002ad r6:c045da78 r5:00001116 r4:c04ba400 [] (dump_stack+0x0/0x1c) from [] (__might_sleep+0x120/0x14c) [] (__might_sleep+0x0/0x14c) from [] (rt_spin_lock+0x38/0x68) r7:ce319d04 r6:c0763660 r5:c05107a0 r4:c05107a0 [] (rt_spin_lock+0x0/0x68) from [] (lock_timer_base+0x30/0x54) r4:c05107a0 [] (lock_timer_base+0x0/0x54) from [] (del_timer+0x2c/0x6c) r8:c0023570 r7:ce319d38 r6:00740000 r5:ceb19ca4 r4:c0763660 [] (del_timer+0x0/0x6c) from [] (disable_synthetic_tsc_ipi+0x24/0x30) r5:ceb19ca4 r4:00000001 [] (disable_synthetic_tsc_ipi+0x0/0x30) from [] (generic_smp_call_function_single_interrupt+0x98/0xf4) [] (generic_smp_call_function_single_interrupt+0x0/0xf4) from [] (do_IPI+0xc8/0x15c) [] (do_IPI+0x0/0x15c) from [] (_text+0xc4/0x128) Thank you. Best regards Naresh Kamboju > > Thanks, > > Mathieu >\ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/