🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #7568

Re: [PATCH RFC 0/2] netconsole: allow replaying the printk buffer on demand

#7568
From: John Ogness
Date: Mon, 26 Oct 2026 16:33
41 lines
11482 bytes
On 2026-10-26, Petr Mladek <pmladek@suse.com> wrote:
> The "replay" approach looks like a big hammer. Many messages might get
> duplicated, especially when the outage was small.
>
> A better solution might be to do not increment con->nbcon_seq
> when the transmission failed. And try it later again.

Note that there was a time during the rework that we used to allow the
console to return failure but decided it was too complicated [0].

The kthreads are setup to stay in their printing loop until the backlog
is clear. Having a nice=-20 task busy-loop would be bad.

> con->write_thread() currently does not return anything. I believe that
> it is partly a historical limit. Two problems come to my mind:
>
>    1. There used to be a global "console_seq" counter which was common
>       for all console drivers. But we have a per-console counter since
>       the commit a699449bb13b70b8bd1 ("printk: refactor and rework
>       printing logic").
>
>    2. There has never been a try-later logic. But is should be easier
>       to add it now. We have the kthreads. And even the legacy loop
>       is able to break when there is not progress.

I suppose for only the write_thread() callback we could implement some
sort of throttled retry if the console driver reports failure. But this
is assuming console drivers can even detect if it successfully sent or
not. The netconsole certainly has no method to _know_ if the UDP packet
was received. And UARTs (asside from flow-control) also have no way to
confirm that the other side received the data.

Breno and Sam simply want the user to trigger a replay of the full
log. Essentially a sysrq-R but per-console. I think that is a reasonable
request and certainly much easier than attempting some sort of
transmission guarantee.

John

[0] https://lore.kernel.org/lkml/ZdTCZqhZww8_WgSU@alley
Technical Details
Message-ID: <87zew0ifpp.fsf@jogness.linutronix.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351998-linux-kernel-netdev=dewy.ru
References: <20261024-netcons-replay-upstream-v1-0-9613f38496e5@gmail.com> <87fqxskdpl.fsf@jogness.linutronix.de> <at84qygscue8crQi@gmail.com> <87a4o0k3qa.fsf@jogness.linutronix.de> <at9qgBucVm-QHnye@pathway.suse.cz>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351998-linux-kernel-netdev=dewy.ru
From: john.ogness@linutronix.de (John Ogness)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH RFC 0/2] netconsole: allow replaying the printk buffer
 on demand
Date: Mon, 26 Oct 2026 17:39:54 +0106
Organization: Usenet Network
Message-ID: <87zew0ifpp.fsf@jogness.linutronix.de>
References: <20261024-netcons-replay-upstream-v1-0-9613f38496e5@gmail.com>
 <87fqxskdpl.fsf@jogness.linutronix.de> <at84qygscue8crQi@gmail.com>
 <87a4o0k3qa.fsf@jogness.linutronix.de> <at9qgBucVm-QHnye@pathway.suse.cz>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: usenet.network;
	logging-data="1350155"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:5bOmuDe5S2vibCbCdkOMl/lOCCQ= sha256:ZL4EUswNSkSixsFDJhbgXvsMnzFzuZDqRSH9uPQeNrM=
	sha1:rVbXKQ6UwDy5c7jgx0ykV1ypQ4k= sha256:ql0322ZPUAZEedvRIqFoS6xDeXY/h5CRPejlHaEGU58=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 26A94125BAF; Mon, 26 Oct 2026 19:39:55 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.417
