linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 11/11] mm: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
       [not found] <cover.1242407227.git.joe@perches.com>
@ 2009-05-15 17:59 ` Joe Perches
  2009-05-15 18:56   ` Serge E. Hallyn
  2009-05-15 19:40   ` David Rientjes
  0 siblings, 2 replies; 4+ messages in thread
From: Joe Perches @ 2009-05-15 17:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-mm, Andrew Morton, James Morris, David Rientjes,
	Serge Hallyn, David Howells

From: Joe Perches <joe@perches.com>

Signed-off-by: Joe Perches <joe@perches.com>
---
 mm/oom_kill.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 92bcf1d..8f7fb51 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -159,10 +159,8 @@ unsigned long badness(struct task_struct *p, unsigned long uptime)
 			points >>= -(p->oomkilladj);
 	}
 
-#ifdef DEBUG
-	printk(KERN_DEBUG "OOMkill: task %d (%s) got %lu points\n",
-	p->pid, p->comm, points);
-#endif
+	pr_debug("OOMkill: task %d (%s) got %lu points\n",
+		 p->pid, p->comm, points);
 	return points;
 }
 
-- 
1.6.3.1.9.g95405b.dirty

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH 11/11] mm: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
  2009-05-15 17:59 ` [PATCH 11/11] mm: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug( Joe Perches
@ 2009-05-15 18:56   ` Serge E. Hallyn
  2009-05-15 19:40     ` Joe Perches
  2009-05-15 19:40   ` David Rientjes
  1 sibling, 1 reply; 4+ messages in thread
From: Serge E. Hallyn @ 2009-05-15 18:56 UTC (permalink / raw)
  To: Joe Perches
  Cc: linux-kernel, linux-mm, Andrew Morton, James Morris,
	David Rientjes, David Howells

Quoting Joe Perches (joe@perches.com):
> From: Joe Perches <joe@perches.com>
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Seems reasonable - apart from my woes with dynamic_printk :)

Can you also remove the commented-out '#define DEBUG' line on
line 35 if you haven't already?

Acked-by: Serge Hallyn <serue@us.ibm.com>

thanks,
-serge

> ---
>  mm/oom_kill.c |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> index 92bcf1d..8f7fb51 100644
> --- a/mm/oom_kill.c
> +++ b/mm/oom_kill.c
> @@ -159,10 +159,8 @@ unsigned long badness(struct task_struct *p, unsigned long uptime)
>  			points >>= -(p->oomkilladj);
>  	}
> 
> -#ifdef DEBUG
> -	printk(KERN_DEBUG "OOMkill: task %d (%s) got %lu points\n",
> -	p->pid, p->comm, points);
> -#endif
> +	pr_debug("OOMkill: task %d (%s) got %lu points\n",
> +		 p->pid, p->comm, points);
>  	return points;
>  }
> 
> -- 
> 1.6.3.1.9.g95405b.dirty

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH 11/11] mm: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
  2009-05-15 18:56   ` Serge E. Hallyn
@ 2009-05-15 19:40     ` Joe Perches
  0 siblings, 0 replies; 4+ messages in thread
From: Joe Perches @ 2009-05-15 19:40 UTC (permalink / raw)
  To: Serge E. Hallyn
  Cc: linux-kernel, linux-mm, Andrew Morton, James Morris,
	David Rientjes, David Howells

On Fri, 2009-05-15 at 13:56 -0500, Serge E. Hallyn wrote:
> Seems reasonable - apart from my woes with dynamic_printk :)

pr_devel instead?


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH 11/11] mm: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug(
  2009-05-15 17:59 ` [PATCH 11/11] mm: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug( Joe Perches
  2009-05-15 18:56   ` Serge E. Hallyn
@ 2009-05-15 19:40   ` David Rientjes
  1 sibling, 0 replies; 4+ messages in thread
From: David Rientjes @ 2009-05-15 19:40 UTC (permalink / raw)
  To: Joe Perches
  Cc: linux-kernel, linux-mm, Andrew Morton, James Morris,
	Serge Hallyn, David Howells

On Fri, 15 May 2009, Joe Perches wrote:

> diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> index 92bcf1d..8f7fb51 100644
> --- a/mm/oom_kill.c
> +++ b/mm/oom_kill.c
> @@ -159,10 +159,8 @@ unsigned long badness(struct task_struct *p, unsigned long uptime)
>  			points >>= -(p->oomkilladj);
>  	}
>  
> -#ifdef DEBUG
> -	printk(KERN_DEBUG "OOMkill: task %d (%s) got %lu points\n",
> -	p->pid, p->comm, points);
> -#endif
> +	pr_debug("OOMkill: task %d (%s) got %lu points\n",
> +		 p->pid, p->comm, points);
>  	return points;
>  }
>  

You can just remove the entire printk() since this information is now 
exported via /proc/pid/oom_score.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2009-05-15 19:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1242407227.git.joe@perches.com>
2009-05-15 17:59 ` [PATCH 11/11] mm: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug( Joe Perches
2009-05-15 18:56   ` Serge E. Hallyn
2009-05-15 19:40     ` Joe Perches
2009-05-15 19:40   ` David Rientjes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox