All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] litmus test updates
@ 2017-07-09  1:39 Akira Yokosawa
  2017-07-09  1:40 ` [PATCH 1/2] advsync: Use '#include "api.h"' in litmus tests Akira Yokosawa
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Akira Yokosawa @ 2017-07-09  1:39 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 955eefe8ad5a64fddd2e33b343ac3a1e171dd089 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Sun, 9 Jul 2017 09:53:28 +0900
Subject: [PATCH 0/2] litmus test updates

Hi Paul,

I thought that embedding kernel API definitions in each litmus test is
redundant. We can use #include instead. In this case, we need to
specify a -I option for gcc as the compilation is done in a temporally
directory. We can do so by using -ccopts option of litmus7.

Patch 1 does this change.

However, in native run on x86_64, I'm seeing a significant difference
in the resulting statistics.
Before the change, a typical result is:

    Test C-SB+o-o+o-o Allowed
    Histogram (4 states)
    54    *>0:r2=0; 1:r2=0;
    49999628:>0:r2=2; 1:r2=0;
    49999697:>0:r2=0; 1:r2=2;
    621   :>0:r2=2; 1:r2=2;
    Ok

After the change, the result is something like:

    Test C-SB+o-o+o-o Allowed
    Histogram (4 states)
    26    *>0:r2=0; 1:r2=0;
    49999782:>0:r2=2; 1:r2=0;
    49999818:>0:r2=0; 1:r2=2;
    374   :>0:r2=2; 1:r2=2;
    Ok

In cross compilation mode, the result is similar and consistent
with the native run after the change.
So I suspect litmus7's behavior of native run is affected by the
"-ccopts" option. Again, this might depend on the platform variation.

Patch 2 adds targets for cross compilation mode of litmus7.
Because we need to copy the custom header file "api.h" into the target
directory, I made the recipe to do so.

I stopped short of adding recipes to make an archive and scp it to
remote host and to do remote compilation and execution via ssh.
They can be added later.

On PPC, the result of C-SB+o-o+o-o.litmus looks interesting.
(Of course, you are familiar with PPC, but...)

    Test C-SB+o-o+o-o Allowed
    Histogram (4 states)
    988335*>0:r2=0; 1:r2=0;
    49516879:>0:r2=2; 1:r2=0;
    49494779:>0:r2=0; 1:r2=2;
    7     :>0:r2=2; 1:r2=2;
    Ok
    
    Witnesses
    Positive: 988335, Negative: 99011665
    Condition exists (1:r2=0 /\ 0:r2=0) is validated
    Hash=9bb70a6ed845b4be5f335c7eeb134f3f

Note that I've not tested the result of "cross-arm" target actually
builds and runs on ARM hosts.

How does this approach look like?

        Thanks, Akira
-- 
Akira Yokosawa (2):
  advsync: Use '#include "api.h"' in litmus tests
  advsync: Add cross compilation targets

 CodeSamples/advsync/herd/.gitignore                |  5 ++++
 CodeSamples/advsync/herd/C-SB+o-mb-o+o-mb-o.litmus |  4 +--
 CodeSamples/advsync/herd/C-SB+o-o+o-o.litmus       |  3 +-
 CodeSamples/advsync/herd/Makefile                  | 34 ++++++++++++++++++++--
 CodeSamples/advsync/herd/api.h                     |  8 +++++
 5 files changed, 47 insertions(+), 7 deletions(-)
 create mode 100644 CodeSamples/advsync/herd/api.h

-- 
2.7.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] advsync: Use '#include "api.h"' in litmus tests
  2017-07-09  1:39 [PATCH 0/2] litmus test updates Akira Yokosawa
@ 2017-07-09  1:40 ` Akira Yokosawa
  2017-07-09  1:41 ` [PATCH 2/2] advsync: Add cross compilation targets Akira Yokosawa
  2017-07-09 19:26 ` [PATCH 0/2] litmus test updates Paul E. McKenney
  2 siblings, 0 replies; 6+ messages in thread
