linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] printk: Document that CONFIG_BOOT_PRINTK_DELAY required for boot_delay=
@ 2023-01-23 18:04 Bjorn Helgaas
  2023-01-23 18:18 ` Matthew Wilcox
  0 siblings, 1 reply; 4+ messages in thread
From: Bjorn Helgaas @ 2023-01-23 18:04 UTC (permalink / raw)
  To: Jonathan Corbet; +Cc: linux-doc, linux-kernel, Bjorn Helgaas

From: Bjorn Helgaas <bhelgaas@google.com>

Document the fact that CONFIG_BOOT_PRINTK_DELAY must be enabled for the
"boot_delay" kernel parameter to work.  Also mention that "lpj=" may be
necessary.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 Documentation/admin-guide/kernel-parameters.txt | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 6cfa6e3996cf..b0b40b6a765c 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -480,8 +480,9 @@
 			See Documentation/block/cmdline-partition.rst
 
 	boot_delay=	Milliseconds to delay each printk during boot.
-			Values larger than 10 seconds (10000) are changed to
-			no delay (0).
+			Enable CONFIG_BOOT_PRINTK_DELAY and also specify
+			"lpj=".  Boot_delay values larger than 10 seconds
+			(10000) are changed to no delay (0).
 			Format: integer
 
 	bootconfig	[KNL]
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] printk: Document that CONFIG_BOOT_PRINTK_DELAY required for boot_delay=
  2023-01-23 18:04 [PATCH] printk: Document that CONFIG_BOOT_PRINTK_DELAY required for boot_delay= Bjorn Helgaas
@ 2023-01-23 18:18 ` Matthew Wilcox
  2023-01-23 20:44   ` Bjorn Helgaas
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Wilcox @ 2023-01-23 18:18 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Jonathan Corbet, linux-doc, linux-kernel, Bjorn Helgaas

On Mon, Jan 23, 2023 at 12:04:40PM -0600, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <bhelgaas@google.com>
> 
> Document the fact that CONFIG_BOOT_PRINTK_DELAY must be enabled for the
> "boot_delay" kernel parameter to work.  Also mention that "lpj=" may be
> necessary.
> 
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> ---
>  Documentation/admin-guide/kernel-parameters.txt | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index 6cfa6e3996cf..b0b40b6a765c 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -480,8 +480,9 @@
>  			See Documentation/block/cmdline-partition.rst
>  
>  	boot_delay=	Milliseconds to delay each printk during boot.
> -			Values larger than 10 seconds (10000) are changed to
> -			no delay (0).
> +			Enable CONFIG_BOOT_PRINTK_DELAY and also specify
> +			"lpj=".  Boot_delay values larger than 10 seconds
> +			(10000) are changed to no delay (0).

That's counterintuitive.  I'd understand clamping it to 10 seconds,
but not setting it to zero.

Also, there are two ways of reading this.  One is that by specifying
boot_delay=, lpj= is set to a sane value.  The other (intended?) is
that in order to use this option, you must also specify lpj=.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] printk: Document that CONFIG_BOOT_PRINTK_DELAY required for boot_delay=
  2023-01-23 18:18 ` Matthew Wilcox
@ 2023-01-23 20:44   ` Bjorn Helgaas
  2023-01-23 21:28     ` Randy Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Bjorn Helgaas @ 2023-01-23 20:44 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: Jonathan Corbet, linux-doc, linux-kernel, Bjorn Helgaas, Randy Dunlap

On Mon, Jan 23, 2023 at 06:18:26PM +0000, Matthew Wilcox wrote:
> On Mon, Jan 23, 2023 at 12:04:40PM -0600, Bjorn Helgaas wrote:
> > From: Bjorn Helgaas <bhelgaas@google.com>
> > 
> > Document the fact that CONFIG_BOOT_PRINTK_DELAY must be enabled for the
> > "boot_delay" kernel parameter to work.  Also mention that "lpj=" may be
> > necessary.
> > 
> > Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> > ---
> >  Documentation/admin-guide/kernel-parameters.txt | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> > index 6cfa6e3996cf..b0b40b6a765c 100644
> > --- a/Documentation/admin-guide/kernel-parameters.txt
> > +++ b/Documentation/admin-guide/kernel-parameters.txt
> > @@ -480,8 +480,9 @@
> >  			See Documentation/block/cmdline-partition.rst
> >  
> >  	boot_delay=	Milliseconds to delay each printk during boot.
> > -			Values larger than 10 seconds (10000) are changed to
> > -			no delay (0).
> > +			Enable CONFIG_BOOT_PRINTK_DELAY and also specify
> > +			"lpj=".  Boot_delay values larger than 10 seconds
> > +			(10000) are changed to no delay (0).
> 
> That's counterintuitive.  I'd understand clamping it to 10 seconds,
> but not setting it to zero.

