All of lore.kernel.org
 help / color / mirror / Atom feed
* + printk-boot_delay-rename-printk_delay_msec-to-loops_per_msec.patch added to -mm tree
@ 2009-06-23  5:56 akpm
  2009-06-23  7:18 ` Ingo Molnar
  2009-06-23  7:21 ` Ingo Molnar
  0 siblings, 2 replies; 4+ messages in thread
From: akpm @ 2009-06-23  5:56 UTC (permalink / raw)
  To: mm-commits; +Cc: hidave.darkstar, mingo


The patch titled
     printk boot_delay: rename printk_delay_msec to loops_per_msec
has been added to the -mm tree.  Its filename is
     printk-boot_delay-rename-printk_delay_msec-to-loops_per_msec.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: printk boot_delay: rename printk_delay_msec to loops_per_msec
From: Dave Young <hidave.darkstar@gmail.com>

Rename `printk_delay_msec' to `loops_per_msec', because the patch "printk:
add printk_delay to make messages readable for some scenarios" wishes to
more appropriately use the `printk_delay_msec' identifier.

Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 kernel/printk.c |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff -puN kernel/printk.c~printk-boot_delay-rename-printk_delay_msec-to-loops_per_msec kernel/printk.c
--- a/kernel/printk.c~printk-boot_delay-rename-printk_delay_msec-to-loops_per_msec
+++ a/kernel/printk.c
@@ -198,12 +198,11 @@ __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 unsigned long long loops_per_msec;
 
 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;
@@ -212,10 +211,9 @@ static int __init boot_delay_setup(char 
 	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);
+		"HZ: %d, loops_per_msec: %llu\n",
+		boot_delay, preset_lpj, lpj, HZ, loops_per_msec);
 	return 1;
 }
 __setup("boot_delay=", boot_delay_setup);
@@ -228,7 +226,7 @@ static void boot_delay_msec(void)
 	if (boot_delay == 0 || system_state != SYSTEM_BOOTING)
 		return;
 
-	k = (unsigned long long)printk_delay_msec * boot_delay;
+	k = (unsigned long long)loops_per_msec * boot_delay;
 
 	timeout = jiffies + msecs_to_jiffies(boot_delay);
 	while (k) {
_

Patches currently in -mm which might be from hidave.darkstar@gmail.com are

origin.patch
printk-boot_delay-rename-printk_delay_msec-to-loops_per_msec.patch
printk-add-printk_delay-to-make-messages-readable-for-some-scenarios.patch
printk-add-printk_delay-to-make-messages-readable-for-some-scenarios-fix.patch


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

* Re: + printk-boot_delay-rename-printk_delay_msec-to-loops_per_msec.patch added to -mm tree
  2009-06-23  5:56 + printk-boot_delay-rename-printk_delay_msec-to-loops_per_msec.patch added to -mm tree akpm
@ 2009-06-23  7:18 ` Ingo Molnar
  2009-06-23  7:21 ` Ingo Molnar
  1 sibling, 0 replies; 4+ messages in thread
From: Ingo Molnar @ 2009-06-23  7:18 UTC (permalink / raw)
  To: akpm; +Cc: mm-commits, hidave.darkstar, linux-kernel


* akpm@linux-foundation.org <akpm@linux-foundation.org> wrote:

> 
> The patch titled
>      printk boot_delay: rename printk_delay_msec to loops_per_msec
> has been added to the -mm tree.  Its filename is
>      printk-boot_delay-rename-printk_delay_msec-to-loops_per_msec.patch
> 
> Before you just go and hit "reply", please:
>    a) Consider who else should be cc'ed
>    b) Prefer to cc a suitable mailing list as well
>    c) Ideally: find the original patch on the mailing list and do a
>       reply-to-all to that, adding suitable additional cc's
> 
> *** Remember to use Documentation/SubmitChecklist when testing your code ***
> 
> See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
> out what to do about this
> 
> The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
> 
> ------------------------------------------------------
> Subject: printk boot_delay: rename printk_delay_msec to loops_per_msec
> From: Dave Young <hidave.darkstar@gmail.com>
> 
> Rename `printk_delay_msec' to `loops_per_msec', because the patch "printk:
> add printk_delay to make messages readable for some scenarios" wishes to
> more appropriately use the `printk_delay_msec' identifier.
> 
> Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
> Cc: Ingo Molnar <mingo@elte.hu>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

For all 3 patches:

  Acked-by: Ingo Molnar <mingo@elte.hu>

	Ingo

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

* Re: + printk-boot_delay-rename-printk_delay_msec-to-loops_per_msec.patch added to -mm tree
  2009-06-23  5:56 + printk-boot_delay-rename-printk_delay_msec-to-loops_per_msec.patch added to -mm tree akpm
  2009-06-23  7:18 ` Ingo Molnar