From: Akira Yokosawa @ 2017-07-09  1:40 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 408b798755475f18285178c9a1f9f0c6bb2bd9ed Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Fri, 7 Jul 2017 21:13:01 +0900
Subject: [PATCH 1/2] advsync: Use '#include "api.h"' in litmus tests

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 CodeSamples/advsync/herd/C-SB+o-mb-o+o-mb-o.litmus |  4 +---
 CodeSamples/advsync/herd/C-SB+o-o+o-o.litmus       |  3 +--
 CodeSamples/advsync/herd/Makefile                  | 14 ++++++++++++--
 CodeSamples/advsync/herd/api.h                     |  8 ++++++++
 4 files changed, 22 insertions(+), 7 deletions(-)
 create mode 100644 CodeSamples/advsync/herd/api.h

diff --git a/CodeSamples/advsync/herd/C-SB+o-mb-o+o-mb-o.litmus b/CodeSamples/advsync/herd/C-SB+o-mb-o+o-mb-o.litmus
index c04e82f..1093329 100644
--- a/CodeSamples/advsync/herd/C-SB+o-mb-o+o-mb-o.litmus
+++ b/CodeSamples/advsync/herd/C-SB+o-mb-o+o-mb-o.litmus
@@ -3,9 +3,7 @@ C C-SB+o-mb-o+o-mb-o
 }

 {
-#define READ_ONCE(x) __atomic_load_n(&(x), __ATOMIC_RELAXED)
-#define WRITE_ONCE(x, v) __atomic_store_n(&(x), (v), __ATOMIC_RELAXED)
-#define smp_mb() __atomic_thread_fence(__ATOMIC_SEQ_CST)
+#include "api.h"
 }

 P0(int *x0, int *x1)
diff --git a/CodeSamples/advsync/herd/C-SB+o-o+o-o.litmus b/CodeSamples/advsync/herd/C-SB+o-o+o-o.litmus
index 47cc6dd..2e45ee6 100644
--- a/CodeSamples/advsync/herd/C-SB+o-o+o-o.litmus
+++ b/CodeSamples/advsync/herd/C-SB+o-o+o-o.litmus
@@ -3,8 +3,7 @@ C C-SB+o-o+o-o
 }

 {
-#define READ_ONCE(x) __atomic_load_n(&(x), __ATOMIC_RELAXED)
-#define WRITE_ONCE(x, v) __atomic_store_n(&(x), (v), __ATOMIC_RELAXED)
+#include "api.h"
 }

 P0(int *x0, int *x1)
diff --git a/CodeSamples/advsync/herd/Makefile b/CodeSamples/advsync/herd/Makefile
index 92986cd..7959063 100644
--- a/CodeSamples/advsync/herd/Makefile
+++ b/CodeSamples/advsync/herd/Makefile
@@ -1,4 +1,14 @@
-all: C-SB+o-o+o-o.litmus.out C-SB+o-mb-o+o-mb-o.litmus.out
+LITMUS := $(wildcard *.litmus)
+LITMUS_OUT = $(addsuffix .out,$(LITMUS))
+CCOPTS = -fomit-frame-pointer -O2
+CCOPTS += -I$(shell pwd)
+
+.PHONY: all clean
+
+all: $(LITMUS_OUT)

 %.litmus.out: %.litmus
