Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4443226ybe; Mon, 16 Sep 2019 12:16:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqwsjr17wVx/DzE6YPZlsLxMPAeySY3KEhpuWLM4DJxPodniLAvZLyGpW9pfV0HR36pvdPEu X-Received: by 2002:a17:906:31c6:: with SMTP id f6mr1435288ejf.41.1568661415191; Mon, 16 Sep 2019 12:16:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568661415; cv=none; d=google.com; s=arc-20160816; b=ryn+PecXzXQjmUTbOCocQhslcgYZ4DGx2WYwYWIMWhN1L9UA6wz1SbykgZRpROoLsu ad9kpEWyOS/S/ZwNunSQysmBGTyIDnVJflkMptl4y4q7HBo8vvmM01qxjRzU7XL/ZyeK +geSMpNao1L56dBi3QiKaysY4x+vuRmnM8zUTaT80V0Ul0MD6TzUvm3SsRfqCMWsjhLj /25mvTjUbKeO3z7Lsy3sX6Of9cE7LTwjIR6QWXeRFrz0YZ9UU5ss8prygU+6OTRjm2Wr 96BeoHvCfa3Jcff9lkjBRJmKEllEvcbtjNquw3WKHhZpQNihW1hETgAuqlgQ6S83zq6o gbhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=rMhKTc8z1mOUEPiOCTmixalNHLpE2Fy6afKM0YGPXeA=; b=Jiakd02Rk95/JybC8PblbE0YTnEp+ccBSB3pfUw/jotBMVs/Ne2JqAsdksZUsOqJr8 Grqf5IwEKLEqZrRKxFnVAevbEczA2DVd9amsDVoEBPiPunmAh8IlAn6IizYavKHByiaT I5iAYXPiEi8ftHT5ZqImcN3TsO0sE7TPHiExCi9CJwq43r/d1grxZ7ZnQ08BQDYDHudx naoayTJZrGyGANyU3nZa7eSnXIVOuj1oVyjIe0Ujl9GKfYsByWB9ecc+rOR95Tj/EyUX SqluNYghnwsabNG3GAooWyTij6yfjaeFMfNiMzWRtqfFCmtt+tlMSLpj7sgR2ug4r/Is bVnQ== ARC-Authentication-Results: i=1; mx.google.com; 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 v15si18315942eji.111.2019.09.16.12.16.30; Mon, 16 Sep 2019 12:16:55 -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; 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 S2387981AbfIPNnU (ORCPT + 99 others); Mon, 16 Sep 2019 09:43:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:59850 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387955AbfIPNnS (ORCPT ); Mon, 16 Sep 2019 09:43:18 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 55C0B216C8; Mon, 16 Sep 2019 13:43:16 +0000 (UTC) Date: Mon, 16 Sep 2019 09:43:14 -0400 From: Steven Rostedt To: Petr Mladek Cc: Tetsuo Handa , John Ogness , Daniel Vetter , Andrea Parri , Sergey Senozhatsky , Sergey Senozhatsky , Brendan Higgins , Paul Turner , Peter Zijlstra , Thomas Gleixner , Linus Torvalds , Greg Kroah-Hartman , Theodore Ts'o , Prarit Bhargava , LKML Subject: Re: printk meeting at LPC Message-ID: <20190916094314.6053f988@gandalf.local.home> In-Reply-To: <20190916104624.n3jh363z37ah2kxa@pathway.suse.cz> References: <20190807222634.1723-1-john.ogness@linutronix.de> <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> <20190916104624.n3jh363z37ah2kxa@pathway.suse.cz> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 16 Sep 2019 12:46:24 +0200 Petr Mladek wrote: > On Mon 2019-09-16 13:30:17, Tetsuo Handa wrote: > > On 2019/09/13 22:26, John Ogness wrote: > > > 6. A new may-sleep function pr_flush() will be made available to wait > > > for all previously printk'd messages to be output on all consoles before > > > proceeding. For example: > > > > > > pr_cont("Running test ABC... "); > > > pr_flush(); > > > > > > do_test(); > > > > > > pr_cont("PASSED\n"); > > > pr_flush(); > > > > Don't we need to allow printk() callers to know the sequence number which > > the printk() has queued? Something like > > > > u64 seq; > > pr_info(...); > > pr_info(...); > > pr_info(...); > > seq = pr_current_seq(); > > pr_wait_seq(seq); > > > > in case concurrently executed printk() flooding keeps adding a lot of > > pending output? > > My expectation is that pr_flush() would wait only until the current > message appears on all consoles. It will not wait for messages that > would get added later. Right, I believe we agreed that pr_flush() would take care of all this. > > > > By the way, do we need to keep printk() return bytes like printf() ? > > Maybe we can make printk() return "void", for almost nobody can do > > meaningful things with the return value. > > It is true that I have never seen anyone checking the return value. > On the other hand, it is a minor detail. And I would prefer to stay > compatible with the userland printf() as much as possible. I understand your wanting to keep compatibility with printf(), but I would suggest that we only do so if it doesn't complicate any of the design. I'm actually leaning on recommending that we remove the return value, to prevent there becoming a dependency on it. I don't see any reason to have the "number of bytes processed" as the return value being useful within the kernel. > > > > > 9. Support for printk dictionaries will be discontinued. I will look > > > into who is using this and why. If printk dictionaries are important for > > > you, speak up now! > > > > I think that dev_printk() is using "const char *dict, size_t dictlen," part > > via create_syslog_header(). Some userspace programs might depend on > > availability of such information. > > Yeah, but it seems to be the only dictionary writer. There were doubts > (during the meeting) whether anyone was actually using the information. > > Hmm, it seems that journalctl is able to filer device specific > information, for example, I get: > > $> journalctl _KERNEL_DEVICE=+usb:2-1 > -- Logs begin at Tue 2019-08-13 09:00:03 CEST, end at Mon 2019-09-16 12:32:58 CEST. -- > Aug 13 09:00:04 linux-qszd kernel: usb 2-1: new high-speed USB device number 2 using ehci-pci > > One question is if anyone is using this filtering. Simple grep is > enough. Another question is whether it really needs to get passed > this way. > If worse comes to worse, perhaps we let the console decide what to do with it. Where all consoles but the "kmsg" one ignores it? Then journalctl should work as normal. Or will this break one of our other changes? -- Steve