Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5109166ybe; Tue, 17 Sep 2019 02:46:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqx4a1jGKpI5OZehG+OPJz1bU2ChGvk39APykxWIOUZPzATyQPF4vI4GQSoZTxYCPQ/n+lHf X-Received: by 2002:a05:6402:17ad:: with SMTP id j13mr3691192edy.212.1568713609294; Tue, 17 Sep 2019 02:46:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568713609; cv=none; d=google.com; s=arc-20160816; b=EXMkYgxJwFE0L6Mfjjckti9K8hWTzN66+pJX4q7ZutFv7XpyNehjhsiPa+aQSq98Fw DVbAa92k5N/3C8jq5N1ajHGGP7VbF3LrC2zH++ppcFPBRauo0nLqzbjG4n+Y2LehTgKG 1ZUVdANRy3gnLXecmUsiQ4UKw+/z3VrKse0uQvDrUKRPVF5hnhybi9vrM5dJwaYq4CFj 7rEEYULwP2sVRcJwnFRR2fmUOSu5WlAhJJnmepuuKfDCjcTpO6ZcarxSkKx+VbxT+n89 v65qJSNTLaxf9ox8zDoME4ZZZHzfCsZUrIya0P2Z/0k8MRPUXN+reGPR84Z8enYMx5cv pMZA== 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; bh=Va1c5Pf+wfoCdjPqYdCXQBSK9Csbs+6YJVEDsgHHqsA=; b=xySb27tMNexaIGslrOtkbfXo39/Iaaa1QTZmm7aUR6NcI3LPSTNx91zH7vnM2lyICl rekWv3exKWnr9C2l42DVrXrDTnIybeJ660GHjWECTjXYjfUi8IVUiEp5KWW5a62F2VbP fl8UQQL/xcJ+nla9bO8UASxfWFOiOzOIJJbf5rU/vizli5pkXFyyOP1D+Pyraf7P9z5D kXbkvxMh+3BOf319kNr43d4rA1uV0GJK4ImpDbkU2lcakIi9OERBBQtryIvr5J2bmagh +2u5RQeHku3hsqu3RuKWdGXzgnPhNbU4yhCAYESKDcWkrw+4F3F+B1+3dpGZ0NsNsbW8 /Ypw== 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 g32si1009301eda.330.2019.09.17.02.46.25; Tue, 17 Sep 2019 02:46:49 -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 S2404696AbfIQILr (ORCPT + 99 others); Tue, 17 Sep 2019 04:11:47 -0400 Received: from mx2.suse.de ([195.135.220.15]:53500 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728802AbfIQILr (ORCPT ); Tue, 17 Sep 2019 04:11:47 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id F180EB11B; Tue, 17 Sep 2019 08:11:44 +0000 (UTC) Date: Tue, 17 Sep 2019 10:11:44 +0200 From: Petr Mladek To: John Ogness Cc: Steven Rostedt , Daniel Vetter , Andrea Parri , Sergey Senozhatsky , Sergey Senozhatsky , Brendan Higgins , Paul Turner , Tetsuo Handa , Peter Zijlstra , Thomas Gleixner , Linus Torvalds , Greg Kroah-Hartman , Theodore Ts'o , Prarit Bhargava , LKML Subject: Re: printk meeting at LPC Message-ID: <20190917081144.g254hccous7haavu@pathway.suse.cz> References: <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> <20190916094314.6053f988@gandalf.local.home> <87r24giac9.fsf@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87r24giac9.fsf@linutronix.de> User-Agent: NeoMutt/20170912 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 2019-09-16 16:28:54, John Ogness wrote: > On 2019-09-16, Steven Rostedt wrote: > >>>> 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? /dev/kmsg is one interface passing dictionary. The other is netconsole. It is the only console with CON_EXTENDED flag set. > > Then journalctl should work as normal. > > > > Or will this break one of our other changes? It just complicates the code because we need to store and read the information separately. > 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. I would double check with Linus that he would consider this as breaking userspace. IMHO, it is perfectly fine to add this support later in separate patch(set) if really necessary. I can't imagine that anyone would depend on this feature when bisecting kernel. We could discuss and handle this later. At least after the merge window. > 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). Interesting idea. I like it if it does not complicate the code too much. Best Regards, Petr