lkml.org 
[lkml]   [2009]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/22] HWPOISON: Handle hardware poisoned pages in try_to_unmap
On Mon, Jun 15, 2009 at 09:09:03PM +0800, Minchan Kim wrote:
> On Mon, Jun 15, 2009 at 11:45 AM, Wu Fengguang<fengguang.wu@intel.com> wrote:
> > From: Andi Kleen <ak@linux.intel.com>
> >
> > When a page has the poison bit set replace the PTE with a poison entry.
> > This causes the right error handling to be done later when a process runs
> > into it.
> >
> > Also add a new flag to not do that (needed for the memory-failure handler
> > later)
> >
> > Reviewed-by: Wu Fengguang <fengguang.wu@intel.com>
> > Signed-off-by: Andi Kleen <ak@linux.intel.com>
> >
> > ---
> >  include/linux/rmap.h |    1 +
> >  mm/rmap.c            |    9 ++++++++-
> >  2 files changed, 9 insertions(+), 1 deletion(-)
> >
> > --- sound-2.6.orig/mm/rmap.c
> > +++ sound-2.6/mm/rmap.c
> > @@ -958,7 +958,14 @@ static int try_to_unmap_one(struct page
> >        /* Update high watermark before we lower rss */
> >        update_hiwater_rss(mm);
> >
> > -       if (PageAnon(page)) {
> > +       if (PageHWPoison(page) && !(flags & TTU_IGNORE_HWPOISON)) {
> > +               if (PageAnon(page))
> > +                       dec_mm_counter(mm, anon_rss);
> > +               else if (!is_migration_entry(pte_to_swp_entry(*pte)))
>
> Isn't it straightforward to use !is_hwpoison_entry ?

Good catch! It looks like a redundant check: the
page_check_address() at the beginning of the function guarantees that
!is_migration_entry() or !is_migration_entry() tests will all be TRUE.

So let's do this?

-               else if (!is_migration_entry(pte_to_swp_entry(*pte)))
+               else


Thanks,
Fengguang
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-06-15 17:29    [W:0.119 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site