From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932559AbcBAVI5 (ORCPT ); Mon, 1 Feb 2016 16:08:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43644 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932158AbcBAVIz (ORCPT ); Mon, 1 Feb 2016 16:08:55 -0500 Date: Mon, 1 Feb 2016 16:08:46 -0500 From: Don Zickus To: Jeffrey Merkey Cc: akpm@linux-foundation.org, atomlin@redhat.com, cmetcalf@ezchip.com, fweisbec@gmail.com, hidehiro.kawai.ez@hitachi.com, linux-kernel@vger.kernel.org, mhocko@suse.cz, tj@kernel.org, uobergfe@redhat.com Subject: Re: [PATCH v2 4/4] Add WARN() function call to hard-soft lockup Message-ID: <20160201210846.GC26637@redhat.com> References: <1454359527-23219-1-git-send-email-jeffmerkey@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1454359527-23219-1-git-send-email-jeffmerkey@gmail.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 01, 2016 at 01:45:27PM -0700, Jeffrey Merkey wrote: > This patch series adds config options which can be set during compile to > direct the compiler to output a breakpoint instruction anywhere a BUG_XX() > or WARN_XX() macro has been placed in the kernel to trigger the system to > enter a debugger if a bug is detected by the system. Use of this compile > time option also allows conditional breakpoints to be set in the kernel > where these macros have been previously placed. > > This addition is extremely useful for debugging hard and soft lockups > real time and quickly from a console debugger, and other areas of the > kernel. > > Signed-off-by: Jeffrey Merkey > --- > kernel/watchdog.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/kernel/watchdog.c b/kernel/watchdog.c > index b3ace6e..af07a83 100644 > --- a/kernel/watchdog.c > +++ b/kernel/watchdog.c > @@ -358,6 +358,8 @@ static void watchdog_overflow_callback(struct perf_event *event, > else > dump_stack(); > > + WARN(1, "Watchdog detected hard LOCKUP on cpu %d", this_cpu); > + So we repeat the same exact print message and dump the same stack again as we do a few lines above? That doesn't make any sense. Cheers, Don > /* > * Perform all-CPU dump only once to avoid multiple hardlockups > * generating interleaving traces > @@ -478,6 +480,9 @@ static enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer) > else > dump_stack(); > > + WARN(1, "Watchdog detected soft LOCKUP on cpu %d", > + smp_processor_id()); > + > if (softlockup_all_cpu_backtrace) { > /* Avoid generating two back traces for current > * given that one is already made above > -- > 1.8.3.1 >