I'm not opposed to setting it to 10 sec instead of 0, but that came
from bfe8df3d314b ("slow down printk during boot"); added Randy in
case he wants to comment.

> Also, there are two ways of reading this.  One is that by specifying
> boot_delay=, lpj= is set to a sane value.  The other (intended?) is
> that in order to use this option, you must also specify lpj=.

Maybe this is better?

 	boot_delay=	Milliseconds to delay each printk during boot.
-			Values larger than 10 seconds (10000) are changed to
-			no delay (0).
+			Only works if CONFIG_BOOT_PRINTK_DELAY is enabled,
+			and you may also have to specify "lpj=".  Boot_delay
+			values larger than 10 seconds (10000) are changed
+			to no delay (0).
 			Format: integer
 
 	bootconfig	[KNL]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] printk: Document that CONFIG_BOOT_PRINTK_DELAY required for boot_delay=
  2023-01-23 20:44   ` Bjorn Helgaas
@ 2023-01-23 21:28     ` Randy Dunlap
  0 siblings, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2023-01-23 21:28 UTC (permalink / raw)
  To: Bjorn Helgaas, Matthew Wilcox
  Cc: Jonathan Corbet, linux-doc, linux-kernel, Bjorn Helgaas



On 1/23/23 12:44, Bjorn Helgaas wrote:
> On Mon, Jan 23, 2023 at 06:18:26PM +0000, Matthew Wilcox wrote:
>> On Mon, Jan 23, 2023 at 12:04:40PM -0600, Bjorn Helgaas wrote:
>>> From: Bjorn Helgaas <bhelgaas@google.com>
>>>
>>> Document the fact that CONFIG_BOOT_PRINTK_DELAY must be enabled for the
>>> "boot_delay" kernel parameter to work.  Also mention that "lpj=" may be
>>> necessary.
>>>
>>> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
>>> ---
>>>  Documentation/admin-guide/kernel-parameters.txt | 5 +++--
>>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
>>> index 6cfa6e3996cf..b0b40b6a765c 100644
>>> --- a/Documentation/admin-guide/kernel-parameters.txt
>>> +++ b/Documentation/admin-guide/kernel-parameters.txt
>>> @@ -480,8 +480,9 @@
>>>  			See Documentation/block/cmdline-partition.rst
>>>  
>>>  	boot_delay=	Milliseconds to delay each printk during boot.
>>> -			Values larger than 10 seconds (10000) are changed to
>>> -			no delay (0).
>>> +			Enable CONFIG_BOOT_PRINTK_DELAY and also specify
>>> +			"lpj=".  Boot_delay values larger than 10 seconds
>>> +			(10000) are changed to no delay (0).
>>
>> That's counterintuitive.  I'd understand clamping it to 10 seconds,
>> but not setting it to zero.
> 
> I'm not opposed to setting it to 10 sec instead of 0, but that came
> from bfe8df3d314b ("slow down printk during boot"); added Randy in
> case he wants to comment.

I'm not opposed to a patch that clamps the max boot_delay to 10 seconds.
I expect that my thinking in 2007 was that any larger value was just some
random/garbage value so it should be ignored.

>> Also, there are two ways of reading this.  One is that by specifying
>> boot_delay=, lpj= is set to a sane value.  The other (intended?) is
>> that in order to use this option, you must also specify lpj=.

You probably should specify lpj= (e.g., from some previous boot log),
as indicated in the BOOT_PRINTK_DELAY Kconfig help text in
lib/Kconfig.debug.

> Maybe this is better?
> 
>  	boot_delay=	Milliseconds to delay each printk during boot.
> -			Values larger than 10 seconds (10000) are changed to
> -			no delay (0).
> +			Only works if CONFIG_BOOT_PRINTK_DELAY is enabled,
> +			and you may also have to specify "lpj=".  Boot_delay
> +			values larger than 10 seconds (10000) are changed
> +			to no delay (0).
>  			Format: integer

That's fine with me.

-- 
~Randy

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-23 21:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-23 18:04 [PATCH] printk: Document that CONFIG_BOOT_PRINTK_DELAY required for boot_delay= Bjorn Helgaas
2023-01-23 18:18 ` Matthew Wilcox
2023-01-23 20:44   ` Bjorn Helgaas
2023-01-23 21:28     ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).