From: Gabriel Krisman Bertazi <krisman@collabora.com>
To: Will Deacon <will@kernel.org>
Cc: shuah@kernel.org, linux-kernel@vger.kernel.org,
peterz@infradead.org, luto@kernel.org,
linux-kselftest@vger.kernel.org, kernel@collabora.com
Subject: Re: [PATCH v2] selftest: Add test for Soft-Dirty PTE bit
Date: Fri, 13 Aug 2021 15:47:23 -0400 [thread overview]
Message-ID: <87lf553z5g.fsf@collabora.com> (raw)
In-Reply-To: <20210813150009.GC8451@willie-the-truck> (Will Deacon's message of "Fri, 13 Aug 2021 16:00:10 +0100")
Will Deacon <will@kernel.org> writes:
> On Thu, Jun 03, 2021 at 11:15:18AM -0400, Gabriel Krisman Bertazi wrote:
>> This introduces three tests:
>>
>> 1) Sanity check soft dirty basic semantics: allocate area, clean, dirty,
>> check if the SD bit flipped.
>>
>> 2) Check VMA reuse: validate the VM_SOFTDIRTY usage
>>
>> 3) Check soft-dirty on huge pages
>>
>> This was motivated by Will Deacon's fix commit 912efa17e512 ("mm: proc:
>> Invalidate TLB after clearing soft-dirty page state"). I was tracking the
>> same issue that he fixed, and this test would have caught it.
>>
>> Cc: Will Deacon <will@kernel.org>
>> Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
>>
>> --
>> Changes since V1:
>> - Fix last minute build break with page_size
>> ---
>> tools/testing/selftests/Makefile | 1 +
>> tools/testing/selftests/soft-dirty/.gitignore | 1 +
>> tools/testing/selftests/soft-dirty/Makefile | 9 +
>> .../testing/selftests/soft-dirty/soft-dirty.c | 254 ++++++++++++++++++
>> 4 files changed, 265 insertions(+)
>> create mode 100644 tools/testing/selftests/soft-dirty/.gitignore
>> create mode 100644 tools/testing/selftests/soft-dirty/Makefile
>> create mode 100644 tools/testing/selftests/soft-dirty/soft-dirty.c
>
> Although I think adding a test for this is great (and I certainly wouldn't
> want to get in the way of that; quite the opposite), I notice that we
> already have test_softdirty() in selftests/vm/madv_populate.c. Would we be
> better off extending that test instead of introducing another one?
Hi, Will. Thanks for the review.
Looks like selftests/vm/madv_populate.c was merged after I sent this,
which explains why I missed it. From a quick look, it also doesn't
verify the corner case of I'm checking here. I will look into merging
the two tests, or at least moving this to vm/ and remove the overlap.
Thanks,
--
Gabriel Krisman Bertazi
prev parent reply other threads:[~2021-08-13 19:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-03 15:15 [PATCH v2] selftest: Add test for Soft-Dirty PTE bit Gabriel Krisman Bertazi
2021-08-13 15:00 ` Will Deacon
2021-08-13 19:47 ` Gabriel Krisman Bertazi [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=87lf553z5g.fsf@collabora.com \
--to=krisman@collabora.com \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=luto@kernel.org \
--cc=peterz@infradead.org \
--cc=shuah@kernel.org \
--cc=will@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.