Re: [PATCH] [3/16] POISON: Handle poisoned pages in page free

From: Minchan Kim
Date: Tue Apr 07 2009 - 19:22:05 EST


Hi, Andi.

On Wed, Apr 8, 2009 at 12:09 AM, Andi Kleen <andi@xxxxxxxxxxxxxx> wrote:
>
> Make sure no poisoned pages are put back into the free page
> lists. ÂThis can happen with some races.
>
> This is allo slow path in the bad page bits path, so another
> check doesn't really matter.
>
> Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>
>
> ---
> Âmm/page_alloc.c | Â Â9 +++++++++
> Â1 file changed, 9 insertions(+)
>
> Index: linux/mm/page_alloc.c
> ===================================================================
> --- linux.orig/mm/page_alloc.c Â2009-04-07 16:39:26.000000000 +0200
> +++ linux/mm/page_alloc.c    2009-04-07 16:39:39.000000000 +0200
> @@ -228,6 +228,15 @@
> Â Â Â Âstatic unsigned long nr_unshown;
>
> Â Â Â Â/*
> + Â Â Â Â* Page may have been marked bad before process is freeing it.
> + Â Â Â Â* Make sure it is not put back into the free page lists.
> + Â Â Â Â*/
> + Â Â Â if (PagePoison(page)) {
> + Â Â Â Â Â Â Â /* check more flags here... */

How about adding WARNING with some information(ex, pfn, flags..).


> + Â Â Â Â Â Â Â return;
> + Â Â Â }
> +
> + Â Â Â /*
> Â Â Â Â * Allow a burst of 60 reports, then keep quiet for that minute;
> Â Â Â Â * or allow a steady drip of one report per second.
> Â Â Â Â */
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@xxxxxxxxxx ÂFor more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>
>



--
Kinds regards,
Minchan Kim
--
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/