[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YUvj9r3Y954pYPnf@xz-m1.local>
Date: Wed, 22 Sep 2021 22:18:30 -0400
From: Peter Xu <peterx@...hat.com>
To: Hugh Dickins <hughd@...gle.com>,
Axel Rasmussen <axelrasmussen@...gle.com>
Cc: Axel Rasmussen <axelrasmussen@...gle.com>,
LKML <linux-kernel@...r.kernel.org>,
Linux MM <linux-mm@...ck.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Andrea Arcangeli <aarcange@...hat.com>,
Nadav Amit <nadav.amit@...il.com>
Subject: Re: [PATCH] mm/khugepaged: Detecting uffd-wp vma more efficiently
On Wed, Sep 22, 2021 at 06:22:45PM -0700, Hugh Dickins wrote:
> No, I think I misunderstood you before: thanks for re-explaining.
> (And Axel's !userfaultfd_minor() check before calling do_fault_around()
> plays an important part in making sure that it does reach shmem_fault().)
Still thanks for confirming this, Hugh.
Said that, Axel, I didn't mean I'm against doing something similar like
uffd-wp; it's just a heads-up that maybe you won't find a reproducer with real
issues with minor mode.
Even if I think minor mode should be fine with current code, we could still
choose to disable khugepaged from removing the pmd for VM_UFFD_MINOR vmas, just
like what we'll do with VM_UFFD_WP. At least it can still reduce false
positives.
So far in my local branch I queued the patch which I attached, that's required
for uffd-wp shmem afaict. If you think minor mode would like that too, I can
post it separately with minor mode added in.
Note that it's slightly different from what I pasted in reply to Yang Shi - I
made it slightly more complicated just to make sure there's no race. I
mentioned the possible race (I think) in the commit log.
Let me know your preference.
Thanks,
--
Peter Xu
View attachment "patch" of type "text/plain" (2699 bytes)
Powered by blists - more mailing lists