-	litmus7 -r 1000 -carch X86 $< > $@ 2>&1
+	litmus7 -r 1000 -carch X86 -ccopts "$(CCOPTS)" $< > $@ 2>&1
+
+clean:
+	rm -f *.out
diff --git a/CodeSamples/advsync/herd/api.h b/CodeSamples/advsync/herd/api.h
new file mode 100644
index 0000000..8326835
--- /dev/null
+++ b/CodeSamples/advsync/herd/api.h
@@ -0,0 +1,8 @@
+#ifndef __API_H__
+#define __API_H__
+#ifndef READ_ONCE
+#define READ_ONCE(x) __atomic_load_n(&(x), __ATOMIC_RELAXED)
+#define WRITE_ONCE(x, v) __atomic_store_n(&(x), (v), __ATOMIC_RELAXED)
+#define smp_mb() __atomic_thread_fence(__ATOMIC_SEQ_CST)
+#endif
+#endif
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] advsync: Add cross compilation targets
  2017-07-09  1:39 [PATCH 0/2] litmus test updates Akira Yokosawa
  2017-07-09  1:40 ` [PATCH 1/2] advsync: Use '#include "api.h"' in litmus tests Akira Yokosawa
@ 2017-07-09  1:41 ` Akira Yokosawa
  2017-07-09 19:26 ` [PATCH 0/2] litmus test updates Paul E. McKenney
  2 siblings, 0 replies; 6+ messages in thread
From: Akira Yokosawa @ 2017-07-09  1:41 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

From 955eefe8ad5a64fddd2e33b343ac3a1e171dd089 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@gmail.com>
Date: Sun, 9 Jul 2017 09:00:36 +0900
Subject: [PATCH 2/2] advsync: Add cross compilation targets

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 CodeSamples/advsync/herd/.gitignore |  5 +++++
 CodeSamples/advsync/herd/Makefile   | 22 +++++++++++++++++++++-
 2 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/CodeSamples/advsync/herd/.gitignore b/CodeSamples/advsync/herd/.gitignore
index f47cb20..a01a568 100644
--- a/CodeSamples/advsync/herd/.gitignore
+++ b/CodeSamples/advsync/herd/.gitignore
@@ -1 +1,6 @@
 *.out
+/@all
+/X86
+/PPC
+/ARM
+*.tar
diff --git a/CodeSamples/advsync/herd/Makefile b/CodeSamples/advsync/herd/Makefile
index 7959063..056f5f9 100644
--- a/CodeSamples/advsync/herd/Makefile
+++ b/CodeSamples/advsync/herd/Makefile
@@ -2,13 +2,33 @@ LITMUS := $(wildcard *.litmus)
 LITMUS_OUT = $(addsuffix .out,$(LITMUS))
 CCOPTS = -fomit-frame-pointer -O2
 CCOPTS += -I$(shell pwd)
+CUSTOM_HEADER := $(wildcard *.h)

-.PHONY: all clean
+.PHONY: all clean cross-x86 cross-ppc cross-arm cross

 all: $(LITMUS_OUT)

 %.litmus.out: %.litmus
 	litmus7 -r 1000 -carch X86 -ccopts "$(CCOPTS)" $< > $@ 2>&1

+cross-x86: TARGET = X86
+cross-x86: cross
+
+cross-ppc: TARGET = PPC
+cross-ppc: cross
+
+cross-arm: TARGET = ARM
+cross-arm: cross
+
+cross:
+	echo > @all
+	for l in $(LITMUS); do \
+	    echo $$l >> @all; \
+	done
+	mkdir -p $(TARGET)
+	litmus7 -r 1000 -carch $(TARGET) -o $(TARGET) @all
+	cp $(CUSTOM_HEADER) $(TARGET)
+
 clean:
 	rm -f *.out
+	rm -f @all
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] litmus test updates
  2017-07-09  1:39 [PATCH 0/2] litmus test updates Akira Yokosawa
  2017-07-09  1:40 ` [PATCH 1/2] advsync: Use '#include "api.h"' in litmus tests Akira Yokosawa
  2017-07-09  1:41 ` [PATCH 2/2] advsync: Add cross compilation targets Akira Yokosawa
@ 2017-07-09 19:26 ` Paul E. McKenney
  2017-07-10 22:14   ` Akira Yokosawa
  2 siblings, 1 reply; 6+ messages in thread
From: Paul E. McKenney @ 2017-07-09 19:26 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: perfbook

On Sun, Jul 09, 2017 at 10:39:46AM +0900, Akira Yokosawa wrote:
> >From 955eefe8ad5a64fddd2e33b343ac3a1e171dd089 Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <akiyks@gmail.com>
> Date: Sun, 9 Jul 2017 09:53:28 +0900
> Subject: [PATCH 0/2] litmus test updates
> 
> Hi Paul,
> 
> I thought that embedding kernel API definitions in each litmus test is
> redundant. We can use #include instead. In this case, we need to
> specify a -I option for gcc as the compilation is done in a temporally
> directory. We can do so by using -ccopts option of litmus7.
> 
> Patch 1 does this change.

You know, I tried this and it kept complaining about not finding the
include file.  No idea what I was doing wrong, but whatever it was,
thank you very much for getting it right!!!

> However, in native run on x86_64, I'm seeing a significant difference
> in the resulting statistics.
> Before the change, a typical result is:
> 
>     Test C-SB+o-o+o-o Allowed
>     Histogram (4 states)
>     54    *>0:r2=0; 1:r2=0;
>     49999628:>0:r2=2; 1:r2=0;
>     49999697:>0:r2=0; 1:r2=2;
>     621   :>0:r2=2; 1:r2=2;
>     Ok
> 
> After the change, the result is something like:
> 
>     Test C-SB+o-o+o-o Allowed
>     Histogram (4 states)
>     26    *>0:r2=0; 1:r2=0;
>     49999782:>0:r2=2; 1:r2=0;
>     49999818:>0:r2=0; 1:r2=2;
>     374   :>0:r2=2; 1:r2=2;
>     Ok
> 
> In cross compilation mode, the result is similar and consistent
> with the native run after the change.
> So I suspect litmus7's behavior of native run is affected by the
> "-ccopts" option. Again, this might depend on the platform variation.

Between differences in compilers, compiler options, and hardware,
we should expect quite a bit of of variation.  In fact, there are
sometimes specific pieces of hardware that have much stronger
memory ordering than the architecture guarantees.

> Patch 2 adds targets for cross compilation mode of litmus7.
> Because we need to copy the custom header file "api.h" into the target
> directory, I made the recipe to do so.

Looks good!

> I stopped short of adding recipes to make an archive and scp it to
> remote host and to do remote compilation and execution via ssh.
> They can be added later.

Your choice on this one.  ;-)

> On PPC, the result of C-SB+o-o+o-o.litmus looks interesting.
> (Of course, you are familiar with PPC, but...)
> 
>     Test C-SB+o-o+o-o Allowed
>     Histogram (4 states)
>     988335*>0:r2=0; 1:r2=0;
>     49516879:>0:r2=2; 1:r2=0;
>     49494779:>0:r2=0; 1:r2=2;
>     7     :>0:r2=2; 1:r2=2;
>     Ok

I am not surprised by this.  PPC tends to do more local processing for
longer than x86 does, as an extremely rough rule of thumb.  PPC's weak
ordering enables this.  So getting the outcome where both CPUs communicate
with each other should be harder on PPC than on x86.

>     Witnesses
>     Positive: 988335, Negative: 99011665
>     Condition exists (1:r2=0 /\ 0:r2=0) is validated
>     Hash=9bb70a6ed845b4be5f335c7eeb134f3f
> 
> Note that I've not tested the result of "cross-arm" target actually
> builds and runs on ARM hosts.

There are supposed to be places to get free access to ARM hardware.
If you don't find one, let me know, and I will be happy to reach out
to my contacts at ARM and Linaro.

> How does this approach look like?

Quite nice!  I queued and pushed it, again, thank you!

							Thanx, Paul

>         Thanks, Akira
> -- 
> Akira Yokosawa (2):
>   advsync: Use '#include "api.h"' in litmus tests
>   advsync: Add cross compilation targets
> 
>  CodeSamples/advsync/herd/.gitignore                |  5 ++++
>  CodeSamples/advsync/herd/C-SB+o-mb-o+o-mb-o.litmus |  4 +--
>  CodeSamples/advsync/herd/C-SB+o-o+o-o.litmus       |  3 +-
>  CodeSamples/advsync/herd/Makefile                  | 34 ++++++++++++++++++++--
>  CodeSamples/advsync/herd/api.h                     |  8 +++++
>  5 files changed, 47 insertions(+), 7 deletions(-)
>  create mode 100644 CodeSamples/advsync/herd/api.h
> 
> -- 
> 2.7.4
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] litmus test updates
  2017-07-09 19:26 ` [PATCH 0/2] litmus test updates Paul E. McKenney
