lkml.org 
[lkml]   [2022]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 1/2] mm/hugetlb: fix hugetlb not supporting write-notify
On 08/05/22 14:14, Peter Xu wrote:
> On Fri, Aug 05, 2022 at 01:03:28PM +0200, David Hildenbrand wrote:
> > diff --git a/mm/mmap.c b/mm/mmap.c
> > index 61e6135c54ef..462a6b0344ac 100644
> > --- a/mm/mmap.c
> > +++ b/mm/mmap.c
> > @@ -1683,6 +1683,13 @@ int vma_wants_writenotify(struct vm_area_struct *vma, pgprot_t vm_page_prot)
> > if ((vm_flags & (VM_WRITE|VM_SHARED)) != ((VM_WRITE|VM_SHARED)))
> > return 0;
> >
> > + /*
> > + * Hugetlb does not require/support writenotify; especially, it does not
> > + * support softdirty tracking.
> > + */
> > + if (is_vm_hugetlb_page(vma))
> > + return 0;
>
> I'm kind of confused here.. you seems to be fixing up soft-dirty for
> hugetlb but here it's explicitly forbidden.
>
> Could you explain a bit more on why this patch is needed if (assume
> there'll be a working) patch 2 being provided?
>

No comments on the patch, but ...

Since it required little thought, I ran the test program on next-20220802 and
was surprised that the issue did not recreate. Even added a simple printk
to make sure we were getting into vma_wants_writenotify with a hugetlb vma.
We were.

I can easily recreate with an older Fedora kernel.

Will be trying to understand why this is the case.
--
Mike Kravetz

\
 
 \ /
  Last update: 2022-08-05 20:24    [W:1.142 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site