@ 2009-06-23  7:21 ` Ingo Molnar
  2009-06-23 12:53   ` Dave Young
  1 sibling, 1 reply; 4+ messages in thread
From: Ingo Molnar @ 2009-06-23  7:21 UTC (permalink / raw)
  To: akpm; +Cc: mm-commits, hidave.darkstar, linux-kernel


> +++ a/kernel/printk.c
> @@ -198,12 +198,11 @@ __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 unsigned long long loops_per_msec;

Lost a comment here - on purpose?

> -	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);
> +		"HZ: %d, loops_per_msec: %llu\n",
> +		boot_delay, preset_lpj, lpj, HZ, loops_per_msec);

If you touch debug printks then please use pr_debug().

	Ingo

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

* Re: + printk-boot_delay-rename-printk_delay_msec-to-loops_per_msec.patch added to -mm tree
  2009-06-23  7:21 ` Ingo Molnar
@ 2009-06-23 12:53   ` Dave Young
  0 siblings, 0 replies; 4+ messages in thread
From: Dave Young @ 2009-06-23 12:53 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: akpm, mm-commits, linux-kernel

On Tue, Jun 23, 2009 at 09:21:16AM +0200, Ingo Molnar wrote:
> 
> > +++ a/kernel/printk.c
> > @@ -198,12 +198,11 @@ __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 unsigned long long loops_per_msec;
> 
> Lost a comment here - on purpose?

Yes, I thought loops_per_msec is clearer than printk_delay_msec for boot_delay, but add a comment is fine. 

Andrew have fixed it, thanks.

> 
> > -	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);
> > +		"HZ: %d, loops_per_msec: %llu\n",
> > +		boot_delay, preset_lpj, lpj, HZ, loops_per_msec);
> 
> If you touch debug printks then please use pr_debug().
> 
> 	Ingo

please see the following fix:
--

From: Dave Young <hidave.darkstar@gmail.com>
 
use pr_debug for debug printk.

Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
---
kernel/printk.c |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.orig/kernel/printk.c	2009-06-23 17:48:25.000000000 +0800
+++ linux-2.6/kernel/printk.c	2009-06-23 18:08:18.000000000 +0800
@@ -211,7 +211,7 @@ static int __init boot_delay_setup(char 
 	if (boot_delay > 10 * 1000)
 		boot_delay = 0;
 
-	printk(KERN_DEBUG "boot_delay: %u, preset_lpj: %ld, lpj: %lu, "
+	pr_debug("boot_delay: %u, preset_lpj: %ld, lpj: %lu, "
 		"HZ: %d, loops_per_msec: %llu\n",
 		boot_delay, preset_lpj, lpj, HZ, loops_per_msec);
 	return 1;

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

end of thread, other threads:[~2009-06-23 12:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-23  5:56 + printk-boot_delay-rename-printk_delay_msec-to-loops_per_msec.patch added to -mm tree akpm
2009-06-23  7:18 ` Ingo Molnar
2009-06-23  7:21 ` Ingo Molnar
2009-06-23 12:53   ` Dave Young

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.