@ 2017-07-10 22:14   ` Akira Yokosawa
  2017-07-11  0:06     ` Paul E. McKenney
  0 siblings, 1 reply; 6+ messages in thread
From: Akira Yokosawa @ 2017-07-10 22:14 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

On 2017/07/09 12:26:55 -0700, Paul E. McKenney wrote:
> On Sun, Jul 09, 2017 at 10:39:46AM +0900, Akira Yokosawa wrote:
>> >From 955eefe8ad5a64fddd2e33b343ac3a1e171dd089 Mon Sep 17 00:00:00 2001
>> From: Akira Yokosawa <akiyks@gmail.com>
>> Date: Sun, 9 Jul 2017 09:53:28 +0900
>> Subject: [PATCH 0/2] litmus test updates
>>
>> Hi Paul,
>>
>> I thought that embedding kernel API definitions in each litmus test is
>> redundant. We can use #include instead. In this case, we need to
>> specify a -I option for gcc as the compilation is done in a temporally
>> directory. We can do so by using -ccopts option of litmus7.
>>
>> Patch 1 does this change.
> 
> You know, I tried this and it kept complaining about not finding the
> include file.  No idea what I was doing wrong, but whatever it was,
> thank you very much for getting it right!!!
> 
>> However, in native run on x86_64, I'm seeing a significant difference
>> in the resulting statistics.
>> Before the change, a typical result is:
>>
>>     Test C-SB+o-o+o-o Allowed
>>     Histogram (4 states)
>>     54    *>0:r2=0; 1:r2=0;
>>     49999628:>0:r2=2; 1:r2=0;
>>     49999697:>0:r2=0; 1:r2=2;
>>     621   :>0:r2=2; 1:r2=2;
>>     Ok
>>
>> After the change, the result is something like:
>>
>>     Test C-SB+o-o+o-o Allowed
>>     Histogram (4 states)
>>     26    *>0:r2=0; 1:r2=0;
>>     49999782:>0:r2=2; 1:r2=0;
>>     49999818:>0:r2=0; 1:r2=2;
>>     374   :>0:r2=2; 1:r2=2;
>>     Ok
>>
>> In cross compilation mode, the result is similar and consistent
>> with the native run after the change.
>> So I suspect litmus7's behavior of native run is affected by the
>> "-ccopts" option. Again, this might depend on the platform variation.
> 
> Between differences in compilers, compiler options, and hardware,
> we should expect quite a bit of of variation.  In fact, there are
> sometimes specific pieces of hardware that have much stronger
> memory ordering than the architecture guarantees.
> 
>> Patch 2 adds targets for cross compilation mode of litmus7.
>> Because we need to copy the custom header file "api.h" into the target
>> directory, I made the recipe to do so.
> 
> Looks good!
> 
>> I stopped short of adding recipes to make an archive and scp it to
>> remote host and to do remote compilation and execution via ssh.
>> They can be added later.
> 
> Your choice on this one.  ;-)
> 
>> On PPC, the result of C-SB+o-o+o-o.litmus looks interesting.
>> (Of course, you are familiar with PPC, but...)
>>
>>     Test C-SB+o-o+o-o Allowed
>>     Histogram (4 states)
>>     988335*>0:r2=0; 1:r2=0;
>>     49516879:>0:r2=2; 1:r2=0;
>>     49494779:>0:r2=0; 1:r2=2;
>>     7     :>0:r2=2; 1:r2=2;
>>     Ok
> 
> I am not surprised by this.  PPC tends to do more local processing for
> longer than x86 does, as an extremely rough rule of thumb.  PPC's weak
> ordering enables this.  So getting the outcome where both CPUs communicate
> with each other should be harder on PPC than on x86.
> 
>>     Witnesses
>>     Positive: 988335, Negative: 99011665
>>     Condition exists (1:r2=0 /\ 0:r2=0) is validated
>>     Hash=9bb70a6ed845b4be5f335c7eeb134f3f
>>
>> Note that I've not tested the result of "cross-arm" target actually
>> builds and runs on ARM hosts.
> 
> There are supposed to be places to get free access to ARM hardware.
> If you don't find one, let me know, and I will be happy to reach out
> to my contacts at ARM and Linaro.

