Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2186362imb; Sun, 3 Mar 2019 21:32:10 -0800 (PST) X-Google-Smtp-Source: APXvYqzcHWcE3TbDGxf1vUjnbdZnLr/zHUzxjdUf7NkFqKa0J8NphpC3UzHNXOO8xGI0bQDkXPwC X-Received: by 2002:a62:e80f:: with SMTP id c15mr13383992pfi.33.1551677530624; Sun, 03 Mar 2019 21:32:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551677530; cv=none; d=google.com; s=arc-20160816; b=GQW/HTqe4fyYsS0gyJC8iB4WR1Db+sq17CfMByMfu5cUFu3HkmvJN1HSoeZyHeN8z8 wJ5K3Hy4cRRQnuYjTNDhUIWzjcrcvP98UKju8SdoDdXZqSgQvqqQOF/tNLtqcw6TUGUK 54tDg1ZQ0o2lcbUn4cSUw3IOpA+q3KlcvrqRcroK+CYTE3cex7XTxIRuIp4+637ydInN Mgh8l6yAnV86CFtzt2j4TWnY9Z7rnJTS+wzNDZpf6fwdMW3QH6vsByH/tJWUHKfaKOJB Lq1sQ/yXo4kfV8QnucG6YOCNMHxP3vSSxVvk3iqlP0jsHmFwEmZh3u3Yj5eDbTMTs3eK /hBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=dcw+pYVDabq+pJjV4TQ/WHaj/xJ4FSQRvERVdgBPt0g=; b=S8LZJI31f/cpXs3nat1TyzhzWXJBnegdkVE+t/wP9WiSGqyJxqYtK2IVsvXWIjidVE sjSYBjI5YejAeYYnRM3LNcvxmjdYst7hO9eNgWpG3BBhuVweiVlwEl9khZO2RrVacLbG dcFB/dIYed190cPLV5rc9eP3mxWdsK2zEQug0AeTu/4fRgjlZz/mllPcfWVjZQ4TsIXU dqlOrDWubZnTdI1Pd5Pt9zl48NkhS2fvV9FvwyhanlDGQJ+ncwTxxL8h8JU1y8pCMclW KqMCU5o0jlDynf9f/mmnkaekfAtsDBo8dkPP4Rtu5DRaRunBafMLhijtmatymzTud4XZ IcQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=azRqFbE0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i62si4585520pfc.17.2019.03.03.21.31.54; Sun, 03 Mar 2019 21:32:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=azRqFbE0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726017AbfCDFbg (ORCPT + 99 others); Mon, 4 Mar 2019 00:31:36 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:42426 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725550AbfCDFbf (ORCPT ); Mon, 4 Mar 2019 00:31:35 -0500 Received: by mail-pf1-f194.google.com with SMTP id n74so2137474pfi.9; Sun, 03 Mar 2019 21:31:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=dcw+pYVDabq+pJjV4TQ/WHaj/xJ4FSQRvERVdgBPt0g=; b=azRqFbE0CBnghVCFfGa5xvTBPBaQvzwfGLSDEGP1JGVTznUich5r7FPPNRfeTXkhEB I9oMBDHizV6vV6du7QeecfIiRx3UfrkeJTy3/v88BxWQjU/ZY2JaSqGNOBBwIAdFwvZK 2pBTaZ5FIlShGIq7setwsvtaYypVuT/K1d+w7u/wQW82CHBL//fNMn4sviXejRiaI1Hv 4GBQMcpMkr7/11ygLEXuGyMvlUSr9G/d0oIhN8LrW/riBEdycTIt0rJp4Q2Q9Y4ljXU9 CIdQnUukkHTCk8wVA7JMuRkeGKhA7AdNistPLwVgH6uRcrNAyoPe4pk2UJ/bMmhcswT4 ID2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=dcw+pYVDabq+pJjV4TQ/WHaj/xJ4FSQRvERVdgBPt0g=; b=K0P//tLeORzJZN+N+6RXfJ1EFL45HTvNkFS4bx8XUodtvzm7/65U5k74cQSatc3XRm 2r3fjY0hFhUn64PARpfrKUM880FsYGz3OZiHU0K/hm/BxQL1bkD/dPJTQG8qSz3FIJAA R0qRWsAHaDbz9gosfHrBvw8WAJifPwnnM42hTrVpG8vZn90MLZwRojtZ9c1H/cCyCj+Y 6pkcvorsOFh0V2W9oT2lbV+7T9kVBA9aH/rkMQ3yp3yfF3IfmjQn2X7jHxTkLE5FMwdl VE8CmVSnBpqXMvFK9TkrjjdwNXRJLyQVMKfFzQqNWf5zvfl/b4NrEzTpqyxfBsgzWew0 dCyw== X-Gm-Message-State: APjAAAXr2t7fI17xqJNTPhHRyozvGReHP96T3cvcvQ14N5B73SzOKlvr qbalISvtfh2HZun1BoVEbYQ= X-Received: by 2002:a63:8d42:: with SMTP id z63mr17146639pgd.414.1551677494631; Sun, 03 Mar 2019 21:31:34 -0800 (PST) Received: from localhost ([175.223.38.45]) by smtp.gmail.com with ESMTPSA id w23sm7033664pfn.60.2019.03.03.21.31.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 03 Mar 2019 21:31:33 -0800 (PST) Date: Mon, 4 Mar 2019 14:31:30 +0900 From: Sergey Senozhatsky To: John Ogness Cc: Sergey Senozhatsky , linux-kernel@vger.kernel.org, Peter Zijlstra , Petr Mladek , Steven Rostedt , Daniel Wang , Andrew Morton , Linus Torvalds , Greg Kroah-Hartman , Alan Cox , Jiri Slaby , Peter Feiner , linux-serial@vger.kernel.org, Sergey Senozhatsky Subject: Re: [RFC PATCH v1 00/25] printk: new implementation Message-ID: <20190304053130.GB6648@jagdpanzerIV> References: <20190212143003.48446-1-john.ogness@linutronix.de> <20190213014141.GB8097@jagdpanzerIV> <878syj22r5.fsf@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <878syj22r5.fsf@linutronix.de> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (02/13/19 15:15), John Ogness wrote: > I don't like bust_spinlocks() because drivers end up implementing > oops_in_progress with exactly that... ignoring their own locks. I prefer > consoles are provided with a locking mechanism that they can use to > support a separate NMI-safe write function. My series introduces > console_atomic_lock() for exactly this purpose. > > But this doesn't help here. Here we are talking about a crashing system > that does _not_ have an emergency console. And in this case I would say > messages would be lost (just like they are now if all you have is a vt > console and it was busy). > > I suppose we could keep the current bust_spinlocks() stuff for the > special case that there are no emergency consoles available. It's better > than nothing, but also not really reliable. Preferrably we figure out > how to implement write_atomic for all console drivers. Right. We set console loglevel to verbose before the final panic flush, so flush of all unseen messages (regardless of importance) does look quite reasonable (and this is what panic() has been doing for many years). -ss