Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2997204ybc; Thu, 21 Nov 2019 01:35:17 -0800 (PST) X-Google-Smtp-Source: APXvYqwb2xR2JV/crIccjYwnFgOPVL3rr6rr8XMv8XcmW/kokFePwG8FmHwBHBCUsM17mUxko4Vi X-Received: by 2002:a17:906:e0c8:: with SMTP id gl8mr12295954ejb.49.1574328917696; Thu, 21 Nov 2019 01:35:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574328917; cv=none; d=google.com; s=arc-20160816; b=0s3LpAUlNCI3/h2W8LTf0vqUcrFKEQwGHC+EFmNzlr8U8H7J/Jo4Pjsq6aHYkH+Vvb h7yCyndqRya8EDKsuivNgIsngZ2LUwyl0XQltZsx/+JyTghqowTY/TCdd9+eG6QiA7j4 km5ceyj+34hDrSBKdiOBC2D1K9xaOUqOx7ej64/tLTCISGXLydgsMtYlxysj/k8uHrw2 89gOwVzWtWPwbH0azanE7MiD0AExyQA9Y21SnF9wnjb3DHXMF02ZhSO6I9/xK5/praU7 ACXGPBzgLi6IJfDk9UlekMe8tiFldu+RbWFU+tWmPAZo3sVEAUHqUoDO4n9IQB/uJdaw cgOw== 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=QKoz9nKPtyCMxERS1a+Xk8AHq0NmfASUKYfABTROy/Y=; b=fHXPXUgfl0py2k/eVHfkbsJHgvEniuBqvzh1tZ7ryvMjwp8lFufvT32CquaZFZLlnl i0GkwsFnBEL3qp7APcoHPKHex19E22DHNPSMBPP4jIbpyjhkyZvwCsbfHgjOyNisUI0N Z0oKNcYRyN2aec2ZbAmd+xA0G5v0TPx0G7w3+/VWq6glDeCW0sDy7U1ltnBcsCBLnPZh GrsDD0hpZjPpfo088v4vl5/wEBlw0Y/OM3QZXKKVkCvuQjRMTel/TR2jHx1AIzAIPk4g El3jaMMqsD+pM1MrCqtl7U4U8ekmPTx5Cr2Zo8z0GplATMelampoaEi1g8CTyy7QQn2e U0EQ== 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 cd10si1344807ejb.424.2019.11.21.01.34.53; Thu, 21 Nov 2019 01:35:17 -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; 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 S1726948AbfKUJdX (ORCPT + 99 others); Thu, 21 Nov 2019 04:33:23 -0500 Received: from mx2.suse.de ([195.135.220.15]:57450 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726563AbfKUJdX (ORCPT ); Thu, 21 Nov 2019 04:33:23 -0500 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 32A5AB11E; Thu, 21 Nov 2019 09:33:21 +0000 (UTC) Date: Thu, 21 Nov 2019 10:33:20 +0100 From: Petr Mladek To: Jonathan Richardson Cc: Sergey Senozhatsky , gregkh@linuxfoundation.org, jslaby@suse.com, sergey.senozhatsky@gmail.com, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Scott Branden , Ray Jui , Srinath Mannam Subject: Re: console output duplicated when registering additional consoles Message-ID: <20191121093320.v6ki2zu2tktcj357@pathway.suse.cz> References: <20191114095737.wl5nvxu3w6p5thfc@pathway.suse.cz> <20191115043356.GA220831@google.com> <20191119003457.GA208047@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Tue 2019-11-19 10:46:22, Jonathan Richardson wrote: > > > not just when a normal con replaces a bootconsole. A simple way of > > > avoiding the problem I'm seeing is to not even set the CON_PRINTBUFFER > > > flag on my consoles. > > > > This is up to the console driver to decide. > > > > > It skips the replay and the output on all consoles looks fine. The flag > > > is only used by register_console(), although I don't think that is the > > > intended usage? There are no console drivers that do this. > > > > Not sure I'm following. There are consoles that want all logbuf messages > > once those consoles are available. > > I meant mine would be the only driver that didn't set CON_PRINTBUFFER. > Thanks for clarifying why it would be set. I guess what I didn't > understand is why are all the consoles updated (potentially) when a > new console is registered. As I mentioned before I can not set > CON_PRINTBUFFER to avoid the issue but it's probably not what I want. > I would possibly lose some of the log I guess if there was something > in the buffer during registration of the new console. Exactly, many things happen before and during the console registration. There might already be (are) several messages when new consoles are registered. Now, people register more different consoles for different purpose. For example, one is shown on a display, another can be stored by an external device. It makes sense to show all messages on all interfaces. It can cause duplicated messages because there is no support to match proper console with the early one. The current console registration code somehow works only with one early console. Best Regards, Petr