Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6856790rwb; Tue, 15 Nov 2022 04:46:26 -0800 (PST) X-Google-Smtp-Source: AA0mqf6IR1wZFUdPrH7Yj2QS0VI+895XnpMQTZPChB7c6Bp67QWjN6J8SrqmbPWYooPf3S8wgpr6 X-Received: by 2002:a17:906:2315:b0:7ae:4a7f:3281 with SMTP id l21-20020a170906231500b007ae4a7f3281mr13259658eja.50.1668516386261; Tue, 15 Nov 2022 04:46:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668516386; cv=none; d=google.com; s=arc-20160816; b=Mr5KeGkvdo5GpVv9i44j0lkm71LIIqfKYcGsErGkRYadySRlowswsZz8SBlVeKU2fA X3fVxmE+ns/LSZ4UsXd6M8T5by9G9gbgVqBflHxTZF/WtT3mXnpyVDWuSxZU5HREAS6K kWJnGqyMbi0VkurDl/MLAyHpjCMEwNcVchn0HM4KMkJRpS9woA38iuCqY1dK/Tm8RbaN 9bqgxA2yL4I1vyOZzbP7yNXc6tYAJHDjHMAyje7Q1iOcItY4TjjznYDfqnYSEuwh+WrJ NWGLKJGStkKUNwvqi/G/7la69nbhlyaGRAHYc0E0Gx7QExi65BCf01WaezvRumqftClt d8GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+mTdx5tg8Vlb5kyyqIvIDOY2WmPbB58ejrxB5NVI5nU=; b=lSclOpge/txupI/R2I6rILTa6NCaWGIemOxa7WhBNksD5Iu+N4bBuwi+Kdez80Yblp 7f+UFRceqW9FN0eNoMfUSSBuMk/2M/FiG64G5YE+2z5+os0ljzjD/8h3qqV1U1cM/bUn 0FLbLpIBoIGI7B19tIbeVa0IKM7O0MLXAw4YpKc5zII3ADVyQ816sE1sJpo3e+BxcR0m EZe7SWnsXd+9MhQOOepnIAphlf101t5N3xYNk6hHDEK83VkKZ5CyqMyjWouMrc2UYpHi cZ3w5N4Q/wHDLFzixkwaJ67obljtpq7FwSau/Vcxmt4c2+qD4b6hCs3FEyan+XinwpNg XdqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=OwOe6haA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b9-20020a056402084900b00458b42ff246si3894056edz.236.2022.11.15.04.45.55; Tue, 15 Nov 2022 04:46:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=OwOe6haA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238130AbiKOMFe (ORCPT + 89 others); Tue, 15 Nov 2022 07:05:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229769AbiKOMFT (ORCPT ); Tue, 15 Nov 2022 07:05:19 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92F932A40A for ; Tue, 15 Nov 2022 04:04:09 -0800 (PST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 47F841F8B4; Tue, 15 Nov 2022 12:04:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1668513848; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+mTdx5tg8Vlb5kyyqIvIDOY2WmPbB58ejrxB5NVI5nU=; b=OwOe6haAqMyswC05P6lNgDn5ghV3Sj2mqcfDD54l+/94vbCrSOX6YgbrrBDy+i9h7H6bTQ 6oxGri8m6pjnbd3zVqrefCdkOB7E8BHRzvoAqu5Vn9fHAMrHhN9o/LSPF6nPq5pf4xgyiZ 4iUaJeOp3t/ftXWLtGfccvyv9C7CKeM= Received: from suse.cz (unknown [10.100.208.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 279DD2C143; Tue, 15 Nov 2022 12:04:08 +0000 (UTC) Date: Tue, 15 Nov 2022 13:04:07 +0100 From: Petr Mladek To: John Ogness Cc: Sergey Senozhatsky , Steven Rostedt , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: Re: [PATCH printk v4 05/39] printk: fix setting first seq for consoles Message-ID: References: <20221114162932.141883-1-john.ogness@linutronix.de> <20221114162932.141883-6-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221114162932.141883-6-john.ogness@linutronix.de> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 2022-11-14 17:34:58, John Ogness wrote: > It used to be that all consoles were synchronized with respect to > which message they were printing. After commit a699449bb13b ("printk: > refactor and rework printing logic"), all consoles have their own > @seq for tracking which message they are on. That commit also changed > how the initial sequence number was chosen. Instead of choosing the > next non-printed message, it chose the sequence number of the next > message that will be added to the ringbuffer. > > That change created a possibility that a non-boot console taking over > for a boot console might skip messages if the boot console was behind > and did not have a chance to catch up before being unregistered. > > Since it is not possible to know which boot console a console is > taking over, use the lowest @seq of all the enabled boot consoles. If > no boot consoles are available/enabled, begin with the next message > that will be added to the ringbuffer. > > Also, since boot consoles are meant to be used at boot time, handle > them the same as CON_PRINTBUFFER to ensure that no initial messages > are skipped. > > Signed-off-by: John Ogness Reviewed-by: Petr Mladek Best Regards, Petr