lkml.org 
[lkml]   [2021]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v2 2/3] mm: Allow architectures to request 'old' entries when prefaulting
On Fri, Jan 08, 2021 at 05:15:16PM +0000, Will Deacon wrote:
> diff --git a/mm/filemap.c b/mm/filemap.c
> index c1f2dc89b8a7..0fb9d1714797 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -3051,14 +3051,18 @@ vm_fault_t filemap_map_pages(struct vm_fault *vmf,
> if (!pte_none(*vmf->pte))
> goto unlock;
>
> + /* We're about to handle the fault */
> + if (vmf->address == address) {
> + vmf->flags &= ~FAULT_FLAG_PREFAULT;
> + ret = VM_FAULT_NOPAGE;
> + } else {
> + vmf->flags |= FAULT_FLAG_PREFAULT;
> + }
> +

Do we need to restore the oririnal status of the bit once we are done?

--
Kirill A. Shutemov

\
 
 \ /
  Last update: 2021-01-11 15:41    [W:0.191 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site