[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190124053647.GG18231@xz-x1>
Date: Thu, 24 Jan 2019 13:36:47 +0800
From: Peter Xu <peterx@...hat.com>
To: Mike Rapoport <rppt@...ux.ibm.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Hugh Dickins <hughd@...gle.com>,
Maya Gokhale <gokhale2@...l.gov>,
Jerome Glisse <jglisse@...hat.com>,
Johannes Weiner <hannes@...xchg.org>,
Martin Cracauer <cracauer@...s.org>,
Denis Plotnikov <dplotnikov@...tuozzo.com>,
Shaohua Li <shli@...com>,
Andrea Arcangeli <aarcange@...hat.com>,
Pavel Emelyanov <xemul@...allels.com>,
Mike Kravetz <mike.kravetz@...cle.com>,
Marty McFadden <mcfadden8@...l.gov>,
Mike Rapoport <rppt@...ux.vnet.ibm.com>,
Mel Gorman <mgorman@...e.de>,
"Kirill A . Shutemov" <kirill@...temov.name>,
"Dr . David Alan Gilbert" <dgilbert@...hat.com>
Subject: Re: [PATCH RFC 20/24] userfaultfd: wp: don't wake up when doing
write protect
On Mon, Jan 21, 2019 at 01:10:39PM +0200, Mike Rapoport wrote:
> On Mon, Jan 21, 2019 at 03:57:18PM +0800, Peter Xu wrote:
> > It does not make sense to try to wake up any waiting thread when we're
> > write-protecting a memory region. Only wake up when resolving a write
> > protected page fault.
>
> Probably it would be better to make it default to wake up only when
> requested explicitly?
Yes, I think that's what this series does?
Now when we do UFFDIO_WRITEPROTECT with !WP and !DONTWAKE then we'll
first resolve the page fault, then wake up the process properly. And
we request that explicity using !WP and DONTWAKE.
Or did I misunderstood the question?
> Then we can simply disallow _DONTWAKE for uffd_wp and only use
> UFFDIO_WRITEPROTECT_MODE_WP as possible mode.
I'd admit I don't know the major usage of DONTWAKE (and I'd be glad to
know...), however since we have this flag for both UFFDIO_COPY and
UFFDIO_ZEROCOPY, then it seems sane to have DONTWAKE for WRITEPROTECT
too? Or is there any other explicit reason to omit it?
Thanks!
--
Peter Xu
Powered by blists - more mailing lists