From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C0D93B27CC; Wed, 8 Jul 2026 10:36:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783506998; cv=none; b=BCu9T2SfHsmhTmO+3YSAGbpxdEqsV5LMLbaECq9XPEGGuCTRZT/9nvfj6wk+Pfl4Gp1CPcAPxyQRZV3ncQUAZFim6YghrFeVV2wS2L7XE9ymBjyG0itRr7psxFmvln0laN8imsNXgPRRVSCF9+Em/0nNHkQfXOeqIr1aRojZwj4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783506998; c=relaxed/simple; bh=CptA4H/0yTvtYAkCQi2Kx0njcJk4uT/iLYE9SPVIZgM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=tCveNkeQZKNP0Kjr/aVVDi4v0B+otfmjlH6Pk5w9v6AQZncf1tsEDNrWdmM7wD93GXW6Z2/Rq4d0jJZAxCLvX0VwAK5l1MN1vS+yA40dT4VLJYKX4W6YGPaScQ8OAkNu6KE0RRXN+3PkievMHnu+8Gg0eyj2lYaCTFcXZ6BQZ6I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Gb3HtCoK; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=fRArbuaP; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Gb3HtCoK"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="fRArbuaP" From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1783506983; 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=4oSZ0VvgFHGlDOd8o6hkiwFx03nfgdvtHM1XfLEEIwY=; b=Gb3HtCoKx6JK0GUWAyn+2ejS0xH2woEWxw3+K/nj2+wIJBR7fWvEPMFvFkyMvlwrSHvH3y eYqC9WH6f0zAbTbuXVSWvtLBe4ST35ka3Sx3qaoz/My1koLC2UrFc5rGvE+V0VwrOd6njF /6QPl/3E393XAhbRW6KoVsP/8FRAxYG9XY/ou3u5uSQQnxhnOp9j85d7VB+TGEBiacExE3 xJRbPhjE0DAIxiNex0yDdcKTec11EZmdD/YpK0wBUMeLP0I3e2YCMqu/Pyf5yPUyWPHO70 yB/zK+5LOoE4/L0SthgVe+xva8k3B7NyCM772BL/6skjkpHuTGfdHgW9SEka3Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1783506983; 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=4oSZ0VvgFHGlDOd8o6hkiwFx03nfgdvtHM1XfLEEIwY=; b=fRArbuaPMd9AD20Wgcx6lGklXPR5RU5QhFZJ34To/S8oQ81VuWWkxh+y3qq05R2rkX18yj OVN5nvYiWZtrpKCA== To: Petr Mladek Cc: 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 In-Reply-To: References: <20260630-deprecate_boot_delay-v2-0-f9883d36aa4b@thegoodpenguin.co.uk> <20260630-deprecate_boot_delay-v2-3-f9883d36aa4b@thegoodpenguin.co.uk> <87zf08w7qo.fsf@jogness.linutronix.de> Date: Wed, 08 Jul 2026 12:42:22 +0206 Message-ID: <87echdvkd5.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 On 2026-07-07, Petr Mladek wrote: >> This is too deep (also pointed out by Sashiko) because it multiplies the >> delay times the number of consoles. For the legacy printing, it would be >> more appropriate to put the delay inside console_flush_all() and >> legacy_kthread_func(). > > True. The question is if the proper solution is worth the complexity. > We would need to pass the information down two level of the API. > It would require adding a new (output) parameter to console_flush_one_record(), > nbcon_legacy_emit_next_record(), and console_emit_next_record(). > > It is not that complicated but these functions are already hairy > enough so we should be careful. Fair enough. But then it should be consistent and console_emit_next_record() should perform the delay before allowing the handover. Something like this: diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 2fe9a963c823a..62fd6a5ebef66 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -3161,6 +3161,8 @@ static bool console_emit_next_record(struct console *con, bool *handover, int co */ con->write(con, outbuf, pmsg.outbuf_len); + printk_delay(false); + con->seq = pmsg.seq + 1; } else { /* @@ -3182,6 +3184,7 @@ static bool console_emit_next_record(struct console *con, bool *handover, int co printk_legacy_allow_spinlock_enter(); con->write(con, outbuf, pmsg.outbuf_len); printk_legacy_allow_spinlock_exit(); + printk_delay(true); start_critical_timings(); John