From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.49 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793026695; b=Jni7+Drs1UHCJhbRbeYZeNslIR7mQfQAGahEibyqjAmrTHHZLp+dLrbEeqFu0SAZMm8h ukaIhGpSS3YLAGPA2Pmt0HvCCNX+C0w5b/fqNhP5btLPNWern9JI240OAgy4nzFGCOfae uIjBuf85HBp80RcHj9ldn74vumMEOc7hkc8KZiwCfRLgUGvK8ebeK0Kq3V7OfPswl5AqG rd+4zHERSDGFM5rJSsHkooqgdN2iUAcPEMyeKAUKf1lJk/reeOH3e+9BRb00LtvS2+kvw pe9AvkZ3oYQ/xT7YrHzoZF7UnlCTGfqkAd0Ez3KU4cwYPr64PZvzymX97blAyz9KJig== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793026695; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=FJS89KuNZwh7/7cErKHYPAXh9YyRaZbbAgWp3J/Ttec=; b=vl5TSpORi7qzba4y6R1g3j0Qh5UAx9pxQAfwaSallI/WlYBgW/vWl5GMDuZUrqyBa1Rv U9oztpAJNXfvGK96mcHpc4pWeBGL5ZEUoTgauQqTcUsqXuR5M0OatV4U1sMEG1Xamuyic iL2OIFMGQ/Cb65ySjfRVxFPb0ZctfRvcNdLEo4+UTTHYTIWAHkyuVqn6xMkH/uEZto2S+ 5gtDg4kA5DvIKGykzyfSFVPziOkfeq+xdIDLOx0FYi2sdBuPv4WTyGtJBe2aK48KKdrxl nVVUtqEevfImI+jCMuPYwXIFMdbfrbgKe7XbI/MobzxWGuLbEyl1gmexuzQGw7Oqz/A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=google header.b=hG6q6yQg; arc=none smtp.remote-ip=209.85.128.49 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 08AE2606A31D for ; Mon, 26 Oct 2026 14:58:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 08AE2606A31D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=google header.b=hG6q6yQg Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4a2069b9710so29743125e9.2 for ; Mon, 26 Oct 2026 07:58:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1793026693; x=1793631493; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=FJS89KuNZwh7/7cErKHYPAXh9YyRaZbbAgWp3J/Ttec=; b=hG6q6yQgnImNhH9iUb0H3TAMaZ6XUqV0ei3aaw2ghXRT929UaGAYimUg0iIa6VeFUh jWGG9Mq7QpZWkLoRa1nteywXfHeLQTJ12a1aoDgfV2RrIb9qpDNYmdxT0g50ad7o6O2v 4lE3401qAWMKmJ/H0m4VF4Fj1zcJb0ymcxYv0OsnJH3/Z1zAaXev5JQYXoyYDbPwJyuG Rm8J/wtxoxGSMpuXBSdvW4nfI6zb2GiemVQqiv23xsuUIK/RrX8c8Kdvc78BWM9Pj0/m hoTQ4jXiTSbUSoF80Ob7exNxamKuuN3lHgnD4QNSoYxvS2+Asb5HlY6wqZf6vG1yWndd T9ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793026693; x=1793631493; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=FJS89KuNZwh7/7cErKHYPAXh9YyRaZbbAgWp3J/Ttec=; b=a1tJV61COUmI6yIgu8C7qyC+trtnI9E3Pl4EbFTiQ8F5vdz3In+Wdjf4mu6/GbJU04 y7d1xrRf29L/ngbKHgzENs9r7MdVcu7xi0ejjuEFMbcyMYcHOl1hcb0ehi6Qz5kkch1d mHkzjLvMI21N2SMIsLGJvlqD4kThL75vNWgdy7i4XK1VwkDDEgNIjV9GMoHaHLctv+TW 3nDi3MrekOqiGRdpJDGKQ3wcdUxp26aP1A7mkq454mWO7tfNbwmxE6Wo15dgcOo5AinB YIguNz+uGysvt4yzjWe2IZy7MseVmFnIcJs0dfRZgMEd9a0D/PcJblCBKdQC/kVUkqaI Pw+g== X-Forwarded-Encrypted: i=1; AKwUvBxuISu/kiyRgJbOgmAE+fp0SD+DEwiTdK88tczmJdkbow9ylT869DFhs7T5AQEJXx9QMu9Oj8e/WMA=@vger.kernel.org X-Gm-Message-State: AFq9FYLjhZKqPmyGLulmuxg1KZhiV+2qmTLvSiSD2EfxQLiIrYIeo00u Lr49e8w4UtIWXUDqEvTAc6FHsaYycgjmYJyGFac56riWk/xj2kYXadQ99X5ezIDnU7c= X-Gm-Gg: AYBFou332LVaOOMfN82fvBRck4o8C43v7J3DrnD/jYklZ5RDHM1nuikYopdkwppcMJG E3V0THbrrVBCuYIbKkaUVX1mAcw3bH3jpZZpsSzviQpyIX2lEi9tlrdxaTkW0SeO0mTcYrFhZtT oT8R+5b3gOu0eExJ7cVePW1K7tCjvQ1Wf4hUADSI66OeDCFha+Tb0PjY+jVh8RCYo1uMRg9RfYQ srfL7O6q4apcTRtNJohNe1OnL1Vl1ZBzEtn2TuSEmYZVx0xeBehtGpVDAUd8eFCozW10Lkkg2tL YAyK7spZagJwPQU3lqBW9hPvu5ixXQOpl1gvDKQaA7aWuUhinFzzZkDZHY9E/WFjeEiCgBKR5L4 vtHRL4ql9HxQKz65u5Np3PIXgfTG0oeM8nVpE4Vcgy7aW6nK4v0pA2PYDBJPiz8NUqdNrE8Yv/T EY7bWGsbL2AS8gbEjp1RYRnQozOS07zAOkS0eDfKO6kveDfWImzOmV8DWgFmvR27km96RlrU/24 zkeLXfvIfTAxoTEY9LSHvOmm29BdYEHYwo0hB8RzmgkKgAMckOLksxM6Q== X-Received: by 2002:a05:600c:4f50:b0:4a2:1050:aff with SMTP id 5b1f17b1804b1-4a35ac8c32emr168076125e9.6.1793026693314; Mon, 26 Oct 2026 07:58:13 -0700 (PDT) Received: from pathway.suse.cz ([176.114.240.130]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a35a08643dsm158480615e9.4.2026.10.26.07.58.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2026 07:58:11 -0700 (PDT) Date: Mon, 26 Oct 2026 15:58:08 +0100 From: Petr Mladek To: John Ogness Cc: Breno Leitao , chris@chrisdown.name, Sam Crossley , Thomas Gleixner , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Jonathan Corbet , Paolo Abeni , Randy Dunlap , Sergey Senozhatsky , Shuah Khan , Simon Horman , Steven Rostedt , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH RFC 0/2] netconsole: allow replaying the printk buffer on demand Message-ID: References: <20261024-netcons-replay-upstream-v1-0-9613f38496e5@gmail.com> <87fqxskdpl.fsf@jogness.linutronix.de> <87a4o0k3qa.fsf@jogness.linutronix.de> X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87a4o0k3qa.fsf@jogness.linutronix.de> On Mon 2026-10-26 14:15:49, John Ogness wrote: > On 2026-10-26, Breno Leitao wrote: > >> In the per-console loglevel series Chris Down introduces [2] > >> /sys/class/console/ to sysfs. This is where we would put all the > >> upcoming per-console knobs. I would expect a replay trigger would fit > >> well there. > > > > That makes sense from a design perspective. Thanks for the direction. > > > > So the next step would be to add a basic /sys/class/console/, similar to > > [2], and put a `revplay` entry in it. > > > > > > That would be about three patches: > > > > 1. Create /sys/class/console/, similar to [2] but without any loglevel > > handling. cdown can build on it when respinning the loglevel series. > > 2. Add the per-console replay helper, similar to [3]. > > 3. Add the first entry (/sys/class/console/replay), which triggers the > > helper from patch 2. > > > > Is that what you have in mind? Sounds good to me. > Yes. But perhaps someone else wants to provide some feedback about this? 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. 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. Best regards, Petr > >> [2] https://lore.kernel.org/lkml/84b8d91693e56f6026271bc40553bcb6657ab24d.1764272407.git.chris@chrisdown.name/gy > > > > [3] https://lore.kernel.org/all/20261024-netcons-replay-upstream-v1-1-9613f38496e5@gmail.com/