Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp643608ybe; Thu, 19 Sep 2019 01:12:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2rgCV84XfcPzNbu8knk+NO3X+7OHmkQxO58EmeRwP8KtgyLbkXKyoXWHEhX1ePdX33qK1 X-Received: by 2002:a17:907:20a2:: with SMTP id pw2mr12847128ejb.163.1568880741286; Thu, 19 Sep 2019 01:12:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568880741; cv=none; d=google.com; s=arc-20160816; b=HaFwqJK5zTPqHJ+Glqn7SZ0UEoKGKOaqRU0Kgu10/uVOwVIQuy7V87aL7EYP+gw+rb awkGqLfC6KcJI3pLCok7bSZlcKjVWrm0+Nl8dYENc087mOTWjkRVBOpeKp5mTUFAYrmB wDWBMR5uFH6e5vNYprz9uuHYCuHTeSR8oUvpzrrMvuxkm0m5SZiBllHVfGhqyga15PbD 7qCi79RQUiNjDZbSp47WUlFwhlb15PuSNBkFRhU2DmHXM/pkMuUPbCeGbAKRN2lXMTci S+gAdTIhBKi0SWsORpTzR4QdUoPAvI6kLELL6tTWwounD2ZkhZ4pQyM43BfvK3UhOhZ8 E4NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=fIQ+nUg1VdP9bbN5foNZlGVfInuxL+r2SKhzAZwecfY=; b=rLQeqPwrPhSX4iIcYPJC9Ysf3VU9SHTLYPjrINZMc8tjXepZPLamp8r6HVkzx0/LGc bu8nq4o+Wve6G9x0CJSQ1mBLFQxR5g5jiTD20jUzmuxWOidSpztIHHFbvDNY6ahAozGE 2zQzs5vYuJPky7DKjNGOWDR8aNrMtuFSTE2GL0ndHse1VQEOsMwx89ierdveGEv4p3C+ /dzd7YCU3MenGNsPOepLI2gEXj9UDW+keDwZyOEUoe69LrC7LDrgPzsbyU8pcKjxShHN za3FUqUgcZ89w1kzOXSJwmxu4ZjwmHvLXPvEf6OxeNPCIzQVI9/ah+a8iEAddK/rCy23 0FZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=YYyD8I7i; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q30si5101109eda.5.2019.09.19.01.11.57; Thu, 19 Sep 2019 01:12:21 -0700 (PDT) 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=@ffwll.ch header.s=google header.b=YYyD8I7i; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731539AbfISIG6 (ORCPT + 99 others); Thu, 19 Sep 2019 04:06:58 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:33208 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730118AbfISIG5 (ORCPT ); Thu, 19 Sep 2019 04:06:57 -0400 Received: by mail-ot1-f66.google.com with SMTP id g25so2327988otl.0 for ; Thu, 19 Sep 2019 01:06:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fIQ+nUg1VdP9bbN5foNZlGVfInuxL+r2SKhzAZwecfY=; b=YYyD8I7iZQwU6EPYqOIs6pPlhZs8P6Xmfnk3WkQwBOLMQHbZYtPzN4CzwsjVMbLtXw xBXF9wahSO2Ct5eN5cDchW4GEF9kP7P5jIKiE822lMptLelGRXugc8djLAQ6BDihqyP3 rgYF/7uedaefbRJF4axBK4RDxLDq73QW/SGrE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fIQ+nUg1VdP9bbN5foNZlGVfInuxL+r2SKhzAZwecfY=; b=koz4NlaYfL6iPPFUu3Gq7t8xdy5/Ela0KLmKay8PXmce2t/LtQyxnaeIb6TUy/tucx gz1WprS6/qNO8F0tLfMw3Q+hkVfXdPm9+bI3hcPxtduhaC1Sz9JCzCIedot9+Zmz9GzC a9drKwEQp2HeigHdhrG4D98HNx1xdYbATWz8a8OpONJFUUbOs98TB7RXn7ND5tjcMEPZ veDbC6+gTX6gcQM/+CLesekb1muQHgWhTagOfVxAnHuCsLsFe2fyXAMV2Djgxor03LOP jOpagA9MRf9xxyEJMLBDl6NK2QjE9E9wZGkxZmO6ZzMrdIdVIYuATl7rIXL5fiDQe6/N eqHg== X-Gm-Message-State: APjAAAXUjAATbPFB46WLpEMkXRwt40dawwJoNk0Tvc8+y9viWwgiuMFv G3CmXN4qvuBxqTS6MhRHEYTe+3qbxlkaTub3QnvCJg== X-Received: by 2002:a9d:404:: with SMTP id 4mr5965943otc.204.1568880415425; Thu, 19 Sep 2019 01:06:55 -0700 (PDT) MIME-Version: 1.0 References: <20190904123531.GA2369@hirez.programming.kicks-ass.net> <20190905130513.4fru6yvjx73pjx7p@pathway.suse.cz> <20190905143118.GP2349@hirez.programming.kicks-ass.net> <20190905121101.60c78422@oasis.local.home> <87k1acz5rx.fsf@linutronix.de> <20190918012546.GA12090@jagdpanzerIV> <20190917220849.17a1226a@oasis.local.home> <20190918023654.GB15380@jagdpanzerIV> <20190918051933.GA220683@jagdpanzerIV> <87h85anj85.fsf@linutronix.de> In-Reply-To: <87h85anj85.fsf@linutronix.de> From: Daniel Vetter Date: Thu, 19 Sep 2019 10:06:44 +0200 Message-ID: Subject: Re: printk meeting at LPC To: John Ogness Cc: Sergey Senozhatsky , Steven Rostedt , Linus Torvalds , Thomas Gleixner , Peter Zijlstra , Petr Mladek , Andrea Parri , Sergey Senozhatsky , Brendan Higgins , Greg Kroah-Hartman , LKML , "Theodore Ts'o" , Paul Turner , Prarit Bhargava Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 18, 2019 at 9:42 AM John Ogness wrote: > > On 2019-09-18, Sergey Senozhatsky wrote: > >> For instance, tty/sysrq must be able to switch printk emergency > >> on/off. > > > > How did we come up to that _sync() printk() emergency mode (when we > > make sure that there is no active printing kthread)? We had a number > > of cases (complaints) of lost kernel messages. There are scenarios in > > which we cannot offload to async preemptible printing kthread, because > > current control path is, for instance, going to reboot the kernel. In > > sync printk() mode we have some sort (!) of guarantees that when we do > > > > pr_emerg("Restarting system\n"); > > kmsg_dump(KMSG_DUMP_RESTART); > > machine_restart(cmd); > > > > pr_emerg("Restarting system\n") is going to flush logbuf before the > > system will machine_restart(). > > Yes, this was why I asked Daniel how the bsod stuff will be > implemented. We don't want a bsod just because we are > restarting. Perhaps write_atomic() should also have a "reason" argument > like kmsg_dump does. I will keep in touch with Daniel to make sure we > are sync on this. I thought that's why there'll be the oops_in_progress parameter for write_atomic? For the fbcon/graphics side I think we maybe need three levels: - normal console writes with the kthread - write_atomic, but non-destructive: Just directly write into the framebuffer. Might need a serious locking rework in fbcon to make this possible, plus won't work on drivers where the framebuffer is either not statically pinned, or where you need to take additional work to flush the updates out to the display. - bsod, where we attempt an unfriendly takeover of the display with trylocks and just overwrite what's there to display the oops. that one is probably best suited for kmsg_dump. Cheers, Daniel > > It's going to be a bit harder when we have per-console kthread. > > Each console has its own iterator. This iterators will need to advance, > regardless if the message was printed via write() or write_atomic(). > > John Ogness -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch