From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751954AbdJPLMn (ORCPT ); Mon, 16 Oct 2017 07:12:43 -0400 Received: from mx2.suse.de ([195.135.220.15]:57622 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751438AbdJPLMm (ORCPT ); Mon, 16 Oct 2017 07:12:42 -0400 Date: Mon, 16 Oct 2017 13:12:39 +0200 From: Petr Mladek To: Linus Torvalds Cc: Steven Rostedt , LKML , Sergey Senozhatsky , Peter Zijlstra , Andrew Morton , Thomas Gleixner , Ingo Molnar Subject: Re: NMI watchdog dump does not print on hard lockup Message-ID: <20171016111239.GK2795@pathway.suse.cz> References: <20171012121658.187c5af6@gandalf.local.home> <20171013111444.GB2795@pathway.suse.cz> <20171013091857.4afe8a7a@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 2017-10-13 12:12:29, Linus Torvalds wrote: > On Fri, Oct 13, 2017 at 6:18 AM, Steven Rostedt wrote: > > > > Or add the following case: The watchdog triggers, does the print, then > > if it triggers again in a certain amount of time, and the print still > > hasn't been flushed, the flush happens then. Sounds good to me. > By the time 40 sec has passed, I suspect most people have just > rebooted the machine. This might be the case for a desktop. But people might be more conservative in case of big servers or when debugging. These might be desperate to keep going or see something. > I think an NMI watchdog should just force the flush - the same way an > oops should. Deadlocks aren't really relevant if something doesn't get > printed out anyway. We expicititely flush the NMI buffers in panic() when there is not other way to see them. But it is questional in other situations. Sometimes the flush might be the only way to see the messages and sometimes printk() might unnecessarily cause a deadlock. IMHO, the only solution is to make it optional. Best Regards, Petr