From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753246AbdDGEor (ORCPT ); Fri, 7 Apr 2017 00:44:47 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:36086 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752254AbdDGEoo (ORCPT ); Fri, 7 Apr 2017 00:44:44 -0400 Date: Fri, 7 Apr 2017 13:44:40 +0900 From: Sergey Senozhatsky To: Pavel Machek Cc: Jan Kara , "Eric W. Biederman" , Sergey Senozhatsky , Ye Xiaolong , Sergey Senozhatsky , Steven Rostedt , Petr Mladek , Andrew Morton , Linus Torvalds , Peter Zijlstra , "Rafael J . Wysocki" , Greg Kroah-Hartman , Jiri Slaby , Len Brown , linux-kernel@vger.kernel.org, lkp@01.org Subject: Re: [printk] fbc14616f4: BUG:kernel_reboot-without-warning_in_test_stage Message-ID: <20170407044334.GA487@jagdpanzerIV.localdomain> References: <20170329092511.3958-9-sergey.senozhatsky@gmail.com> <20170330213829.GA21476@inn.lkp.intel.com> <20170331023506.GB3493@jagdpanzerIV.localdomain> <20170331040438.GA366@jagdpanzerIV.localdomain> <20170331063913.GE20961@yexl-desktop> <20170331144730.GA10578@tigerII.localdomain> <87a881v52o.fsf@xmission.com> <20170403093152.GB15168@quack2.suse.cz> <20170406173306.GD10363@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170406173306.GD10363@amd> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On (04/06/17 19:33), Pavel Machek wrote: > > This patch set gives up part of the printk() reliability for bounded > > latency (at least unless we detect we are really in trouble) which is IMHO > > a good trade-off for lots of users (and others can just turn this feature > > off). > > If they can ever realize they were bitten by this feature. > > Can we go for different tradeoff? > > In console_unlock(), if you detect too much work, print "Too many > messages to print, %d bytes delayed" and wake up kernel thread. "too many messages" is undefined. console_unlock() can be called from IRQ handler or with preemtion disabled, or under spin_lock, or under RCU read lock, etc. etc. By the time we decide to wake up printk_kthread from console_unlock() it may be already too late. besides, this does not really address any of the concerns you have pointed out in other emails. we might be unable to wake_up printk_kthread (because there is a misbehaving higher prio process, or because the scheduler is misbehaving, etc. etc.) so the "emergency mode" is still here and still requires special handling. -ss