linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrea Arcangeli <aarcange@redhat.com>
To: Brian Geffon <bgeffon@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm <linux-mm@kvack.org>,
	linux-kernel@vger.kernel.org,
	Mike Rapoport <rppt@linux.vnet.ibm.com>,
	Sonny Rao <sonnyrao@google.com>,
	"Kirill A . Shutemov" <kirill@shutemov.name>,
	Peter Xu <peterx@redhat.com>
Subject: Re: [RFC PATCH] userfaultfd: Address race after fault.
Date: Fri, 14 Feb 2020 18:19:54 -0500	[thread overview]
Message-ID: <20200214231954.GA29849@redhat.com> (raw)
In-Reply-To: <20200214225849.108108-1-bgeffon@google.com>

Hello,

this and other enhancements have already implemented by Peter (CC'ed)
and in the right way, by altering the retry logic in the page fault
code. This is a requirement for other kind of usages too, notably the
UFFD_WRITEPROTECT ioctl after which multiple consecutive faults can
happen and must be handled.

IIRC Kirill asked at last LSF-MM uffd-wp talk if there's any
particular reason the fault couldn't be retried currently. I had no
sure answer other than there's apparently no strong reason why
VM_FAULT_RETRY is only allowed 1 time currently, so there should be no
issue in lifting that artificial restriction.

I'm running with this patchset applied in my systems since Nov with no
regression at all. I got sidetracked by various other issues, so
unfortunately I didn' post a proper reviewed-by on the last submit yet
(pending), but I did at least test it and it was rock solid so far.

https://lore.kernel.org/lkml/20190926093904.5090-1-peterx@redhat.com/

Can you test and verify it too if it solves your use case?

Also note the complete uffd-WP support submit also from Peter:

https://lore.kernel.org/lkml/20190620022008.19172-1-peterx@redhat.com/

https://github.com/xzpeter/linux/tree/uffd-wp-merged

Thanks,
Andrea



  reply	other threads:[~2020-02-14 23:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-14 22:58 [RFC PATCH] userfaultfd: Address race after fault Brian Geffon
2020-02-14 23:19 ` Andrea Arcangeli [this message]
2020-02-15 14:29   ` Brian Geffon
2020-02-17 16:07     ` Peter Xu
2020-02-18  1:50       ` Brian Geffon
2020-02-18  2:26         ` Andrea Arcangeli
2020-02-18  2:37           ` Brian Geffon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200214231954.GA29849@redhat.com \
    --to=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=bgeffon@google.com \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=peterx@redhat.com \
    --cc=rppt@linux.vnet.ibm.com \
    --cc=sonnyrao@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).