From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 1F2482C for ; Tue, 19 Jul 2016 08:23:21 +0000 (UTC) Received: from mail-pa0-f65.google.com (mail-pa0-f65.google.com [209.85.220.65]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id BF5C08D for ; Tue, 19 Jul 2016 08:23:20 +0000 (UTC) Received: by mail-pa0-f65.google.com with SMTP id ez1so904801pab.3 for ; Tue, 19 Jul 2016 01:23:20 -0700 (PDT) Date: Tue, 19 Jul 2016 17:23:20 +0900 From: Sergey Senozhatsky To: Hannes Reinecke Message-ID: <20160719082320.GD24189@swordfish> References: <20160719034717.GA24189@swordfish> <535ebaec-1653-3077-d17b-feb847fd51d2@suse.com> <20160719073346.GB24189@swordfish> <9794ced1-3c45-c548-9520-15d1b66aef31@suse.com> <20160719074631.GC24189@swordfish> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: ksummit-discuss@lists.linuxfoundation.org Subject: Re: [Ksummit-discuss] [TECH TOPIC] asynchronous printk List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On (07/19/16 10:02), Hannes Reinecke wrote: [..] > > so why would the system die before we console_unlock()? > > > Errm. > Because it doesn't have any other chance? > Like, hard lockup? > Power down? > Hardware dead? ah, ok. so mostly for the reasons outside of printk/panic code. hard lockup, case. hm, I think nmi_panic() is still going to call panic() at some point. so we have chances to flush log_buf messages. power down or h/w failure, however, can't be fixed up neither by sync nor by async printk. well, we can't help here. the thing that really can stop us from flushing the messages is the fact that console driver may be in some unknown state. for example, have some internal locks owned by non-panic CPU, which we IPI_STOP-ed before console_flush_on_panic(). console drivers are normally unaware of the fact that the system is in panic now. so some sort of console->write_on_panic(), or console->reset() would probably be helpful, but that's a bit different topic. -ss