From: Michael Ellerman <mpe@ellerman•id.au>
To: Cyril Bur <cyrilbur@gmail•com>,
Gustavo Romero <gromero@linux•vnet.ibm.com>,
linuxppc-dev@lists•ozlabs.org
Cc: leitao@debian•org
Subject: Re: [PATCH 2/2] selftests/powerpc: Calculate spin time in tm-unavailable
Date: Mon, 11 Dec 2017 13:02:50 +1100 [thread overview]
Message-ID: <871sk2c985.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <1511307683.7121.5.camel@gmail.com>
Cyril Bur <cyrilbur@gmail•com> writes:
> On Tue, 2017-11-21 at 11:31 -0200, Gustavo Romero wrote:
>> Hi Cyril,
>>
>> On 21-11-2017 05:17, Cyril Bur wrote:
>> > Currently the tm-unavailable test spins for a fixed amount of time in
>> > an attempt to ensure the FPU/VMX/VSX facilities are off. This value was
>> > experimentally tested to be long enough.
>> >
>> > Problems may arise if kernel heuristics were to change. This patch
>> > should future proof this test.
>>
>> I've tried it on a VM running on '4.14.0-rc7' and apparently it gets stuck
>> pretty slow on calibration, since it ran ~7m without finding the correct value
>> (before it would take about 3m), like:
>>
>> $ time ./tm-unavailable
>> Testing required spin time required for facility unavailable...
>> Trying 0x18000000...
>> Trying 0x19000000...
>> Trying 0x1a000000...
>> ...
>> Trying 0xfd000000... ^C
>>
>> real 7m15.304s
>> user 7m15.291s
>> sys 0m0.004s
>>
>
> Interesting! I didn't test in a VM. I guess hypervisor switching
> completely changes the heuristic. Ok I'll have to rethink.
>
> Maybe the increase should be a multiplier to get to a good state more
> quickly.
Yeah this sucks in a VM:
# /home/michael/tm-unavailable
Testing required spin time required for facility unavailable...
Trying 0x18000000...
Trying 0x19000000...
...
Trying 0x110000000...
etc.
I got sick of waiting for it, but it's causing my selftests job to time
out so it must be taking > ~1 hour.
cheers
next prev parent reply other threads:[~2017-12-11 2:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-21 7:17 [PATCH 1/2] selftests/powerpc: Check for pthread errors in tm-unavailable Cyril Bur
2017-11-21 7:17 ` [PATCH 2/2] selftests/powerpc: Calculate spin time " Cyril Bur
2017-11-21 13:31 ` Gustavo Romero
2017-11-21 23:41 ` Cyril Bur
2017-12-11 2:02 ` Michael Ellerman [this message]
2017-12-11 3:40 ` Cyril Bur
2017-11-21 12:56 ` [PATCH 1/2] selftests/powerpc: Check for pthread errors " Gustavo Romero
2017-12-12 11:39 ` [1/2] " Michael Ellerman
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=871sk2c985.fsf@concordia.ellerman.id.au \
--to=mpe@ellerman$(echo .)id.au \
--cc=cyrilbur@gmail$(echo .)com \
--cc=gromero@linux$(echo .)vnet.ibm.com \
--cc=leitao@debian$(echo .)org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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