X-Spam-Status: No, score=-2.417 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
	INVALID_DATE_TZ_ABSURD=0.632, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
	URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=linutronix.de header.b=wt7EV5RW; dkim=neutral
	reason="invalid (unsupported algorithm ed25519-sha256)"
	header.d=linutronix.de header.b=3bleRp7v
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id NERJuT5SdXGj;
	Mon, 26 Oct 2026 19:39:50 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-351998-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linutronix.de
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 5DBBB125BAE; Mon, 26 Oct 2026 19:39:36 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 9B8CB29E3C; Mon, 26 Oct 2026 16:34:14 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793032454;
	b=1laz8vBGMZ5e0wSNPMDGgBvFCMcTX0dCfBBozttjZuMhpGw1+mir+z+YcnNAyCjdN2TM
	 mNY2OM6zwnqWTIMhFJPa2K0TodqHbeU3JWh/7PpH7K9lViz7H+d+mx1pFaqF6zSpLpzde
	 n6qE6kI8qPIZ7xIebADnDz6JAPT4oZHz5nevfR/6Al+SbaZF+HXeoPNzt8neLZ8NAC0Z3
	 E/V+drL5SqjoByP62nFshryS70QRRfLIH6ryaxGFX/hfa1zdpgzl0x8HmrkCr2102eGPW
	 n9YVeaBrklgp7YBbcJ9O83nHdZbOW/Cl2WGUMPuR29H/UyjzKTRMXkRVIj48N2UoS1g==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793032454;
	h=X-Original-To:Received:DMARC-Filter:From:DKIM-Signature:
	 DKIM-Signature:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type;
	bh=4bbi5ZDYjyZH4Tu/Y/XLUEpo8GjU1EDuQ47hyKKJWNI=;
	b=jJPinkttLxtVxNQdIIvL9zf8i1yT9jiNG9qs4Eipn6nJLkf5gcHB/MwJaLa9pozsSQb6
	 j1wneEhzYf8gZzfrJkT2xxS38gInrHPWmvEnSij9kJCFIdNMSmER90nu8RrbNaE6QONrK
	 ra5fEJjehEg0wKHfJnP+RkkTUCbUUjwRQl4de1MA+afEt9qMNkiHkfmqrQ66N+meqx2vQ
	 B9jrK/cF91srfX5zEY2b2AqMaaa7bCvvHI6jTfwrXEpM4pMaQ2XJXPySmHSZs4P6EZEbZ
	 YvPA7jozgynLlMOVgDgsWMOCjnHWJdMbhWz9+k7c5g6hTTFAFX/oDvDC0mTuW0L9eSg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=wt7EV5RW;
	dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=3bleRp7v;
	dmarc=pass header.from=linutronix.de;
	spf=pass smtp.mailfrom=linutronix.de;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 4827B606A322;
	Mon, 26 Oct 2026 16:34:14 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=wt7EV5RW;
	dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=3bleRp7v
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=193.142.43.55
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793032438;
	b=SLuaOvj29Zg0b0hdOyp8dh/HwYuLWEqse8Prrgi05d9X3FdBi03it6q1hO99wUSykIfi
	 479EVSPdHbxQ0BD3c69qRynhHUxHlBcxQNYVZjH1ASDyXwxp0bqBh7TSqyGbKm5kg227s
	 bwBpF/Ue3N7HxSaeXXndnaH3wWT9gDcqucezhl9gyKtber7WBOHMD29ORn8dqx5mvwBg0
	 a8ZVpb2nbZk35N1DqA2duGE0j7KUVrWJUTW8Yjs9IQ9iBQKRd8E9qZNgtUtileoe7BDFf
	 +dF3/HQOW5qsuX+gXUBmfAYg4Z35lQM2LCsdBqgE2vUuaEem0RjIa0dywmsMU4vTiBA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793032438;
	h=DMARC-Filter:From:DKIM-Signature:DKIM-Signature:To:Cc:Subject:
	 In-Reply-To:References:Date:Message-ID:MIME-Version:Content-Type;
	bh=4bbi5ZDYjyZH4Tu/Y/XLUEpo8GjU1EDuQ47hyKKJWNI=;
	b=wlJ97zznzHCqDd04Q+V/58P2C3So0oAf0ZGESi4uezzn1xTf9mmvMY8ddV3uDfSUFmov
	 WDrSCtgQO/DL0XQCwj3ArJ2HSihVmwX4AfCDDVE8mLIJ/+IeE4qPx0lzhYjFto5un0b/G
	 0X+RbncEm16Uz46vakzEf9UexRSv/RQPMeKfcPWEXB9as1BmdEuPuL9GMu77bKIKag1Pn
	 0azOahBrD4fm+/qTC7fTzFS3QimURU6dIzsV5WwBzlFO7Q2/S9XG2+GY03ClULVY5vOv7
	 42WgzPBvcaynoL3TOGKrVoHniTOTtfw9GSYHrYgn5h1YFGQ3V02ykwWilXtH4e6jvVQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=linutronix.de;
	spf=pass smtp.mailfrom=linutronix.de;
	dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=wt7EV5RW;
	dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=3bleRp7v;
	arc=none smtp.remote-ip=193.142.43.55
X-Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7789606A31E;
	Mon, 26 Oct 2026 16:33:57 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D7789606A31E
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de;
	s=2020; t=1793032435;
	h=from:from:reply-to:subject:subject: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=4bbi5ZDYjyZH4Tu/Y/XLUEpo8GjU1EDuQ47hyKKJWNI=;
	b=wt7EV5RW9Rzfw1nXP7UkC5TIRfJHPG6iy4JE8vXSSGS5dv43Rjno+9KJOYE7B4Xvx1ScR4
	klocIYf5GzTJaLg4QuV+q1YSqDdAvEoE7L4wTrL86vPsYvZQvUuv3oxVc+VThcOoVSVnLO
	dcH60PCYJXw4BuDAvrbIwntoEeo4BJte8mOZjPxtscZDzJyJ8bN2UbUT9agGJ1zIU6WZtu
	kpyOWDgwBJEuHSRu8eNQq9LmxVUYOIeM7X2x6XNowiguguWUYt99X3myJ0ItS548TnV5sM
	S6a4ipnU7Vte7b7z4d1al2BPrqvwfAVCy0dQC8JlSy6RNUAQCip+n1h7uHEaUQ==
X-DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de;
	s=2020e; t=1793032435;
	h=from:from:reply-to:subject:subject: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=4bbi5ZDYjyZH4Tu/Y/XLUEpo8GjU1EDuQ47hyKKJWNI=;
	b=3bleRp7vVaPaXa21CiUma3MxPks+Kk4koD4akBrrEiJJqtZwXjMJWfoHoPbCmkCkzfHhW4
	28TLbVEwhCDoySBw==
X-Cc: Breno Leitao <leitao@debian.org>, chris@chrisdown.name, Sam Crossley
 <samuelcrossley@gmail.com>, Thomas Gleixner <tglx@kernel.org>, Andrew Lunn
 <andrew+netdev@lunn.ch>, "David S. Miller" <davem@davemloft.net>, Eric
 Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Jonathan
 Corbet <corbet@lwn.net>, Paolo Abeni <pabeni@redhat.com>, Randy Dunlap
 <rdunlap@infradead.org>, Sergey Senozhatsky <senozhatsky@chromium.org>,
 Shuah Khan <skhan@linuxfoundation.org>, Simon Horman <horms@kernel.org>,
 Steven Rostedt <rostedt@goodmis.org>, linux-kernel@vger.kernel.org,
 netdev@vger.kernel.org, linux-doc@vger.kernel.org
X-In-Reply-To: <at9qgBucVm-QHnye@pathway.suse.cz>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list