From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 29D2947F2C4 for ; Tue, 5 May 2026 14:26:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777991205; cv=none; b=fx7cTKgkGGTsXXMXa0bRHZSO+vDncZxpcvq1+jr70PIfIUjFYbqc2tEvmIw0WKuc1UZGs1kioUtoxjP/sD9xTO3K4iw4zhYFU2yDQAcaiODtuc2ZEpSs8XK+46XOsys0TVfu+0XLW4SYlzXRRap8ka4MyLIv3RmH/zuI7qFwY7w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777991205; c=relaxed/simple; bh=R+Bl4Tihft3hXjytWck/czW9kH+Ro3JoXapjuLVVGCo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=a6782ra6f1+KKNAmGePRe6+KGND7znQF+XCJVdEwsDzJ6H+MF+9x1KhmcSCNK2KZQQTqF04sGsovFu9o07GoSLxNZDxT+ppgY/pNBpZVRvrJ24ItJi54g/Fcl0U/nAacBuvdncKhw310/ti3Q7RGThdOti02cdxd5fE3b6panqw= 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=X9GuZZ6y; arc=none smtp.client-ip=209.85.128.51 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="X9GuZZ6y" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-4891e86fabeso65729735e9.1 for ; Tue, 05 May 2026 07:26:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1777991202; x=1778596002; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=iYyeBIbryO8JN51e301x9bqZZvN4oLOHjzKYFZ6iv5U=; b=X9GuZZ6yNVHWn9oWcIeb2TWBoian3NCJZtlIE1w5/ffc8Rx/T3aGOjw5omfkxYuoJD we0DGkg/eV4jeS54XBekGmRdIuoLzlsSAf6VJ45JLTmYwhyXFIfI2VfqnQtf1OOQg04i OxfivW/69Kx5T7dAvQYnl63yfX8ibhDFHpJHqxihQIaVAUIuy+vXHTYtS05S/5M5Jc7d ijVgFs+2EOO07w+q33jw6kMuGf8Lh/8wN945x0KIFESaOu0OtnSNaGFSKH37X44wsoWq SdplrFypUaTM31H6KCuVD2BgYNcUmCwD13Xe+vkDNV1T60NeeY6Mebs9P9I+CpjBZ6Lz eenQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777991202; x=1778596002; h=in-reply-to:content-disposition: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; bh=iYyeBIbryO8JN51e301x9bqZZvN4oLOHjzKYFZ6iv5U=; b=pSkGIW8w4xVBllyKPP5ejRRHWu5EKrTmNYWZvcBHTYBKJrc7ZLPe8X8LXSWmQAWrh0 r/vF0vnhIrzYwTUDatwc66kMWIygCQJd1yDnVWMHE4HihhU7N5otw8Amgq6zxcaJ1CEB fQqn1g+/WTADd31rQwHWNyZ9+rb/0BIEb2wvU+Wy1Fa+OowBtoihNrCDNByjw6tVHZZC D6LBtObf8ngrnhc1Eij70/olVMK/mmgS+58A2DhunOb3+T43XluNfnlnc4m4Z1yt1t4k vUDzFqYLU9ds+TiXFto9FZV+138Kqy3rlkBARFsMJBP0y2Kj/JIAHBJ6SNyv4G05i1Ro fR6A== X-Forwarded-Encrypted: i=1; AFNElJ9hJjqO4Ie+CfB4AZNAwA1mhucSFwx90sBeKgj2D8qirmML6f5RLAk2a+OUbTFAcGg1Pl/mqerlpYxj3+Q=@vger.kernel.org X-Gm-Message-State: AOJu0Ywhjfra0Z1H5H+I6BxYz4baZpAxvwr9kIvNsCsQEgDhEvO4EtbR zJfDOGiYwHPlOZbtG8J3m0McUeewJ0zfje7gFhfTUVNXW3Iy3bBNN3s6zglIZawD5X4hqrMYnaO oc1+gHPY= X-Gm-Gg: AeBDietVUcM3Fe556rh9un6QBm4ssF7oo+5QH2F/31H6aAS/F9eK6ZoAlDFuIoF9kid AkD2XebdAKzGndEwbMzYGJ22Q70M05YSiyh/EADVTrE5V9fLWmMVvRDw7erDzqyIGoaUxWNRnry WnZSgE8ImFMhV1AwRbI48vgN9DZte+cZbmHR8g6pZHwOd8bMyYbVqMr6wlZM0lDT4red4IHLHnT clKKZkf69YNi01hd++OEed52vOlEy2KZ/iy0rLX0i6TFsCPBQi1DL/2b5u4azSrWDRH9tHWkyn4 2M8fC2RLYLxGpXCMqsFsHyFhNFn9a5MRPAbdoZSS/1FCbzwroSsgTtuaSEUVzgQX6Dz6WkZSzH3 Monk749yT98ippN4nonO4Cjrwh3Z66sKgm7dLIfB/wQ+xCri18u32sKLvU9Tud6RpbB8t2Igur+ 4qYe0tLunphji/1DB/OnChImXnz2ZofAme4XGL X-Received: by 2002:a05:600c:4ed2:b0:488:a639:b772 with SMTP id 5b1f17b1804b1-48a98639ca9mr248173345e9.7.1777991202385; Tue, 05 May 2026 07:26:42 -0700 (PDT) Received: from pathway.suse.cz ([176.114.240.130]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48d17ff35eesm19631165e9.14.2026.05.05.07.26.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 May 2026 07:26:41 -0700 (PDT) Date: Tue, 5 May 2026 16:26:39 +0200 From: Petr Mladek To: Andrew Murray Cc: Jonathan Corbet , Shuah Khan , Russell King , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Steven Rostedt , John Ogness , Sergey Senozhatsky , Andrew Morton , Sebastian Andrzej Siewior , Randy Dunlap , Clark Williams , 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, Linus Torvalds Subject: Re: [PATCH RFC] printk: remove BOOT_PRINTK_DELAY Message-ID: References: <20260505-printk_delay-v1-1-5dba51d7f17c@thegoodpenguin.co.uk> Precedence: bulk X-Mailing-List: linux-kernel@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: <20260505-printk_delay-v1-1-5dba51d7f17c@thegoodpenguin.co.uk> On Tue 2026-05-05 14:45:00, Andrew Murray wrote: > The CONFIG_BOOT_PRINTK_DELAY option enables support for the boot_delay > kernel parameter, this allows for a configurable delay to be added before > each and every printk is emitted. This is DEBUG_KERNEL option that is > helpful for debugging as kernel output can be slowed down during boot > allowing messages to be seen before scrolling off the screen, or to > correlate timing between some physical event and console output. > > However, since the introduction of nbcon and the legacy printer thread for > PREEMPT_RT kernels, printk records are now emited to the console > asynchronously to the caller of printk and its boot_delay. The delay added > by boot_delay continues to slow down the calling process, but may not have > any impact to the rate in which records are emited to the console. For > example, if delay_use is set to 100ms, and the printer thread has a > backlog of more than 100ms, perhaps due to a slow serial console, then the > records will appear to be printed without any delay between them. > > It would be unhelpful to add a delay to the printer thread, and it would > not be possible to disallow selection of CONFIG_BOOT_PRINTK_DELAY at build > time as it's not possible to detect which consoles are nbcon enabled at > build time. Therefore, let's remove this feature. Heh, Randy proposed to remove "boot_delay" few days ago. This RFC goes even further and remove both "boot_delay" and "printk_delay". Honestly, I do not feel comfortable by this. The delay seems to be handy when there is only graphical console. I would suggest to do: 1. Obsolete "boot_delay" with "printk_delay" as proposed in Randy's thread, see https://lore.kernel.org/all/afn2sYKKsqG4QBVX@pathway.suse.cz/ 2. Move printk_delay() from vprintk_emit() to console_emit_next_record() and nbcon_emit_next_record(). For nbcon console, even better would be to use a sleeping wait in nbcon_kthread_func(). But it would need some changes to call it only when a record was really emitted. Also we would need to use the busy wait in __nbcon_atomic_flush_pending_con(). IMHO, the only drawback might be that the delay might be multiplied when more consoles are registered. But I would ignore it. People would use this option only when the graphical console is the only one. It does not make sense for serial or network consoles. Best Regards, Petr