From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423392AbcB0Dfn (ORCPT ); Fri, 26 Feb 2016 22:35:43 -0500 Received: from mail-pa0-f49.google.com ([209.85.220.49]:34986 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755905AbcB0Dfl (ORCPT ); Fri, 26 Feb 2016 22:35:41 -0500 Date: Sat, 27 Feb 2016 12:33:41 +0900 From: Sergey Senozhatsky To: Sergey Senozhatsky Cc: Petr Mladek , Sergey Senozhatsky , Andrew Morton , Jan Kara , Peter Zijlstra , Steven Rostedt , Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [PATCH] printk/nmi: restore printk_func in nmi_panic Message-ID: <20160227033341.GA396@swordfish> References: <1456457840-1059-1-git-send-email-sergey.senozhatsky@gmail.com> <20160226145717.GZ12548@pathway.suse.cz> <20160227021944.GA1621@swordfish> <20160227030918.GA1240@swordfish> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160227030918.GA1240@swordfish> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (02/27/16 12:09), Sergey Senozhatsky wrote: > On (02/27/16 11:19), Sergey Senozhatsky wrote: > [..] > > > I think about a compromise. We should try to get the messages > > > out only when kdump is not enabled. > > > > can we zap_locks() if we are on nmi_panic()->panic()->console_flush_on_panic() path? > > console_flush_on_panic() is happening after we send out smp_send_stop(). > > can something like this do the trick? hm, no. it can't. I forgot to move printk_nmi_exit() from nmi_panic() to panic(). so it should have been: panic() ... printk_nmi_exit() console_flush_on_panic() __zap_locks() printk_nmi_flush() console_unlock() but this __zap_locks() can _in theory_ race with irq_work->printk_nmi_flush(). so we need something more than this... -ss