From: Peter Xu <peterx@redhat.com>
To: hev <r@hev.cc>
Cc: Anatoly Pugachev <matorola@gmail.com>,
Thorsten Leemhuis <regressions@leemhuis.info>,
Sparc kernel list <sparclinux@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>
Subject: Re: Test case for "mm/thp: carry over dirty bit when thp splits on pmd"
Date: Fri, 25 Nov 2022 13:42:36 -0500 [thread overview]
Message-ID: <Y4EMnNiLdC7G+oKu@x1n> (raw)
In-Reply-To: <CAHirt9jjjcj9FdhiJZJLhA-7iNRrWgsMYDYPpyOc0a_k7NhGqA@mail.gmail.com>
On Fri, Nov 25, 2022 at 07:38:36PM +0800, hev wrote:
> On Tue, Nov 22, 2022 at 2:55 AM Peter Xu <peterx@redhat.com> wrote:
> >
> > Hi, Anatoly (or/and Hev),
> >
> > On Wed, Nov 16, 2022 at 01:45:15PM +0300, Anatoly Pugachev wrote:
> > > On Wed, Nov 16, 2022 at 11:49 AM hev <r@hev.cc> wrote:
> > > >
> > > > Hello Peter,
> > > >
> > > > I see a random crash issue on the LoongArch system, that is caused by
> > > > commit 0ccf7f1 ("mm/thp: carry over dirty bit when thp splits on
> > > > pmd").
> > > >
> > > > Now, the thing is already resolved. The root cause is arch's mkdirty
> > > > is set hardware writable bit in unconditional. That breaks
> > > > write-protect and then breaks COW.
> > > >
> > > > Here is a simple and fast testcase (It may be helpful for sparc64):
> > > > https://gist.github.com/heiher/72919fae6b53f04cac606a9631100506
> > > > (assertion: c sum == 0)
> > >
> > > Just tried on my sparc64 VM - fixed vs old (non-patched) kernels...
> > >
> > > fixed kernel (6.1.0-rc5) running ./a.out:
> > > mator@ttip:~$ ./a.out
> > > c sum: 0
> > > p sum: 35184372088832
> > > c sum: 0
> > > p sum: 35184372088832
> > > c sum: 0
> > > p sum: 35184372088832
> > > c sum: 0
> > > p sum: 35184372088832
> > > c sum: 0
> > > p sum: 35184372088832
> > > ...
> > >
> > > old (non-patched) kernel (6.1.0-rc4) :
> > > mator@ttip:~$ ./a.out
> > > c sum: 35150012350464
> > > p sum: 35184372088832
> > > c sum: 35150012350464
> > > p sum: 35184372088832
> > > ...
> >
> > I've got another patch attached that might be nicer to fix this same
> > problem for both archs but without dropping the dirty bit, could you help
> > check whether it works?
>
> The tesecase PASSED with this patch and without:
> * "Partly revert "mm/thp: carry over dirty bit when thp splits on pmd"
> * "LoongArch: Set _PAGE_DIRTY only if _PAGE_WRITE is set in
> {pmd,pte}_mkdirty()"
My fault to not have noticed that the partly revert patch already landed
6.1-rc5, so it'll need to be another patch upon it.
I'll post a formal patch. Thanks Hev.
--
Peter Xu
prev parent reply other threads:[~2022-11-25 18:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAHirt9gr7oL87co3y1hCs3Ux4utzFP5oj6GFOFMZuJR2Vv8+rA@mail.gmail.com>
2022-11-16 10:45 ` Anatoly Pugachev
2022-11-16 11:28 ` David Hildenbrand
2022-11-16 16:25 ` Peter Xu
2022-11-17 2:29 ` hev
2022-11-17 18:28 ` Peter Xu
2022-11-19 14:06 ` hev
2022-11-21 19:57 ` David Hildenbrand
2022-11-25 11:15 ` hev
2022-11-25 11:17 ` David Hildenbrand
2022-11-25 11:35 ` hev
2022-11-21 18:55 ` Peter Xu
2022-11-25 11:38 ` hev
2022-11-25 18:42 ` Peter Xu [this message]
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=Y4EMnNiLdC7G+oKu@x1n \
--to=peterx@redhat.com \
--cc=linux-mm@kvack.org \
--cc=matorola@gmail.com \
--cc=r@hev.cc \
--cc=regressions@leemhuis.info \
--cc=sparclinux@vger.kernel.org \
/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