linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: SeongJae Park <sj38.park@gmail.com>
To: John Hubbard <jhubbard@nvidia.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: Sat,  3 Oct 2020 07:23:09 +0200	[thread overview]
Message-ID: <20201003052309.30013-1-sj38.park@gmail.com> (raw)
In-Reply-To: <20201003011721.44238-1-jhubbard@nvidia.com>

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?


Thanks,
SeongJae Park

> Thanks to Ralph Campbell for suggesting changing NTIMES as a way to get the
> speedup.
> 
> Suggested-by: Ralph Campbell <rcampbell@nvidia.com>
> Signed-off-by: John Hubbard <jhubbard@nvidia.com>
> ---
> 
> This is based on mmotm.
> 
>  tools/testing/selftests/vm/hmm-tests.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/vm/hmm-tests.c b/tools/testing/selftests/vm/hmm-tests.c
> index 6b79723d7dc6..5d1ac691b9f4 100644
> --- a/tools/testing/selftests/vm/hmm-tests.c
> +++ b/tools/testing/selftests/vm/hmm-tests.c
> @@ -49,7 +49,7 @@ struct hmm_buffer {
>  #define TWOMEG		(1 << 21)
>  #define HMM_BUFFER_SIZE (1024 << 12)
>  #define HMM_PATH_MAX    64
> -#define NTIMES		256
> +#define NTIMES		10
>  
>  #define ALIGN(x, a) (((x) + (a - 1)) & (~((a) - 1)))
>  
> -- 
> 2.28.0


  reply	other threads:[~2020-10-03  5:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-03  1:17 [PATCH] selftests/vm: 10x speedup for hmm-tests John Hubbard
2020-10-03  5:23 ` SeongJae Park [this message]
2020-10-03  5:50   ` John Hubbard
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=20201003052309.30013-1-sj38.park@gmail.com \
    --to=sj38.park@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=jhubbard@nvidia.com \
    --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 \
    /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).