Commit 233fe0bb authored by Lokesh Gidra's avatar Lokesh Gidra Committed by Oleksiy Avramchenko
Browse files

ANDROID: userfaultfd: allow SPF for UFFD_FEATURE_SIGBUS on private+anon



Currently we bail out of speculative page fault when we detect that the
fault address is in a userfaultfd registered vma. However, if userfaultfd
is being used with UFFD_FEATURE_SIGBUS feature, then handle_userfault()
doesn't do much and is easiest to handle with SPF. This patch lets
MISSING userfaultfs on private anonymous mappings be allowed with SPF if
UFFD_FEATURE_SIGBUS is used.

With this patch we get >99% success rate for userfaults caused during
userfaultfd GC's compaction phase. This translates into eliminating
uninterruptible sleep time in do_page_fault() due to userfaults.

ABI breakage note: 'userfaultfd_ctx' struct, which has been modified in
this CL, is private and hence cannot cause real breakage.

Bug: 329560865
Bug: 324640390
Bug: 320478828
Signed-off-by: default avatarLokesh Gidra <lokeshgidra@google.com>
Change-Id: Ic7fde0fde03602b35179bc0cf891ddbbc434190f
(cherry picked from commit ee9964b3)
(cherry picked from commit 9b613572)
parent 8f68dbc2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment