lkml.org 
[lkml]   [2009]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] [13/16] HWPOISON: The high level memory error handler in the VM v5
On Thu, Jun 04, 2009 at 05:07:37PM +0800, Wu Fengguang wrote:
>
> > > > + * need this to decide if we should kill or just drop the page.
> > > > + */
> > > > + mapping = page_mapping(p);
> > > > + if (!PageDirty(p) && !PageAnon(p) && !PageSwapBacked(p) &&
> > >
> > > !PageAnon(p) could be removed: the below non-zero mapping check will
> > > do the work implicitly.
> >
> > You mean !page_mapped? Ok.
>
> I mean to do
> mapping = page_mapping(p);
> if (!PageDirty(p) && !PageSwapBacked(p) &&
> mapping && mapping_cap_account_dirty(mapping)) {
>
> Because for anonymous pages, page_mapping == NULL.

I realized this after pressing send. Anyways the PageAnon is dropped
>
> --- sound-2.6.orig/mm/memory-failure.c
> +++ sound-2.6/mm/memory-failure.c
> @@ -660,6 +660,10 @@ static void hwpoison_user_mappings(struc
> break;
> pr_debug("MCE %#lx: try_to_unmap retry needed %d\n", pfn, ret);
> }
> + if (ret != SWAP_SUCCESS)
> + printk(KERN_ERR
> + "MCE %#lx: failed to unmap page (mapcount=%d)!\n",
> + pfn, page_mapcount(p));

Ok.

-Andi

--
ak@linux.intel.com -- Speaking for myself only.


\
 
 \ /
  Last update: 2009-06-04 11:21    [W:0.097 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site