All of lore.kernel.org
 help / color / mirror / Atom feed
From: mathieu.desnoyers at efficios.com (Mathieu Desnoyers)
Subject: selftests/rseq: run_param_test.sh runs long
Date: Thu, 4 Oct 2018 13:25:55 -0400 (EDT)	[thread overview]
Message-ID: <1350032918.3214.1538673955923.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <CA+G9fYt-rZ-aYdZZ8hDXHi_uB2C27VqVMn0Qxs6CJ3EFDVQTVA@mail.gmail.com>

Hi Naresh,

----- On Oct 4, 2018, at 5:34 AM, naresh kamboju naresh.kamboju at linaro.org wrote:

> Restart able sequences test "run_param_test.sh" test case running long
> on target devices. I have listed test duration on x86_64, arm64 and
> arm32.

Considering that failures only happen randomly when the scheduler
preempts threads running in a rseq critical section, we need to have
some amount of repetition in there.

There are however other aspects that we might want to tweak based on the
detected system configuration.

As a baseline, run_param_test.sh completes in 3m49s on my 16-core x86-64
(+hyperthreading).

I see that your x86-64 completes in 10m. We might want to tweak the number of
threads used in each test (currently always at its default of 200) based on the
number of detected cpus. The formula nr_cpus * 5 is an estimate that would
be close to the 200 threads that are configured to run in about 4m on my
main test system. It can be specified to param_test with the following
option:

	[-t N] Number of threads (default 200)

The goal behind having 5 threads per cpu is to ensure the scheduler will preempt
the running threads frequently enough.

I am really tempted to adapt the number of threads based on the number of
detected cpus rather than make the number of loops smaller, so we can keep
the current amount of work per cpu (and therefore likelihood to trigger a
rseq failure scenario).

Thoughts ?

Thanks,

Mathieu


> 
> Steps:
> # cd selftests/rseq
> # time ./run_param_test.sh
> 
> x86_64:
> real 10m7.311s
> user 3m5.740s
> sys 20m11.961s
> 
> Juno-r2 (arm64):
> real 26m33.530s
> user 13m40.909s
> sys 116m52.032s
> 
> Dragonboard-410c (arm64):
> More than hour and counting
> 
> Beagleboard x15 (arm32):
> More than hour and counting
> 
> Full test job on Juno (arm64):
> https://lkft.validation.linaro.org/scheduler/job/451267#L1331
> 
> Full test job on x15 (arm32):
> https://lkft.validation.linaro.org/scheduler/job/451310
> 
> 
> Any chance we could reduce the number of loops (REPS=1000) ?
> or
> Is it more of bench marking performance test case than functional test case ?
> 
> Single test case running more than hour on device under testing (DUT)
> is not a great idea for testing per commit / push. Your feedback is
> appreciated on running or skipping (exclude from default run) this
> test case from selftest full run.
> 
> Thank you.
> 
> Best regards
> Naresh Kamboju

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

WARNING: multiple messages have this Message-ID (diff)
From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers)
Subject: selftests/rseq: run_param_test.sh runs long
Date: Thu, 4 Oct 2018 13:25:55 -0400 (EDT)	[thread overview]
Message-ID: <1350032918.3214.1538673955923.JavaMail.zimbra@efficios.com> (raw)
Message-ID: <20181004172555.bW8NQ5ULESw8-1qAlio_DFx2FhkVluZc8qK5qfvYnGg@z> (raw)
In-Reply-To: <CA+G9fYt-rZ-aYdZZ8hDXHi_uB2C27VqVMn0Qxs6CJ3EFDVQTVA@mail.gmail.com>

Hi Naresh,

----- On Oct 4, 2018,@5:34 AM, naresh kamboju naresh.kamboju@linaro.org wrote:

> Restart able sequences test "run_param_test.sh" test case running long
> on target devices. I have listed test duration on x86_64, arm64 and
> arm32.

Considering that failures only happen randomly when the scheduler
preempts threads running in a rseq critical section, we need to have
some amount of repetition in there.

There are however other aspects that we might want to tweak based on the
detected system configuration.

As a baseline, run_param_test.sh completes in 3m49s on my 16-core x86-64
(+hyperthreading).

I see that your x86-64 completes in 10m. We might want to tweak the number of
threads used in each test (currently always at its default of 200) based on the
number of detected cpus. The formula nr_cpus * 5 is an estimate that would
be close to the 200 threads that are configured to run in about 4m on my
main test system. It can be specified to param_test with the following
option:

	[-t N] Number of threads (default 200)

The goal behind having 5 threads per cpu is to ensure the scheduler will preempt
the running threads frequently enough.

I am really tempted to adapt the number of threads based on the number of
detected cpus rather than make the number of loops smaller, so we can keep
the current amount of work per cpu (and therefore likelihood to trigger a
rseq failure scenario).

Thoughts ?

Thanks,

Mathieu


> 
> Steps:
> # cd selftests/rseq
> # time ./run_param_test.sh
> 
> x86_64:
> real 10m7.311s
> user 3m5.740s
> sys 20m11.961s
> 
> Juno-r2 (arm64):
> real 26m33.530s
> user 13m40.909s
> sys 116m52.032s
> 
> Dragonboard-410c (arm64):
> More than hour and counting
> 
> Beagleboard x15 (arm32):
> More than hour and counting
> 
> Full test job on Juno (arm64):
> https://lkft.validation.linaro.org/scheduler/job/451267#L1331
> 
> Full test job on x15 (arm32):
> https://lkft.validation.linaro.org/scheduler/job/451310
> 
> 
> Any chance we could reduce the number of loops (REPS=1000) ?
> or
> Is it more of bench marking performance test case than functional test case ?
> 
> Single test case running more than hour on device under testing (DUT)
> is not a great idea for testing per commit / push. Your feedback is
> appreciated on running or skipping (exclude from default run) this
> test case from selftest full run.
> 
> Thank you.
> 
> Best regards
> Naresh Kamboju

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

  reply	other threads:[~2018-10-04 17:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-04  9:34 selftests/rseq: run_param_test.sh runs long naresh.kamboju
2018-10-04  9:34 ` Naresh Kamboju
2018-10-04 17:25 ` mathieu.desnoyers [this message]
2018-10-04 17:25   ` Mathieu Desnoyers
2018-10-04 17:35   ` mathieu.desnoyers
2018-10-04 17:35     ` Mathieu Desnoyers

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=1350032918.3214.1538673955923.JavaMail.zimbra@efficios.com \
    --to=unknown@example.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 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.