Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4669219ybe; Mon, 16 Sep 2019 16:40:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqwiVVyaNcZhPsGrFgXWwJ6B02Elf9xsu6h8fgN+ddn34qZF0+TQBoyn4tOqgx2tANgGbp2C X-Received: by 2002:a17:906:3746:: with SMTP id e6mr2402022ejc.35.1568677238490; Mon, 16 Sep 2019 16:40:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568677238; cv=none; d=google.com; s=arc-20160816; b=yQXZtbBGBUgwUq9bcpA11DXoD867/RS01QsbiUbFEdXZ6z97tDf8HeVuS+kClwl/l9 CBugp2pwIDmguH29M7tZaAuGXcG+fA5V865pVmPSKIG5lnCFHEY2WL1eQNpDJp837YMD CGfKvYTLWQaa5aurv3QQ+6hr6rzLWYm7L7NwldnJxhq+hMq7dwILAEh50lpLxogfapsV JbMr+Vv4tPNmJjtNTCdP65mfJoF9Y79/0fwpNdK+cUyTI81sT+jWLEQpd6JapbYdBqLM KTkl7XFXlwEBgch14crgGq3faAJewX0H92cnCwMPDfnU+iSoYfZLdXn6N+isK2wqIKdz gsqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=idjI6+qoroD49ZPMRf9cqTFxBZqBdHw2/f85Xfadctg=; b=UPyV03wpRcdtCfW3PvU04kmzNK6LDFcAi1wryaxy13EIt8L+aQqNKsrURRTM9e9qzb n0vbSOpJuXL7ChXnwEhHJQKRhWTxAYaWFI2B02+4geMVY1XOcTCX/Ogbj5qTNch7qmWl xUZI0c2G7PS4ianIdo/dQnvm7AzQLkVmjgOhhTiT3E7D1XPX1CWRZAMng6+rqE01Nytp c0n9QJOIUXq1Rr4FD9v1VzILbf9w9HymHr8nZcRjLrk7snyizKdPKwcHqMqbAyFhcZND MWufQpnxkFdt4ulL70gelSVu9M626yz6yypEc8HscKIWDEW6/K4lH8ITZYS4YGtvlCW5 uusg== 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 f1si223680eje.338.2019.09.16.16.40.14; Mon, 16 Sep 2019 16:40:38 -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 S1728257AbfIPO3F (ORCPT + 99 others); Mon, 16 Sep 2019 10:29:05 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:39405 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727934AbfIPO3F (ORCPT ); Mon, 16 Sep 2019 10:29:05 -0400 Received: from localhost ([127.0.0.1] helo=vostro.local) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1i9rzs-0000FQ-OA; Mon, 16 Sep 2019 16:28:56 +0200 From: John Ogness To: Steven Rostedt Cc: Petr Mladek , Tetsuo Handa , 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 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> <20190916094314.6053f988@gandalf.local.home> Date: Mon, 16 Sep 2019 16:28:54 +0200 In-Reply-To: <20190916094314.6053f988@gandalf.local.home> (Steven Rostedt's message of "Mon, 16 Sep 2019 09:43:14 -0400") Message-ID: <87r24giac9.fsf@linutronix.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-09-16, Steven Rostedt 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. Yes, this is what we agreed on. >>>> 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? The consoles will just iterate the ringbuffer. So if any console needs dictionary information, that information needs to be stored in the ringbuffer as well. The dictionary text and message text could be stored as concatenated strings. The descriptor would point separately to the beginning of dictionary and message. So the data-buffer would still be a clean collection of text. But AFAIK Linus didn't want to see that "extra" text at all. If we want to keep dictionary text out of the data-buffer, we could have a 2nd data-buffer dedicated for dictionary text. I expect it would not really complicate things. Especially if the dictionary part was "best effort" (i.e. if the dictionary text does not fit in the free part of its data-buffer, it is dropped). John Ogness