Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753834AbbBTIKL (ORCPT ); Fri, 20 Feb 2015 03:10:11 -0500 Received: from mail-wi0-f176.google.com ([209.85.212.176]:41941 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751332AbbBTIKJ (ORCPT ); Fri, 20 Feb 2015 03:10:09 -0500 Date: Fri, 20 Feb 2015 09:10:03 +0100 From: Ingo Molnar To: Adrien Schildknecht Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, rostedt@goodmis.org, heukelum@fastmail.fm, luto@amacapital.net, adech.fo@gmail.com, masami.hiramatsu.pt@hitachi.com, akpm@linux-foundation.org, a.ryabinin@samsung.com, fruggeri@arista.com, bp@alien8.de, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] x86: fix output of show_stack_log_lvl() Message-ID: <20150220081003.GA20216@gmail.com> References: <1424385796-28910-1-git-send-email-adrien+dev@schischi.me> <1424399661-20327-1-git-send-email-adrien+dev@schischi.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1424399661-20327-1-git-send-email-adrien+dev@schischi.me> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1952 Lines: 62 * Adrien Schildknecht wrote: > show_stack_log_lvl() does not set the log level after a new line, > the following messages printed with pr_cont are thus assigned to the > default log level. > This patch prepends the log level to the next message following a new > line. > > print_trace_address() uses printk(log_lvl). Using printk with just > a log level is ignored and thus has no effect on the next pr_cont. > We need to prepend the log level directly into the message. This approach looks good to me, we want to print multi-line messages with the same consistent loglevel. Totally unrelated observation: > +++ b/arch/x86/kernel/dumpstack.c > touch_nmi_watchdog(); > + printk_stack_address(addr, reliable, data); The whole code is sprinkled with touch_nmi_watchdog() calls. Shouldn't we simply make it a rule that if a printk message makes it to a real console (as opposed to the log buffer only), it should imply a touch_nmi_watchdog()? Then all of those crappy touch_nmi_watchdog() calls could be removed here and in other places where long printk streams may happen. Totally unrelated observation #2: > if (kstack_end(stack)) > break; > - if (i && ((i % STACKSLOTS_PER_LINE) == 0)) > - pr_cont("\n"); > +++ b/arch/x86/kernel/dumpstack_64.c > if (((long) stack & (THREAD_SIZE-1)) == 0) > break; > } > - if (i && ((i % STACKSLOTS_PER_LINE) == 0)) > - pr_cont("\n"); Looks like kstack_end() could be defined on 64-bit as well, unifying the stack printing logic some more? ( I'd no go so far as to unify the two functions, but the closer to each other the better it is to make changes that affect both of them. ) Thanks, Ingo -- 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/