Well, I tried Linaro Developer Cloud, but they are not accepting
requests of new instances. The request page says:

> Capacity reached
> Due to the very high levels of interest in Developer Cloud, we have
> temporarily reached our capacity limits. We are in the process of
> expanding our service but, in the meantime, we are currently not able
> to accept any more requests for instances. Once capacity is available
> again, the "Request Cloud Instance" option will be available again.

So I'm waiting the capacity to become available.
Are you aware of an alternative service?

BTW, I managed to have a (sporadic) access to an ARMv8 host yesterday.

I tried the result of "cross-arm" target, and it worked just fine.
However, "make" in other CodeSamples' sub-directories didn't go well,
I'm attempting to add support for arm64. If it works, I'll submit
a patch set.

       Thanks, Akira

>> How does this approach look like?
> 
> Quite nice!  I queued and pushed it, again, thank you!
> 
> 							Thanx, Paul
> 
>>         Thanks, Akira
>> -- 
>> Akira Yokosawa (2):
>>   advsync: Use '#include "api.h"' in litmus tests
>>   advsync: Add cross compilation targets
>>
>>  CodeSamples/advsync/herd/.gitignore                |  5 ++++
>>  CodeSamples/advsync/herd/C-SB+o-mb-o+o-mb-o.litmus |  4 +--
>>  CodeSamples/advsync/herd/C-SB+o-o+o-o.litmus       |  3 +-
>>  CodeSamples/advsync/herd/Makefile                  | 34 ++++++++++++++++++++--
>>  CodeSamples/advsync/herd/api.h                     |  8 +++++
>>  5 files changed, 47 insertions(+), 7 deletions(-)
>>  create mode 100644 CodeSamples/advsync/herd/api.h
>>
>> -- 
>> 2.7.4
>>
> 
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] litmus test updates
  2017-07-10 22:14   ` Akira Yokosawa
@ 2017-07-11  0:06     ` Paul E. McKenney
  0 siblings, 0 replies; 6+ messages in thread
