boot_delay broken ?
The boot_delay switch seems to be behaving strangely in the current -git. Setting it to =10 makes the output 'bursty' it becomes slow for some printk's whilst others scroll by at regular speed.
Setting it any higher than that seems to make it pause for a really long time before it outputs any text at all.
x86 timer changes perhaps ?
Dave
Signature · 1 line
http://www.codemonkey.org.uk
Quoted 6 lines · Dave Jones
The
boot_delayswitch seems to be behaving strangely in the
current -git. Setting it to =10 makes the output 'bursty' it becomes slow for some printk's whilst others scroll by at regular speed.
Setting it any higher than that seems to make it pause for a really long time before it outputs any text at all.
On my side there's this issue for a long time
http://lkml.org/lkml/2007/8/8/79
Quoted 13 lines
x86 timer changes perhaps ?
Dave
--
http://www.codemonkey.org.uk
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 10 lines · On Mon, 25 Feb 2008 10:14:36 +0800 Dave Young wrote:
Quoted 6 lines · Dave Jones
The
boot_delayswitch seems to be behaving strangely in the
current -git. Setting it to =10 makes the output 'bursty' it becomes slow for some printk's whilst others scroll by at regular speed.
Setting it any higher than that seems to make it pause for a really long time before it outputs any text at all.On my side there's this issue for a long time
http://lkml.org/lkml/2007/8/8/79
[http://marc.info/?l=linux-kernel&m=118655896515049&w=2]
You asked questions and they were answered. Perhaps you didn't like the answers.
Here's a question for you. What kernel boot options did you use? Specifically, for lpj= and boot_delay= ?
Quoted 2 lines
Quoted 2 lines
x86 timer changes perhaps ?
---
~Randy
Quoted 10 lines · Randy Dunlap
Quoted 8 lines · On Mon, 25 Feb 2008 10:14:36 +0800 Dave Young wrote:
Quoted 6 lines · Dave Jones
The
boot_delayswitch seems to be behaving strangely in the
current -git. Setting it to =10 makes the output 'bursty' it becomes slow for some printk's whilst others scroll by at regular speed.
Setting it any higher than that seems to make it pause for a really long time before it outputs any text at all.
Quoted 7 lines
Quoted 2 lines
On my side there's this issue for a long time
http://lkml.org/lkml/2007/8/8/79[http://marc.info/?l=linux-kernel&m=118655896515049&w=2]
You asked questions and they were answered. Perhaps you didn't like the answers.
No, I like it. Thanks.
But I still want to know why mdelay can not be used. is it not available for all archs or something else?
Quoted 3 lines
Here's a question for you. What kernel boot options did you use? Specifically, for lpj= and boot_delay= ?
I tried boot_delay=100 and boot_delay=200 without lpj set, The result was really slow. It was better with lpj copied from dmesg, but was still slower then mdelay.
I think we can firstly use preset lpj, after delay calibrating just use the system lpj
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
x86 timer changes perhaps ?
---
~Randy
Quoted 26 lines · Dave Young
Quoted 10 lines · Randy Dunlap
Quoted 8 lines · On Mon, 25 Feb 2008 10:14:36 +0800 Dave Young wrote:
Quoted 6 lines · Dave Jones
The
boot_delayswitch seems to be behaving strangely in the
current -git. Setting it to =10 makes the output 'bursty' it becomes slow for some printk's whilst others scroll by at regular speed.
Setting it any higher than that seems to make it pause for a really long time before it outputs any text at all.Quoted 7 lines
Quoted 2 lines
On my side there's this issue for a long time
http://lkml.org/lkml/2007/8/8/79[http://marc.info/?l=linux-kernel&m=118655896515049&w=2]
You asked questions and they were answered. Perhaps you didn't like the answers.
No, I like it. Thanks.
But I still want to know why mdelay can not be used. is it not available for all archs or something else?
Quoted 1 line
Quoted 6 lines
Quoted 2 lines
Here's a question for you. What kernel boot options did you use? Specifically, for lpj= and boot_delay= ?
I tried boot_delay=100 and boot_delay=200 without lpj set, The result was really slow. It was better with lpj copied from dmesg, but was still slower then mdelay.
Especially at the very beginning after the message "Booting the kernel", I need to wait several minutes to see the afterwards messages
Quoted 15 lines
I think we can firstly use preset lpj, after delay calibrating just use the system lpj
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
x86 timer changes perhaps ?
---
~Randy
Quoted 30 lines · Dave Young
Quoted 29 lines · Dave Young
Quoted 10 lines · Randy Dunlap
Quoted 8 lines · On Mon, 25 Feb 2008 10:14:36 +0800 Dave Young wrote:
Quoted 6 lines · Dave Jones
The
boot_delayswitch seems to be behaving strangely in the
current -git. Setting it to =10 makes the output 'bursty' it becomes slow for some printk's whilst others scroll by at regular speed.
Setting it any higher than that seems to make it pause for a really long time before it outputs any text at all.Quoted 7 lines
Quoted 2 lines
On my side there's this issue for a long time
http://lkml.org/lkml/2007/8/8/79[http://marc.info/?l=linux-kernel&m=118655896515049&w=2]
You asked questions and they were answered. Perhaps you didn't like the answers.
No, I like it. Thanks.
But I still want to know why mdelay can not be used. is it not available for all archs or something else?
Quoted 3 lines
Here's a question for you. What kernel boot options did you use? Specifically, for lpj= and boot_delay= ?
Quoted 22 lines
Quoted 3 lines
I tried boot_delay=100 and boot_delay=200 without lpj set, The result was really slow. It was better with lpj copied from dmesg, but was still slower then mdelay.
Especially at the very beginning after the message "Booting the kernel", I need to wait several minutes to see the afterwards messages
Quoted 15 lines
I think we can firstly use preset lpj, after delay calibrating just use the system lpj
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
x86 timer changes perhaps ?
---
~Randy
How about use loops_per_jiffy as following? With this patch at least for me the very long delay at the very begining does not occur.
kernel/printk.c | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
kernel/printk.c +4 -11
@@ -173,24 +173,14 @@ __setup("log_buf_len=", log_buf_len_setu#ifdef CONFIG_BOOT_PRINTK_DELAY static unsigned int boot_delay;/* msecs delay after each printk during bootup */ -static unsigned long long printk_delay_msec;/* per msec, based on boot_delay */ static int __init boot_delay_setup (char *str) { -unsigned long lpj; -unsigned long long loops_per_msec; - - lpj = preset_lpj ? preset_lpj :1000000 ;/* some guess */ - loops_per_msec = (unsigned long long )lpj /1000 *HZ ; -get_option (&str, &boot_delay);if (boot_delay >10 *1000 ) boot_delay =0 ; - printk_delay_msec = loops_per_msec; -printk (KERN_DEBUG "boot_delay: %u, preset_lpj: %ld, lpj: %lu, " -"HZ: %d, printk_delay_msec: %llu\n" , - boot_delay, preset_lpj, lpj,HZ , printk_delay_msec); +printk (KERN_DEBUG "boot_delay: %u\n" , boot_delay);return 1 ; }__setup ("boot_delay=" , boot_delay_setup);
@@ -199,6 +189,9 @@ static void boot_delay_msec(void) {unsigned long long k;unsigned long timeout; +unsigned long long printk_delay_msec; + + printk_delay_msec = (unsigned long long )loops_per_jiffy /1000 *HZ ;if (boot_delay ==0 || system_state !=SYSTEM_BOOTING )return ;
Quoted 90 lines · On Tue, 26 Feb 2008 17:09:48 +0800 Dave Young wrote:
Quoted 30 lines · Dave Young
Quoted 29 lines · Dave Young
Quoted 10 lines · Randy Dunlap
Quoted 8 lines · On Mon, 25 Feb 2008 10:14:36 +0800 Dave Young wrote:
Quoted 6 lines · Dave Jones
The
boot_delayswitch seems to be behaving strangely in the
current -git. Setting it to =10 makes the output 'bursty' it becomes slow for some printk's whilst others scroll by at regular speed.
Setting it any higher than that seems to make it pause for a really long time before it outputs any text at all.Quoted 7 lines
Quoted 2 lines
On my side there's this issue for a long time
http://lkml.org/lkml/2007/8/8/79[http://marc.info/?l=linux-kernel&m=118655896515049&w=2]
You asked questions and they were answered. Perhaps you didn't like the answers.
No, I like it. Thanks.
But I still want to know why mdelay can not be used. is it not available for all archs or something else?
Quoted 3 lines
Here's a question for you. What kernel boot options did you use? Specifically, for lpj= and boot_delay= ?
Quoted 22 lines
Quoted 3 lines
I tried boot_delay=100 and boot_delay=200 without lpj set, The result was really slow. It was better with lpj copied from dmesg, but was still slower then mdelay.
Especially at the very beginning after the message "Booting the kernel", I need to wait several minutes to see the afterwards messages
Quoted 15 lines
I think we can firstly use preset lpj, after delay calibrating just use the system lpj
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
x86 timer changes perhaps ?
---
~RandyHow about use
loops_per_jiffyas following? With this patch at least for me the very long delay at the very begining does not occur.
kernel/printk.c| 15 ++++-----------1 file changed, 4 insertions(+), 11 deletions(-)diff -upr
linux/kernel/printk.clinux.new/kernel/printk.ckernel/printk.c +1
-11@@ -173,24 +173,14 @@ __setup("log_buf_len=", log_buf_len_setu#ifdef CONFIG_BOOT_PRINTK_DELAY static unsigned int boot_delay;/* msecs delay after each printk during bootup */ -static unsigned long long printk_delay_msec;/* per msec, based on boot_delay */ static int __init boot_delay_setup (char *str) { -unsigned long lpj; -unsigned long long loops_per_msec; - - lpj = preset_lpj ? preset_lpj :1000000 ;/* some guess */ - loops_per_msec = (unsigned long long )lpj /1000 *HZ ; -get_option (&str, &boot_delay);if (boot_delay >10 *1000 ) boot_delay =0 ; - printk_delay_msec = loops_per_msec; -printk (KERN_DEBUG "boot_delay: %u, preset_lpj: %ld, lpj: %lu, " -"HZ: %d, printk_delay_msec: %llu\n" , - boot_delay, preset_lpj, lpj,HZ , printk_delay_msec); +printk (KERN_DEBUG "boot_delay: %u\n" , boot_delay);return 1 ; }__setup ("boot_delay=" , boot_delay_setup);
kernel/printk.c static void boot_delay_msec(void)
Quoted 10 lines
kernel/printk.c +3
-1@@ -199,6 +189,9 @@ static void boot_delay_msec(void) {unsigned long long k;unsigned long timeout; +unsigned long long printk_delay_msec; + + printk_delay_msec = (unsigned long long )loops_per_jiffy /1000 *HZ ;if (boot_delay ==0 || system_state !=SYSTEM_BOOTING )return ; --
Hi Dave,
That might work, but IMO it requires someone to audit all architectures to make sure that loops_per_jiffy has been calibrated at that point in time (as I mentioned in http://lkml.org/lkml/2007/8/11/153).
I didn't do that and you said that you tested i386 only.
Maybe you can get Andrew to merge it into -mm for testing...
However, setting boot_delay=N without setting lpj=M is just not advisable. The Kconfig help text for BOOT_PRINTK_DELAY tries to say that. Maybe it needs to be stronger?
It is likely that you would also need to use "lpj=M" to preset the "loops per jiffie" value.
See a previous boot log for the "lpj" value to use for your system, and then set "lpj=M" before setting "boot_delay=N".
---
~Randy
Quoted 106 lines · Randy Dunlap
Quoted 90 lines · On Tue, 26 Feb 2008 17:09:48 +0800 Dave Young wrote:
Quoted 30 lines · Dave Young
Quoted 29 lines · Dave Young
Quoted 10 lines · Randy Dunlap
Quoted 8 lines · On Mon, 25 Feb 2008 10:14:36 +0800 Dave Young wrote:
Quoted 6 lines · Dave Jones
The
boot_delayswitch seems to be behaving strangely in the
current -git. Setting it to =10 makes the output 'bursty' it becomes slow for some printk's whilst others scroll by at regular speed.
Setting it any higher than that seems to make it pause for a really long time before it outputs any text at all.Quoted 7 lines
Quoted 2 lines
On my side there's this issue for a long time
http://lkml.org/lkml/2007/8/8/79[http://marc.info/?l=linux-kernel&m=118655896515049&w=2]
You asked questions and they were answered. Perhaps you didn't like the answers.
No, I like it. Thanks.
But I still want to know why mdelay can not be used. is it not available for all archs or something else?
Quoted 3 lines
Here's a question for you. What kernel boot options did you use? Specifically, for lpj= and boot_delay= ?
Quoted 22 lines
Quoted 3 lines
I tried boot_delay=100 and boot_delay=200 without lpj set, The result was really slow. It was better with lpj copied from dmesg, but was still slower then mdelay.
Especially at the very beginning after the message "Booting the kernel", I need to wait several minutes to see the afterwards messages
Quoted 15 lines
I think we can firstly use preset lpj, after delay calibrating just use the system lpj
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
x86 timer changes perhaps ?
---
~RandyHow about use
loops_per_jiffyas following? With this patch at least for me the very long delay at the very begining does not occur.
kernel/printk.c| 15 ++++-----------1 file changed, 4 insertions(+), 11 deletions(-)diff -upr
linux/kernel/printk.clinux.new/kernel/printk.ckernel/printk.c 2008-02-26 16:59:02.000000000 +0800 renamed from kernel/printk.c 2008-02-26 16:54:23.000000000 +0800 +1
-11@@ -173,24 +173,14 @@ __setup("log_buf_len=", log_buf_len_setu #ifdef CONFIG_BOOT_PRINTK_DELAY static unsigned int boot_delay; /* msecs delay after each printk during bootup */ -static unsigned long long printk_delay_msec; /* per msec, based on boot_delay */ static int __init boot_delay_setup(char *str) { - unsigned long lpj; - unsigned long long loops_per_msec; - - lpj = preset_lpj ? preset_lpj : 1000000; /* some guess */ - loops_per_msec = (unsigned long long)lpj / 1000 * HZ; - get_option(&str, &boot_delay); if (boot_delay > 10 * 1000) boot_delay = 0; - printk_delay_msec = loops_per_msec; - printk(KERN_DEBUG "boot_delay: %u, preset_lpj: %ld, lpj: %lu, " - "HZ: %d, printk_delay_msec: %llu\n", - boot_delay, preset_lpj, lpj, HZ, printk_delay_msec); + printk(KERN_DEBUG "boot_delay: %u\n", boot_delay); return 1; } __setup("boot_delay=", boot_delay_setup);kernel/printk.c 2008-02-26 16:59:02.000000000 +0800 static void boot_delay_msec(void)
Quoted 10 lines
kernel/printk.c 2008-02-26 16:59:02.000000000 +0800 renamed from kernel/printk.c 2008-02-26 16:54:23.000000000 +0800 +3
-1@@ -199,6 +189,9 @@ static void boot_delay_msec(void) { unsigned long long k; unsigned long timeout; + unsigned long long printk_delay_msec; + + printk_delay_msec = (unsigned long long)loops_per_jiffy / 1000 * HZ; if (boot_delay == 0 || system_state != SYSTEM_BOOTING) return; --Hi Dave,
Quoted 4 lines
That might work, but IMO it requires someone to audit all architectures to make sure that
loops_per_jiffyhas been calibrated at that point in time
(as I mentioned in http://lkml.org/lkml/2007/8/11/153).
Sorry for missing your words about this.
Quoted 4 lines
I didn't do that and you said that you tested i386 only.
Maybe you can get Andrew to merge it into -mm for testing...
Andrew, what's your opinon?
Quoted 4 lines
However, setting boot_delay=N without setting lpj=M is just not advisable. The
Kconfighelp text forBOOT_PRINTK_DELAYtries to say that. Maybe it needs to be stronger?
I think it's enough now.
I tested boot_delay yestoday, and found the result is different with before version.
Even with lpj preset the delay is very slow, 5-10 seconds for every printk. Maybe this is what davej said.
I will do some more test and hack about this today.
Quoted 10 lines
It is likely that you would also need to use "lpj=M" to preset the "loops per jiffie" value.
See a previous boot log for the "lpj" value to use for your system, and then set "lpj=M" before setting "boot_delay=N".---
~Randy
Quoted 8 lines · Dave Jones
The
boot_delayswitch seems to be behaving strangely in the current -git. Setting it to =10 makes the output 'bursty' it becomes slow for some printk's whilst others scroll by at regular speed.
Setting it any higher than that seems to make it pause for a really long time before it outputs any text at all.x86 timer changes perhaps ?
If nohz=off highres=off notsc fixes it, it is probably timers :-).
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 36 lines · Dave Young
Quoted 34 lines · Randy Dunlap
Quoted 31 lines · On Tue, 26 Feb 2008 17:09:48 +0800 Dave Young wrote:
Quoted 30 lines · Dave Young
Quoted 29 lines · Dave Young
Quoted 10 lines · Randy Dunlap
Quoted 8 lines · On Mon, 25 Feb 2008 10:14:36 +0800 Dave Young wrote:
Quoted 6 lines · Dave Jones
The
boot_delayswitch seems to be behaving strangely in the
current -git. Setting it to =10 makes the output 'bursty' it becomes slow for some printk's whilst others scroll by at regular speed.
Setting it any higher than that seems to make it pause for a really long time before it outputs any text at all.Quoted 7 lines
Quoted 2 lines
On my side there's this issue for a long time
http://lkml.org/lkml/2007/8/8/79[http://marc.info/?l=linux-kernel&m=118655896515049&w=2]
You asked questions and they were answered. Perhaps you didn't like the answers.
No, I like it. Thanks.
But I still want to know why mdelay can not be used. is it not available for all archs or something else?
Quoted 3 lines
Here's a question for you. What kernel boot options did you use? Specifically, for lpj= and boot_delay= ?
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
I tried boot_delay=100 and boot_delay=200 without lpj set, The result was really slow. It was better with lpj copied from dmesg, but was still slower then mdelay.
Especially at the very beginning after the message "Booting the kernel", I need to wait several minutes to see the afterwards messages
Answer to myself : It's due to the first delayed printk.
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
I think we can firstly use preset lpj, after delay calibrating just use the system lpj
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
x86 timer changes perhaps ?
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
---
~RandyHow about use
loops_per_jiffyas following? With this patch at least for me the very long delay at the very begining does not occur.
It does impoving the code, but does not resolve problem here.
It looks ok because the loops_per_jiffy initial value is 4096, with this value the delay result is much better than with values copied from calibrated results.
BTW, Pavel's suggest (nohz=off highres=off notsc) does not help me.
Quoted 90 lines
Quoted 47 lines
Quoted 34 lines
kernel/printk.c| 15 ++++-----------1 file changed, 4 insertions(+), 11 deletions(-)diff -upr
linux/kernel/printk.clinux.new/kernel/printk.ckernel/printk.c 2008-02-26 16:59:02.000000000 +0800 renamed from kernel/printk.c 2008-02-26 16:54:23.000000000 +0800 +1
-11@@ -173,24 +173,14 @@ __setup("log_buf_len=", log_buf_len_setu #ifdef CONFIG_BOOT_PRINTK_DELAY static unsigned int boot_delay; /* msecs delay after each printk during bootup */ -static unsigned long long printk_delay_msec; /* per msec, based on boot_delay */ static int __init boot_delay_setup(char *str) { - unsigned long lpj; - unsigned long long loops_per_msec; - - lpj = preset_lpj ? preset_lpj : 1000000; /* some guess */ - loops_per_msec = (unsigned long long)lpj / 1000 * HZ; - get_option(&str, &boot_delay); if (boot_delay > 10 * 1000) boot_delay = 0; - printk_delay_msec = loops_per_msec; - printk(KERN_DEBUG "boot_delay: %u, preset_lpj: %ld, lpj: %lu, " - "HZ: %d, printk_delay_msec: %llu\n", - boot_delay, preset_lpj, lpj, HZ, printk_delay_msec); + printk(KERN_DEBUG "boot_delay: %u\n", boot_delay); return 1; } __setup("boot_delay=", boot_delay_setup);kernel/printk.c 2008-02-26 16:59:02.000000000 +0800 static void boot_delay_msec(void)
Quoted 10 lines
kernel/printk.c 2008-02-26 16:59:02.000000000 +0800 renamed from kernel/printk.c 2008-02-26 16:54:23.000000000 +0800 +3
-1@@ -199,6 +189,9 @@ static void boot_delay_msec(void) { unsigned long long k; unsigned long timeout; + unsigned long long printk_delay_msec; + + printk_delay_msec = (unsigned long long)loops_per_jiffy / 1000 * HZ; if (boot_delay == 0 || system_state != SYSTEM_BOOTING) return; --Hi Dave,
Quoted 4 lines
That might work, but IMO it requires someone to audit all architectures to make sure that
loops_per_jiffyhas been calibrated at that point in time
(as I mentioned in http://lkml.org/lkml/2007/8/11/153).Sorry for missing your words about this.
Quoted 4 lines
I didn't do that and you said that you tested i386 only.
Maybe you can get Andrew to merge it into -mm for testing...
Andrew, what's your opinon?
Quoted 4 lines
However, setting boot_delay=N without setting lpj=M is just not advisable. The
Kconfighelp text forBOOT_PRINTK_DELAYtries to say that. Maybe it needs to be stronger?I think it's enough now.
I tested
boot_delayyestoday, and found the result is different with before version.
Even with lpj preset the delay is very slow, 5-10 seconds for every printk. Maybe this is what davej said.I will do some more test and hack about this today.
Quoted 10 lines
It is likely that you would also need to use "lpj=M" to preset the "loops per jiffie" value.
See a previous boot log for the "lpj" value to use for your system, and then set "lpj=M" before setting "boot_delay=N".---
~Randy