All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Vegard Nossum <vegard.nossum@gmail.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>,
	Hugh Dickins <hugh@veritas.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: Fix printk format strings
Date: Wed, 10 Oct 2007 23:53:06 -0700	[thread overview]
Message-ID: <20071010235306.c71afe66.akpm@linux-foundation.org> (raw)
In-Reply-To: <1192085221.26648.31.camel@grianne>

On Thu, 11 Oct 2007 08:47:01 +0200 Vegard Nossum <vegard.nossum@gmail.com> wrote:

> This makes sure printk format strings contain no more than a single
> line.
> 
> Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
> ---
>  mm/page_alloc.c |   20 +++++++++++---------
>  1 files changed, 11 insertions(+), 9 deletions(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 1a8c595..96f0b33 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -198,13 +198,15 @@ static inline int bad_range(struct zone *zone, struct page *page)
>  
>  static void bad_page(struct page *page)
>  {
> -	printk(KERN_EMERG "Bad page state in process '%s'\n"
> -		KERN_EMERG "page:%p flags:0x%0*lx mapping:%p mapcount:%d count:%d\n"
> -		KERN_EMERG "Trying to fix it up, but a reboot is needed\n"
> -		KERN_EMERG "Backtrace:\n",
> -		current->comm, page, (int)(2*sizeof(unsigned long)),
> -		(unsigned long)page->flags, page->mapping,
> +	printk(KERN_EMERG "Bad page state in process '%s'\n", current->comm);
> +	printk(KERN_EMERG
> +		"page:%p flags:0x%0*lx mapping:%p mapcount:%d count:%d\n",
> +		page, (int) (2 * sizeof(unsigned long)),
> +		(unsigned long) page->flags, page->mapping,
>  		page_mapcount(page), page_count(page));
> +	printk(KERN_EMERG "Trying to fix it up, but a reboot is needed\n");
> +	printk(KERN_EMERG "Backtrace:\n");
> +
>  	dump_stack();
>  	page->flags &= ~(1 << PG_lru	|
>  			1 << PG_private |
> @@ -1575,13 +1577,13 @@ void show_free_areas(void)
>  		}
>  	}
>  
> -	printk("Active:%lu inactive:%lu dirty:%lu writeback:%lu unstable:%lu\n"
> -		" free:%lu slab:%lu mapped:%lu pagetables:%lu bounce:%lu\n",
> +	printk("Active:%lu inactive:%lu dirty:%lu writeback:%lu unstable:%lu\n",
>  		global_page_state(NR_ACTIVE),
>  		global_page_state(NR_INACTIVE),
>  		global_page_state(NR_FILE_DIRTY),
>  		global_page_state(NR_WRITEBACK),
> -		global_page_state(NR_UNSTABLE_NFS),
> +		global_page_state(NR_UNSTABLE_NFS));
> +	printk(" free:%lu slab:%lu mapped:%lu pagetables:%lu bounce:%lu\n",
>  		global_page_state(NR_FREE_PAGES),
>  		global_page_state(NR_SLAB_RECLAIMABLE) +
>  			global_page_state(NR_SLAB_UNRECLAIMABLE),

I don't understand the reason for this change.


  reply	other threads:[~2007-10-11  6:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-11  6:47 [PATCH] mm: Fix printk format strings Vegard Nossum
2007-10-11  6:53 ` Andrew Morton [this message]
2007-10-11  7:04   ` Vegard Nossum
2007-10-11  7:13     ` Andrew Morton
2007-10-11  7:37       ` Vegard Nossum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071010235306.c71afe66.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=vegard.nossum@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.