All of lore.kernel.org
 help / color / mirror / Atom feed
From: Akira Yokosawa <akiyks@gmail.com>
To: Junchang Wang <junchangwang@gmail.com>
Cc: Paul McKenney <paulmck@linux.ibm.com>,
	perfbook@vger.kernel.org, Akira Yokosawa <akiyks@gmail.com>
Subject: Re: Ask help for litmus tests
Date: Sun, 4 Nov 2018 23:21:32 +0900	[thread overview]
Message-ID: <893a78b7-6110-0644-b20b-107ad1fdc2a2@gmail.com> (raw)
In-Reply-To: <CABoNC80N5+fMJViPdNWhXqiDdS6JNwfab=8D2Q0Hfd0wQebj5w@mail.gmail.com>

On 2018/11/04 20:14:50 +0800, Junchang Wang wrote:
> Hi Akira,
> 
> Thanks for your email about litmus tests a few weeks ago. I can
> successfully run litmus tests on all three servers I can touch (The
> configurations of the servers are listed below).

Hi Junchang,

Glad to know it helped you!

>                                                  Everything goes well
> except litmus tests C-CCIRIW+o+o+o-o+o-o (Listing 15.15) and
> C-WRC+o+o-data-o+o-rmb-o (Listing 15.16). The "exists" assertions
> never trigger on all of my servers. I understand that these assertions
> trigger only if the speeds of propagating writing x to different CPU
> cores varies a lot. So I have tried different litmus thread placement
> strategies by adjusting the affinity setting of litmus7. For example:
> $ litmus7 -affinity incr1 ... ...
> $ ./C-WRC+o+o-data-o+o-rmb-o.exe +ra -p 0,1,6

By klitmus7, I have seen a low probability "Sometimes" on POWER8 system.

One of the results reads:

----------------------------------------------------------
Test C-WRC+o+o-data-o+o-rmb-o Allowed
Histogram (6 states)
60327103:>1:r1=0; 2:r2=0; 2:r3=0;
22740026:>1:r1=1; 2:r2=0; 2:r3=0;
5       *>1:r1=1; 2:r2=1; 2:r3=0;
51117838:>1:r1=0; 2:r2=0; 2:r3=1;
55552319:>1:r1=1; 2:r2=0; 2:r3=1;
10262709:>1:r1=1; 2:r2=1; 2:r3=1;
Ok

Witnesses
Positive: 5, Negative: 199999995
Condition exists (1:r1=1 /\ 2:r2=1 /\ 2:r3=0) is validated
Hash=43057833028631b2f87eb65fe95c0ba2
Observation C-WRC+o+o-data-o+o-rmb-o Sometimes 5 199999995
Time C-WRC+o+o-data-o+o-rmb-o 68.34
----------------------------------------------------------

In theory, litmus7 can also trigger the "exists" clause, but it would
require a very long runtime.  Also please refer to the Answer to
Quick Quiz 15.24. (You will find my name is mentioned there.)

As Armv8 architecture is other-multicopy-atomic, this "exists" clause
should never trigger, I suppose.

As for C-CCIRIW+o+o+o-o+o-o, herd7 says

----------------------------------------------------------
Test C-CCIRIW+o+o+o-o+o-o Allowed
States 47
2:r1=0; 2:r2=0; 3:r3=0; 3:r4=0;
2:r1=0; 2:r2=0; 3:r3=0; 3:r4=1;
2:r1=0; 2:r2=0; 3:r3=0; 3:r4=2;
2:r1=0; 2:r2=0; 3:r3=1; 3:r4=1;
[...]
2:r1=2; 2:r2=2; 3:r3=0; 3:r4=2;
2:r1=2; 2:r2=2; 3:r3=1; 3:r4=1;
2:r1=2; 2:r2=2; 3:r3=1; 3:r4=2;
2:r1=2; 2:r2=2; 3:r3=2; 3:r4=1;
2:r1=2; 2:r2=2; 3:r3=2; 3:r4=2;
No
Witnesses
Positive: 0 Negative: 72
Condition exists (2:r1=1 /\ 2:r2=2 /\ 3:r3=2 /\ 3:r4=1)
Observation C-CCIRIW+o+o+o-o+o-o Never 0 72
Time C-CCIRIW+o+o+o-o+o-o 0.06
Hash=8e54976d74e1bc1ec5b6ce10eda3cb12
----------------------------------------------------------

It says "Never", so if you could ever trigger the condition on a
real machine, it would've meant something wrong in the implementation
on the platform side (cache coherency).

Hope this helps.

       Thanks, Akira

> 
> But it seems my effort doesn't work; the exist assertions never
> trigger. Did I miss something? What's the right/possible configuration
> to trigger these assertions. I do know you might be very busy. But if
> possible, please give me some hints. These two tests seems very
> interesting :-). Thanks in advance.
> 
> Regards,
> --Junchang
> 
> ===
> Three servers I can touch:
>   1. One PPC server which consists of 8 cores. I don's know hardware
> details (e.g. which cores share the same LLC or write buffer) because
> tools such as dmidecode don't work.
>   2. One ARM server with two Cavium CPU. 96 cores in total (no Hyper-threading).
>   3. One Intel server with two Xeon E5-2630 CPUs, each of which
> consists of 12 cores (with Hyper-Threading).
> 


  reply	other threads:[~2018-11-04 14:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-04 12:14 Ask help for litmus tests Junchang Wang
2018-11-04 14:21 ` Akira Yokosawa [this message]
2018-11-05  3:08   ` Junchang Wang
2018-11-05  3:41     ` Paul E. McKenney
2018-11-06  7:12       ` Junchang Wang
2018-11-06 14:36         ` Paul E. McKenney
2018-11-06 15:02           ` Akira Yokosawa
2018-11-06 15:13             ` Paul E. McKenney
2018-11-08  2:25               ` Junchang Wang

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=893a78b7-6110-0644-b20b-107ad1fdc2a2@gmail.com \
    --to=akiyks@gmail.com \
    --cc=junchangwang@gmail.com \
    --cc=paulmck@linux.ibm.com \
    --cc=perfbook@vger.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.