From: Paul E. McKenney @ 2017-07-11  0:06 UTC (permalink / raw)
  To: Akira Yokosawa; +Cc: perfbook

On Tue, Jul 11, 2017 at 07:14:24AM +0900, Akira Yokosawa wrote:
> On 2017/07/09 12:26:55 -0700, Paul E. McKenney wrote:
> > On Sun, Jul 09, 2017 at 10:39:46AM +0900, Akira Yokosawa wrote:
> >> >From 955eefe8ad5a64fddd2e33b343ac3a1e171dd089 Mon Sep 17 00:00:00 2001
> >> From: Akira Yokosawa <akiyks@gmail.com>
> >> Date: Sun, 9 Jul 2017 09:53:28 +0900
> >> Subject: [PATCH 0/2] litmus test updates
> >>
> >> Hi Paul,
> >>
> >> I thought that embedding kernel API definitions in each litmus test is
> >> redundant. We can use #include instead. In this case, we need to
> >> specify a -I option for gcc as the compilation is done in a temporally
> >> directory. We can do so by using -ccopts option of litmus7.
> >>
> >> Patch 1 does this change.
> > 
> > You know, I tried this and it kept complaining about not finding the
> > include file.  No idea what I was doing wrong, but whatever it was,
> > thank you very much for getting it right!!!
> > 
> >> However, in native run on x86_64, I'm seeing a significant difference
> >> in the resulting statistics.
> >> Before the change, a typical result is:
> >>
> >>     Test C-SB+o-o+o-o Allowed
> >>     Histogram (4 states)
> >>     54    *>0:r2=0; 1:r2=0;
> >>     49999628:>0:r2=2; 1:r2=0;
> >>     49999697:>0:r2=0; 1:r2=2;
> >>     621   :>0:r2=2; 1:r2=2;
> >>     Ok
> >>
> >> After the change, the result is something like:
> >>
> >>     Test C-SB+o-o+o-o Allowed
> >>     Histogram (4 states)
> >>     26    *>0:r2=0; 1:r2=0;
> >>     49999782:>0:r2=2; 1:r2=0;
> >>     49999818:>0:r2=0; 1:r2=2;
> >>     374   :>0:r2=2; 1:r2=2;
> >>     Ok
> >>
> >> In cross compilation mode, the result is similar and consistent
> >> with the native run after the change.
> >> So I suspect litmus7's behavior of native run is affected by the
> >> "-ccopts" option. Again, this might depend on the platform variation.
> > 
> > Between differences in compilers, compiler options, and hardware,
> > we should expect quite a bit of of variation.  In fact, there are
> > sometimes specific pieces of hardware that have much stronger
> > memory ordering than the architecture guarantees.
> > 
> >> Patch 2 adds targets for cross compilation mode of litmus7.
> >> Because we need to copy the custom header file "api.h" into the target
> >> directory, I made the recipe to do so.
> > 
> > Looks good!
> > 
> >> I stopped short of adding recipes to make an archive and scp it to
> >> remote host and to do remote compilation and execution via ssh.
> >> They can be added later.
> > 
> > Your choice on this one.  ;-)
> > 
> >> On PPC, the result of C-SB+o-o+o-o.litmus looks interesting.
> >> (Of course, you are familiar with PPC, but...)
> >>
> >>     Test C-SB+o-o+o-o Allowed
> >>     Histogram (4 states)
> >>     988335*>0:r2=0; 1:r2=0;
> >>     49516879:>0:r2=2; 1:r2=0;
> >>     49494779:>0:r2=0; 1:r2=2;
> >>     7     :>0:r2=2; 1:r2=2;
> >>     Ok
> > 
> > I am not surprised by this.  PPC tends to do more local processing for
> > longer than x86 does, as an extremely rough rule of thumb.  PPC's weak
> > ordering enables this.  So getting the outcome where both CPUs communicate
> > with each other should be harder on PPC than on x86.
> > 
> >>     Witnesses
> >>     Positive: 988335, Negative: 99011665
> >>     Condition exists (1:r2=0 /\ 0:r2=0) is validated
> >>     Hash=9bb70a6ed845b4be5f335c7eeb134f3f
> >>
> >> Note that I've not tested the result of "cross-arm" target actually
> >> builds and runs on ARM hosts.
> > 
> > There are supposed to be places to get free access to ARM hardware.
> > If you don't find one, let me know, and I will be happy to reach out
> > to my contacts at ARM and Linaro.
> 
> Well, I tried Linaro Developer Cloud, but they are not accepting
> requests of new instances. The request page says:
> 
> > Capacity reached
> > Due to the very high levels of interest in Developer Cloud, we have
> > temporarily reached our capacity limits. We are in the process of
> > expanding our service but, in the meantime, we are currently not able
> > to accept any more requests for instances. Once capacity is available
> > again, the "Request Cloud Instance" option will be available again.
> 
> So I'm waiting the capacity to become available.
> Are you aware of an alternative service?

