Article View: linux.kernel.netdev
Article #7597Re: [PATCH RFC 0/2] netconsole: allow replaying the printk buffer on demand
From: Breno Leitao
Date: Mon, 26 Oct 2026 17:49
Date: Mon, 26 Oct 2026 17:49
61 lines
11924 bytes
11924 bytes
On Mon, Oct 26, 2026 at 05:39:54PM +0106, John Ogness wrote:
> 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.
A bit of context on the use case from our side.
In an ideal world netconsole is enabled from early boot through the
kernel command line, but in some case this is impossible
(linux as bootloaders - ipxe/sd-stubs/etc).
The other way to setup netconsole is to create a new target at runtime
through configfs. Netconsole then only sends messages from the time the
target is enabled.
For this second case, I would like to replay the whole kernel log on
netconsole, such as previous messages. Something might have happened
before the target was enabled, and we want visibility into that.
That said, the "per-console counter" might work as well, since it would
start as 0, thus, we know that netconsole target would be behind, and
try to replay? (not sure how yet)
That said, one way or another might work for our purposes ?!
Thanks for the proposal and discussions,
--breno
Technical Details
Message-ID:
<at-Ppa86sBw7mO8W@gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352030-linux-kernel-netdev=dewy.ruReferences:
<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> <87zew0ifpp.fsf@jogness.linutronix.de>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-352030-linux-kernel-netdev=dewy.ru From: leitao@debian.org (Breno Leitao) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH RFC 0/2] netconsole: allow replaying the printk buffer on demand Date: Mon, 26 Oct 2026 10:49:32 -0700 Organization: Usenet Network Message-ID: <at-Ppa86sBw7mO8W@gmail.com> 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> <87zew0ifpp.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="1363418"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:jX5qunIMTlcEYYc9oPZSe5yFLy4= sha256:GNQcAd1HAMzZEoY/v4n4LIsM5Q+oebD7H23uIJC3IhU= sha1:6mbUqjIfccSsE4+ycKNXhZmkMUk= sha256:vX/vuAvM7F4psFd92A+54kftv8FOicT67l47QLEMCC0= Content-Disposition: inline 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 B54BC125BB1; Mon, 26 Oct 2026 20:52:18 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.389 X-Spam-Status: No, score=-3.389 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.339, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=debian.org 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 odzX9-MFGRT1; Mon, 26 Oct 2026 20:52:15 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-352030-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=debian.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id E833A125BAE; Mon, 26 Oct 2026 20:52:03 +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 6AE5B2DC25; Mon, 26 Oct 2026 17:50:02 +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=1793036992; b=WqPgcC+y9CpxVS2MADy9kjnZ0VEMl+u5OcxEmAWgpBGJUtu+zXKReUAniyK9pZiAY08o gCxYYnblsh+kWJKd04KJpJfkPJPrMvQA1brpywZoZotnfIc6cmKqhMCDcfaBiwpuBZ14A F1LddUJ9TXP73PL+gAFuz69q+kSLyqvjbv/hPm4cdjQQqmLC9i/cyiOA9BU2EgFEYT+DJ /c5AKYmTMUCYMMz7eEIKz3nPKFykeVgBvh4tzWoh04Ep0EsfaIHyz9o6yjkT0ehaNWe0D qJR6034ZE9NvjolPnkrWYl8eFr+0IlDEbdICPOpTDNtGyRt3pfpOZdqYIIFOAWTve3Q== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793036992; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date: From:To:Cc:Subject:Message-ID:References:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Disposition:In-Reply-To: X-Debian-User; bh=orD7g6UPcmdsNlJx2cAfXE0bvH+N2Z5uxr3hmHyDm+4=; b=czBGShCPf3D/C2QCQg5JIi9K0T+DaAL5akuuPSVIOVWfGmmNPi6RXeDbN8CsF0/gZdgU 9UksRftWy25mJQdd+Ybo9uuKxl1nTkfc5krJUdhzt+WUD7Ya7dazQiQowyMl5g/Emsb9N R+9NyK6z0oWGV8YF9wzCQ4MyE6DIWV+1x8o2PbDbfQMhbiWq3AO47hXeEqpAcPwzBIcGd PwB/mNfDvauulfFDeOA6BS9RslCPzdpDK6QhBYRVE22dMF0YRLxKfYx+KuLMSXlCCyF95 yLBXao7yu8xqF3MNYzdIef4gEWHC//lQ9sp8bEbstH93+tL+XpdiAUFcN/tDPyHwQOQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=debian.org header.i=@debian.org header.a=rsa-sha256 header.s=smtpauto.stravinsky header.b=EQ3cwj6v; dmarc=pass header.from=debian.org; spf=pass smtp.mailfrom=debian.org; 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 9B87360A2619; Mon, 26 Oct 2026 17:49:52 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=debian.org header.i=@debian.org header.a=rsa-sha256 header.s=smtpauto.stravinsky header.b=EQ3cwj6v X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=82.195.75.108 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793036991; b=w6FqrQn+2d3lsd6T1iyRQNxU54vMeEb04WOidA00XoUXlk1u7zBlMFr4B7iAg/4iD+il yUXDMbeIO3rpNOKwbUZzs0M0zI2veDFCavNHXvuJej9TuRdHREUujZznpV6bmzBT45Eds q9dAcW6qXE6c11t7X4CUKCrnWgnDA76AjviHWON2QkiwQAofUcO4S6ycJA+JOk8sseFwu VyMfbjCJqURvflRLQef7H8tq8u1wIPX+TZFbrn2uUxLj6rGcu4hvR3zyxo4lNkz6MXmyn vhpnez4GfZtUtldegM2AfBT+noca3UR7sT3q4ff8GZNV/wxHDF/YNgmvFqvOLrwKnaw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793036991; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To:X-Debian-User; bh=orD7g6UPcmdsNlJx2cAfXE0bvH+N2Z5uxr3hmHyDm+4=; b=nZ4EaCGN2PGvU+wg+oQD3x2WR4fBpcmVUhQCZbuk7/p4amAaKx3cFgPeAsHDbWoL11Re SYt07+MXB02OaZedz/Ah1xyMdSH7oBXQVB/QgQ7Q+5HIhnxi7fneXSw3dIjXxCpHLyPGL yraYaueDGsMAiBOUJ8UT1Gss6/B/VlmqFufkABbs0BjepLTpnv5v4jyRsKerBTyfKPubc QgtIECRphPjrYLKiDC2q+sdPS8JgGAdgB+cEfuJ0MFuRLNyzuSpwY0b5Tl5u0521kwpVK 4aFVNrlMwiVrA6gP/b9N7a4IZI7nEJrn6w+HNC6MXGxRJ8sB0yfbh7yNkEeUpvXotSg== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=debian.org; spf=pass smtp.mailfrom=debian.org; dkim=pass header.d=debian.org header.i=@debian.org header.a=rsa-sha256 header.s=smtpauto.stravinsky header.b=EQ3cwj6v; arc=none smtp.remote-ip=82.195.75.108 X-Received: from stravinsky.debian.org (stravinsky.debian.org [82.195.75.108]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 077BB60A2616; Mon, 26 Oct 2026 17:49:50 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 077BB60A2616 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=debian.org X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=debian.org X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=orD7g6UPcmdsNlJx2cAfXE0bvH+N2Z5uxr3hmHyDm+4=; b=EQ3cwj6vy6u0oKGJx6dBj5hNcm f2tqIQzKAicQW+pA6YhglvraStNdeG7SbjTBQBTIFj5NjwaYNnT7fe5Yc5P2FLDiv7tlcO/zc7WJL KzVkK1uLWVRjLK0qFh2qwJysSYdlt/zPigDwVqNOK57lzRuFGbv8r/LmkogqXinIS/nCFp1qOaLVH BNi5u3+bnF9Vwj15EcrmlBWYhw3tu2r2LwksKAa/WTZzha3BQKx88fSI0Ww0crnNXQgYl89Wt9p/S AUqOFn5fPjEvtPxRFmse/MaWe4UWbMUVNb+LSRaO7nivRu7w4+U9yajvotLwLkLTDECeaJZQM+U9z RX/SrIbQ==; X-Received: from authenticated-user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from <leitao@debian.org>) id 1xLOpF-000qtM-20; Mon, 26 Oct 2026 17:49:37 +0000 X-Cc: Petr Mladek <pmladek@suse.com>, 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-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 X-In-Reply-To: <87zew0ifpp.fsf@jogness.linutronix.de> X-Debian-User: leitao