lkml.org 
[lkml]   [2022]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] mm,hwpoison: unmap poisoned page before invalidation
From
Date
On Mon, 2022-03-28 at 10:14 +0800, Miaohe Lin wrote:
> On 2022/3/27 4:14, Rik van Riel wrote:
>
>
> >
> > > >                         /* Retry if a clean page was removed
> > > > from
> > > > the cache. */
> > > > -                       if (invalidate_inode_page(vmf->page))
> > > > -                               poisonret = 0;
> > > > -                       unlock_page(vmf->page);
> > > > +                       if (invalidate_inode_page(page))
> > > > +                               poisonret = VM_FAULT_NOPAGE;
> > > > +                       unlock_page(page);
> >
>
> Sure, but when I think more about this, it seems this fix isn't
> ideal:
> If VM_FAULT_NOPAGE is returned with page table unset, the process
> will
> re-trigger page fault again and again until invalidate_inode_page
> succeeds
> to evict the inode page. This might hang the process a really long
> time.
> Or am I miss something?
>
If invalidate_inode_page fails, we will return
VM_FAULT_HWPOISON, and kill the task, instead
of looping indefinitely.

--
All Rights Reversed.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2022-03-28 04:25    [W:0.043 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site