From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755302AbYLWITT (ORCPT ); Tue, 23 Dec 2008 03:19:19 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751432AbYLWITJ (ORCPT ); Tue, 23 Dec 2008 03:19:09 -0500 Received: from mx2.mail.elte.hu ([157.181.151.9]:43498 "EHLO mx2.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751335AbYLWITI (ORCPT ); Tue, 23 Dec 2008 03:19:08 -0500 Date: Tue, 23 Dec 2008 09:18:55 +0100 From: Ingo Molnar To: Frederic Weisbecker Cc: Steven Rostedt , Linux Kernel Subject: Re: [PATCH] tracing/function-graph-tracer: strip ending newlines on comments Message-ID: <20081223081855.GA6009@elte.hu> References: <494FD967.2000002@gmail.com> <20081223064804.GA24956@elte.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081223064804.GA24956@elte.hu> User-Agent: Mutt/1.5.18 (2008-05-17) X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.3 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org btw., ftrace_printk() is not NMI safe: x BUG: spinlock recursion on CPU#1, loop_yield/3360 lock: ffffffff807a0c60, .magic: dead4ead, .owner: loop_yield/3360, .owner_cpu: 1 Pid: 3360, comm: loop_yield Not tainted 2.6.28-rc9-tip #48 Call Trace: [] spin_bug+0xa2/0xaa [] _raw_spin_lock+0x42/0x134 [] _spin_lock_irqsave+0x44/0x50 [] ? trace_vprintk+0x8e/0x164 [] ? _spin_unlock_irqrestore+0x3d/0x4c [] trace_vprintk+0x8e/0x164 [] ? __hw_perf_counter_set_period+0x1ed/0x280 [] __ftrace_printk+0x55/0x57 [] __hw_perf_counter_set_period+0x213/0x280 [] __smp_perf_counter_interrupt+0x21c/0x3c2 [] perf_counter_nmi_handler+0x35/0x3f [] notifier_call_chain+0x5e/0x92 [] __atomic_notifier_call_chain+0x5e/0x87 [] ? __atomic_notifier_call_chain+0x0/0x87 [] atomic_notifier_call_chain+0xf/0x11 [] notify_die+0x2e/0x30 [] do_nmi+0x9f/0x25f [] nmi+0x1a/0x2c [] ? __rb_reserve_next+0x4b/0x3c8 [] ? __rb_reserve_next+0x124/0x3c8 <> [] rb_reserve_next_event+0x1a7/0x307 [] ring_buffer_lock_reserve+0x8b/0xd3 [] trace_vprintk+0xd5/0x164 [] ? trace_hardirqs_on_caller+0xfd/0x138 [] ? __perf_counter_remove_from_context+0x60/0x179 [] __ftrace_printk+0x55/0x57 [] ? pmc_generic_disable+0x266/0x279 [] __perf_counter_remove_from_context+0x8e/0x179 [] generic_smp_call_function_single_interrupt+0x87/0xc0 [] smp_call_function_single_interrupt+0x24/0x34 [] call_function_single_interrupt+0x13/0x20 caused by: spin_lock_irqsave(&trace_buf_lock, irq_flags); which locking is necessiated by: static DEFINE_SPINLOCK(trace_buf_lock); static char trace_buf[TRACE_BUF_SIZE]; i think this should be changed to a PER_CPU data structure - and if an NMI context mixes up the buffer, that's not a big issue. (i'd not complicate it by using a NMI specific buffer) Ingo