One of the people I am meeting with said that he would check, so if
anything comes of that I will let you know.

> BTW, I managed to have a (sporadic) access to an ARMv8 host yesterday.
> 
> I tried the result of "cross-arm" target, and it worked just fine.
> However, "make" in other CodeSamples' sub-directories didn't go well,
> I'm attempting to add support for arm64. If it works, I'll submit
> a patch set.

Looking forward to it!

							Thanx, Paul

>        Thanks, Akira
> 
> >> How does this approach look like?
> > 
> > Quite nice!  I queued and pushed it, again, thank you!
> > 
> > 							Thanx, Paul
> > 
> >>         Thanks, Akira
> >> -- 
> >> Akira Yokosawa (2):
> >>   advsync: Use '#include "api.h"' in litmus tests
> >>   advsync: Add cross compilation targets
> >>
> >>  CodeSamples/advsync/herd/.gitignore                |  5 ++++
> >>  CodeSamples/advsync/herd/C-SB+o-mb-o+o-mb-o.litmus |  4 +--
> >>  CodeSamples/advsync/herd/C-SB+o-o+o-o.litmus       |  3 +-
> >>  CodeSamples/advsync/herd/Makefile                  | 34 ++++++++++++++++++++--
> >>  CodeSamples/advsync/herd/api.h                     |  8 +++++
> >>  5 files changed, 47 insertions(+), 7 deletions(-)
> >>  create mode 100644 CodeSamples/advsync/herd/api.h
> >>
> >> -- 
> >> 2.7.4
> >>
> > 
> > 
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-07-11  0:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-09  1:39 [PATCH 0/2] litmus test updates Akira Yokosawa
2017-07-09  1:40 ` [PATCH 1/2] advsync: Use '#include "api.h"' in litmus tests Akira Yokosawa
2017-07-09  1:41 ` [PATCH 2/2] advsync: Add cross compilation targets Akira Yokosawa
2017-07-09 19:26 ` [PATCH 0/2] litmus test updates Paul E. McKenney
2017-07-10 22:14   ` Akira Yokosawa
2017-07-11  0:06     ` Paul E. McKenney

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.