From: John Hubbard <jhubbard@nvidia.com>
To: SeongJae Park <sj38.park@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Shuah Khan <shuah@kernel.org>,
LKML <linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>,
<linux-kselftest@vger.kernel.org>,
Ralph Campbell <rcampbell@nvidia.com>
Subject: Re: [PATCH] selftests/vm: 10x speedup for hmm-tests
Date: Fri, 2 Oct 2020 22:50:36 -0700 [thread overview]
Message-ID: <d602102b-5e3b-2b93-43ed-c96cd14d2531@nvidia.com> (raw)
In-Reply-To: <20201003052309.30013-1-sj38.park@gmail.com>
On 10/2/20 10:23 PM, SeongJae Park wrote:
> On Fri, 2 Oct 2020 18:17:21 -0700 John Hubbard <jhubbard@nvidia.com> wrote:
>
>> This patch reduces the running time for hmm-tests from about 10+
>> seconds, to just under 1.0 second, for an approximately 10x speedup.
>> That brings it in line with most of the other tests in selftests/vm,
>> which mostly run in < 1 sec.
>>
>> This is done with a one-line change that simply reduces the number of
>> iterations of several tests, from 256, to 10.
>
> Could this result in reduced test capacity? If so, how about making the number
> easily tweakable?
>
The choice of iterations was somewhat arbitrary. Unless and until we
have specific bugs that show up at a given number of iterations, we
should avoid running large iteration counts that blow the testing time
budget. Here, I'm not aware of any bugs that show up between 11 and 256
iterations, which is why I think 10 is an acceptable iteration count.
But, you are right: it's a nice thought to make the iteration count
adjustable via the command line. That would allow hmm-tests to act as a
quick selftest item, and also to provide a little bit more of a stress
test, when manually invoked with a higher iteration count.
That's a separate patch, though. Because TEST_F() and related unit test
macros used in this area, expect to run the same way every time, and
they don't really want to be fed iteration arguments. Or maybe they do,
and I've missed it on my first quick pass through.
And in fact, maybe it's not a good fit, if TEST_F() and kselftest are
pushing for more of a CUnit/gtest style of coding.
There are some design and policy questions there. It reminds me that
some programs here don't use TEST_F() at all, actually. But anyway, I'd
definitely like to sidestep all of that for now, and start with just
"get the test run time down under 1 second".
thanks,
--
John Hubbard
NVIDIA
next prev parent reply other threads:[~2020-10-03 5:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-03 1:17 John Hubbard
2020-10-03 5:23 ` SeongJae Park
2020-10-03 5:50 ` John Hubbard [this message]
2020-10-06 20:34 ` John Hubbard
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=d602102b-5e3b-2b93-43ed-c96cd14d2531@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rcampbell@nvidia.com \
--cc=shuah@kernel.org \
--cc=sj38.park@gmail.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