Re: [PATCH 08 of 66] fix bad_page to show the real reason the pageis bad

From: Mel Gorman
Date: Thu Nov 18 2010 - 07:40:51 EST


On Wed, Nov 03, 2010 at 04:27:43PM +0100, Andrea Arcangeli wrote:
> From: Andrea Arcangeli <aarcange@xxxxxxxxxx>
>
> page_count shows the count of the head page, but the actual check is done on
> the tail page, so show what is really being checked.
>
> Signed-off-by: Andrea Arcangeli <aarcange@xxxxxxxxxx>
> Acked-by: Rik van Riel <riel@xxxxxxxxxx>
> Acked-by: Mel Gorman <mel@xxxxxxxxx>

This can be sent on its own as it's not really related to THP.

> ---
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -5564,7 +5564,7 @@ void dump_page(struct page *page)
> {
> printk(KERN_ALERT
> "page:%p count:%d mapcount:%d mapping:%p index:%#lx\n",
> - page, page_count(page), page_mapcount(page),
> + page, atomic_read(&page->_count), page_mapcount(page),
> page->mapping, page->index);
> dump_page_flags(page->flags);
> }
>

--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/