From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B081A3BCD3E for ; Wed, 8 Jul 2026 14:26:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783520784; cv=none; b=QLe1PeKVIbUztNSIPU6nJMlHzGjs4FGlJjz+Tz5TjhFpKUJjoyRytXbe8/XEomD2SD4TuHM5ZNV82KCwD/F11Q+HLDWRci9NfW0OyA9Ww7rmWu7qgGSsh/J4yH2EhpZSOJDIS1uSNmy/gjU2anHxvWkVYj7uYaqEffcDY7nXZMI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783520784; c=relaxed/simple; bh=uuOvnq1jqJcyHqom7LOWBjJv/hTzGqurf6hJE/afojM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Bz0b/GRFJquRa/4cR8tXLFQks7OVlIfhrLdOTC8CBr3BPvUq53aNcZ+YMV4uMom83eHXfEwa9kaSABWKHYoE0OGQFbw3YDpD7nZz0T5+YXUjhD/uN37dHcRblY1sHM/bzA6k8dhLq1R95y7JpWk7MNVZuDIvciofcPsOhVVCCVw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=Hu0RmUEv; arc=none smtp.client-ip=209.85.128.48 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) header.d=suse.com header.i=@suse.com header.b="Hu0RmUEv" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-493b1710405so4845725e9.2 for ; Wed, 08 Jul 2026 07:26:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1783520781; x=1784125581; 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=y+2oxnA5/005eAPx9+D3ISlHqx+7lNA7OCwPVcy4+pQ=; b=Hu0RmUEvEzgsKLTTatt63vRSF8ZccjimJNUEsn8ncr2SKecU4MN5jJnOKeUDOgEXuu E4MSB/fxdVBNq1YSkUZSCpDoZdRvXtpFlj6ZJlcum2NCYtaISj29KLDlFFoh9szCBq7O IERJl5YDXOW9mjfQqo8nMMYjn3C6QXHaAvrt22k9F+d4RQKFh4nljpMEzGx8XnrhZb6k fnTfZOYlyKWqQUHjHG9nGnXAC+UiWGzkFLgs93M7cPeABLOFGAI3ELZLQv23fxxskLjS v7lj6EKFVsmM52Bxhu+Tp+NS1zrdrR+/FbqF1KlHLyGnpuG1xjxLGsPYU4qezjrLSENz +GMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783520781; x=1784125581; 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=y+2oxnA5/005eAPx9+D3ISlHqx+7lNA7OCwPVcy4+pQ=; b=lmPb8crZh0XfmsoKiWd5z1FaZ7yb2vmBqCt3fjrKx4gLHYfH0z1a80VqG1Tj0StDDu n5l80CS2ZeUwiqsnsghnLxh/qLiaFMehd/MLtQmyiMuMzrZn/hBGC3DEmsBUwQOb22tD AxjXlCw5WtQEtW8LlapwFhJ8xyVBaJx9pg2XCIC/lcozH6z13dyravQRcWdbD/IdeJjA Tbkxb4P/W7Yr/vHeW2A8KMYj2jXWs3pJ+sc+lXmifk4ngU190FfSgxmyk0bb4vBH3Ofv 093EyAA5N8L0t8tbyDK+eRIbZCQXwnX4Kc1nxF0l5QXozPIp8b+1lpoaiSE4U6Ke9aTr 1MaQ== X-Forwarded-Encrypted: i=1; AHgh+RoEu5FI9S4PDa0A8fZoQjNh7rQTqg/9+YZmnUsDQxc48hPmrc5+RYz8xdWB97Rf7VUyAlu4Svj4BYQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yx9PhgTwKdchAm88QVM+XexVbHR8iaTrD1r82WGnMIAZfSS961z FxzlK/O3XaVYOYhDeNzcvihR7Hmb6iJBEr0UjJcN5B/MguguXjBwORSKmn0LGWlhpJs= X-Gm-Gg: AfdE7cmdBhQvjGpHn4s7drn3UjKbGmoUYh2ekjsH4qDEpeCu/728nSkVAvRYU+9Hlxt /iaDHVcEyBScpcEAGldNYY1lQMzDK5v4fNzTXyoM7L4rElZcyduvpTvKwRvPn1tDGy7TDB48OzQ HtcTW7KqnJ4B46MVdS8mySIjiYes9NScFrkdQT2LrtORyvaJv4MDaUAv/hGT4pU3n/LkekBB0DW 4nqLwN66hEPDmDrd/j8Et8Ir0VnMauyPkGXx+oIoAIKcNlzaE+XsLRfAyFSV/5YoJrFxNKjAHSf lJtJuy1/MPrtBZWKgoL78iPMTfJK1SvUyuXozlUeNcQPCnOvh2qO1LvY9TVFiZx1rcmja7mpZTK qY03OWCdm6PlhuYjd7/EuzMPhK8dSJE/Q5el8VaeqVtAkFk/mevfg+2lpfKleY5heOu3S7gtgui aXmUv6PwLHZ9tuf0M= X-Received: by 2002:a05:600c:4e93:b0:490:e5c1:b8b9 with SMTP id 5b1f17b1804b1-493e67f7c3emr28578075e9.0.1783520781102; Wed, 08 Jul 2026 07:26:21 -0700 (PDT) Received: from pathway.suse.cz ([176.114.240.130]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-493e0f5ca1fsm153295645e9.15.2026.07.08.07.26.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2026 07:26:20 -0700 (PDT) Date: Wed, 8 Jul 2026 16:26:18 +0200 From: Petr Mladek To: John Ogness Cc: Benedikt Spranger , Andrew Murray , Jonathan Corbet , Shuah Khan , Russell King , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Steven Rostedt , Sergey Senozhatsky , Andrew Morton , Sebastian Andrzej Siewior , Clark Williams , Randy Dunlap , Linus Torvalds , Greg Kroah-Hartman , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-rt-devel@lists.linux.dev Subject: Re: [PATCH v2 3/4] printk: nbcon: move printk_delay to console emiting code Message-ID: References: <20260630-deprecate_boot_delay-v2-0-f9883d36aa4b@thegoodpenguin.co.uk> <20260630-deprecate_boot_delay-v2-3-f9883d36aa4b@thegoodpenguin.co.uk> <20260703165654.71be8707@mitra> <20260707145411.53a10893@mitra> <87qzldvqpm.fsf@jogness.linutronix.de> Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87qzldvqpm.fsf@jogness.linutronix.de> On Wed 2026-07-08 10:25:17, John Ogness wrote: > On 2026-07-07, Petr Mladek wrote: > > To summarize this discussion: > > > > + Benedikt would prefer to add the synchronous mode before > > moving the delay from the printk() caller to the console emit > > code path. > > > > + The delay in the printk() caller code path did not guarantee > > the output but it increased the chance to see it. > > > > + The synchronous mode will be even more reliable than the delay > > in printk() caller path. > > > > Please, let me know if I did not get it right, > > > > John, did you have any plan how to add the synchronous mode, please? > > Does it look complicated? > > > > I guess that we would somehow need to "mis-use" the emergency > > priority and force it everywhere by some global system setting. > > The synchronous mode would rely on the driver being nbcon. I envision > something like this: Thanks for sharing the code. > ---- BEGIN SYNC IDEA ---- > --- a/kernel/printk/nbcon.c > +++ b/kernel/printk/nbcon.c > @@ -1200,7 +1200,7 @@ static bool nbcon_kthread_should_wakeup(struct console *con, struct nbcon_contex > cookie = console_srcu_read_lock(); > > flags = console_srcu_read_flags(con); > - if (console_is_usable(con, flags, false)) { > + if (!(flags & CON_SYNC) && console_is_usable(con, flags, false)) { The dependency on con->flags means that the sync mode can be entered only in task context where synchronize_srcu() can be called. It might be good enough. But I am afraid that people are creative and would like to have even atomic variant sooner or later. Also it will do the flush in NORMAL_PRIO which is good. But it might fail to get the context ownership when it is blocked, for example, by uart_port_lock() which might be even sleepable context in PREEMPT_RT kernel. > /* Bring the sequence in @ctxt up to date */ > ctxt->seq = nbcon_seq_read(con); > > ---- END SYNC IDEA ---- > > BTW: The sync mode is the final piece so that PeterZ can start using > mainline code for debugging by serial instead of his own workaround [0]. > [0] https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/log/?h=debug/experimental I see. Best Regards, Petr