public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RFC: Implement hwpoison on free for soft offlining
@ 2010-10-06 22:09 Andi Kleen
  2010-10-06 22:09 ` [PATCH] HWPOISON: Implement hwpoison-on-free " Andi Kleen
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Andi Kleen @ 2010-10-06 22:09 UTC (permalink / raw)
  To: linux-mm; +Cc: linux-kernel, fengguang.wu

Here's a somewhat experimental patch to improve soft offlining
in hwpoison, but allowing hwpoison on free for not directly
freeable page types. It should work for nearly all
left over page types that get eventually freed, so this makes
soft offlining nearly universal. The only non handleable page
types are now pages that never get freed.

Drawback: It needs an additional page flag. Cannot set hwpoison
directly because that would not be "soft" and cause errors.

Since the flags are scarce on 32bit I only enabled it on 64bit.

Comments?

-Andi


^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: [PATCH] HWPOISON: Implement hwpoison-on-free for soft offlining
@ 2010-10-12 12:38 Penttilä Mika
  2010-10-12 14:06 ` Andi Kleen
  0 siblings, 1 reply; 15+ messages in thread
From: Penttilä Mika @ 2010-10-12 12:38 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org

> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -564,6 +564,8 @@ static inline int free_pages_check(struct page *page)
>  		(page->mapping != NULL)  |
>  		(atomic_read(&page->_count) != 0) |
>  		(page->flags & PAGE_FLAGS_CHECK_AT_FREE))) {
> +		if (PageHWPoisonOnFree(page))
> +			hwpoison_page_on_free(page);

hwpoison_page_on_free() seems to be undefined when
CONFIG_HWPOISON_ON_FREE is not defined.

>  		bad_page(page);
>  		return 1;
>  	}

And of course PAGE_FLAGS_CHECK_AT_FREE should include pahehwpoisononfree this to be effective

--Mika



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

end of thread, other threads:[~2010-10-15  8:50 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-06 22:09 RFC: Implement hwpoison on free for soft offlining Andi Kleen
2010-10-06 22:09 ` [PATCH] HWPOISON: Implement hwpoison-on-free " Andi Kleen
2010-10-12 12:26   ` Wu Fengguang
2010-10-12 12:37     ` Andi Kleen
2010-10-12 12:41       ` Wu Fengguang
2010-10-12  8:11 ` RFC: Implement hwpoison on free " Andi Kleen
2010-10-12  9:20   ` KOSAKI Motohiro
2010-10-12 13:14     ` Andi Kleen
2010-10-13  0:15       ` KOSAKI Motohiro
2010-10-15  8:50 ` Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2010-10-12 12:38 [PATCH] HWPOISON: Implement hwpoison-on-free " Penttilä Mika
2010-10-12 14:06 ` Andi Kleen
2010-10-12 14:23   ` Penttilä Mika
2010-10-12 14:30     ` Andi Kleen
2010-10-12 14:33       ` Penttilä Mika

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