From: Mike Kravetz <mike.kravetz@oracle.com>
To: Axel Rasmussen <axelrasmussen@google.com>,
Mina Almasry <almasrymina@google.com>
Cc: Linux-MM <linux-mm@kvack.org>,
Andrea Arcangeli <aarcange@redhat.com>,
Peter Xu <peterx@redhat.com>
Subject: Re: resv_huge_page underflow with userfaultfd test
Date: Tue, 11 May 2021 09:38:12 -0700 [thread overview]
Message-ID: <5d4eb1c7-0e46-7b71-b692-72cee179e0aa@oracle.com> (raw)
In-Reply-To: <CAJHvVcg-eK4Z74AOtsUMafQ5AyWV0Ad0OHRzR6vLvn-80maQ1g@mail.gmail.com>
On 5/10/21 11:45 PM, Axel Rasmussen wrote:
> Thanks for the investigation, Mike!
>
> Mina, since hugetlb_mcopy_atomic_pte is specific to userfaultfd, I'm
> happy to take a deeper look at it this week as well.
>
> For context, we have seen the WARN_ON Mina described trigger in
> production before, but were never able to reproduce it. The
> userfaultfd self test turns out to reproduce it reliably, so the
> thinking up to this point was that it just happened to reproduce some
> non-userfaultfd-specific issue. But from Mike's description, it seems
> this bug is very specific to userfaultfd after all. :)
Certainly, this case is userfaultfd specific.
However, I too recall seeing 'transient' underflows in the past. Pretty
sure this was not userfaultfd specific. Specifically, when working on
commit 22146c3ce989 "hugetlbfs: dirty pages as they are added to pagecache"
I recall seeing transient underflow. After fixing the issue in 22146c3ce989,
I could not reproduce transient underflows and stopped looking for the
cause. We added code to a production kernel in an attmempt to catch
the issue:
https://github.com/oracle/linux-uek/commit/bd697676290d91762ef2bf79832f653b44e6f83b#diff-fb6066ca63d9afdc2e3660c85e2dcc04cf31b37900ca9df2a1019ee8fa80dce0
I'll try running some non-userfaultfd specific tests to see if I can
reproduce.
--
Mike Kravetz
next prev parent reply other threads:[~2021-05-11 16:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-07 21:21 resv_huge_page underflow with userfaultfd test Mina Almasry
2021-05-11 0:33 ` Mike Kravetz
2021-05-11 0:52 ` Mina Almasry
2021-05-11 6:45 ` Axel Rasmussen
2021-05-11 7:08 ` Mina Almasry
2021-05-11 16:38 ` Mike Kravetz [this message]
2021-05-11 19:08 ` Mina Almasry
2021-05-12 2:25 ` Mike Kravetz
2021-05-12 2:35 ` Peter Xu
2021-05-12 3:06 ` Mike Kravetz
[not found] ` <20210512065813.89270-1-almasrymina@google.com>
2021-05-12 7:44 ` [PATCH] mm, hugetlb: fix resv_huge_pages underflow on UFFDIO_COPY Mina Almasry
[not found] ` <CAJHvVch0ZMapPVEc0Ge5V4KDgNDNhECbqwDi0y9XxsxFXQZ-gg@mail.gmail.com>
[not found] ` <c455d241-11f6-95a6-eb29-0ddd94eedbd7@oracle.com>
2021-05-12 19:42 ` Mina Almasry
2021-05-12 20:14 ` Peter Xu
2021-05-12 21:31 ` Mike Kravetz
2021-05-12 21:52 ` Mina Almasry
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=5d4eb1c7-0e46-7b71-b692-72cee179e0aa@oracle.com \
--to=mike.kravetz@oracle.com \
--cc=aarcange@redhat.com \
--cc=almasrymina@google.com \
--cc=axelrasmussen@google.com \
--cc=linux-mm@kvack.org \
--cc=peterx@redhat.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).