Re: SIS MP success

2018-12-16 Thread Chris Johns
On 15/12/18 7:17 pm, Jiri Gaisler wrote:
> 
> On 12/15/18 1:07 AM, Chris Johns wrote:
>> On 14/12/18 8:48 pm, Jiri Gaisler wrote:
>>> OK, I will look into this over Christmas. I have some long flights
>>> coming up so it will be a good way to kill time ... :-)
>> Great. I have been on a few flights recently and I have been doing the same
>> thing. Power in the seats is nice and WiFi is even better.
>>
>>> Failures:
>>>  dl07.exe
>> That should not be happening. I will check this as part of some work I am 
>> planning.
>>
>>> Invalid:
>>>  spinternalerror01.exe
>>>  sptimecounter01.exe
>> These are typically crashes.
>>
>>> Average test time: 0:00:00.498379
>>> Testing time : 0:05:20.956184
>> That is a nice run time.
> 
> It's on my 5 years old i7-4790S (8 threads, 65W). Without the SMP tests,
> I get run times of about 2 - minutes. I use the leon3-sis target in
> rtems-test. If I use leon3-run, rtems-test hangs after a few tests
> unless I use --jobs=1.

Ah thanks, this narrows down where I need to look.

>> If you add the --mail and related options (--mail-to, --mail-from, 
>> --smtp-host)
>> the results can be posted to bu...@rtems.org. We love seeing results being
>> posted by any and everyone.
>>
>>> The four failing/invalid tests fail the same way on real hardware, so I
>>> am not too worried about this. 
>> Is the failure seen without rtems-test?
>>
>> I ask because I think there maybe a bug in rtems-test with a threading load 
>> when
>> running a number of simulations at once. I am not sure if this is a qemu
>> specific issue or a general one, I need to revisit it. I suspect a locking 
>> issue
>> in rtems-test and it can be seen with tests hanging and simulators showing 0
>> load in top.
>>
>> On a non-smp build, I get the same fails,
>>> so it seems to be some issue with the tests...
>> There is a ticket open on 5.1 to have tests that do fail to be tagged as
>> "Expected Fail" so we can baseline what is expected. I cannot do this alone
>> because I am not sure which ones are expected failures.
> 
> I looked into the failures again and they only occur on leon3 when
> compiled with --enable-smp. On erc32 and leon2, and on leon3 without
> --enable-smp they run OK. I am working on improving gdb debugging
> support for sis-mp, so debugging the failures of the RTEMS tests could
> be a good test case to check how well it works. Breakpoints and stepping
> in an MP system are not that obvious to handle ...

I am sure. On ARM hardware with SMP you need to use the context id register to
hold the thread id and add it as a condition of the breakpoint. This means
RTEMS's context switcher needs to update this register.

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

PATCH: Multiprocessor support for SIS simulator

2018-12-16 Thread Jiri Gaisler
I have have attached a patch for RSB that will enable SMP support for
the sis simulator. This is done by pulling in a second sis patch on top
of the existing one, containing the SMP feature. To enable SMP
operation, start sis with -m  where n is between 2 and 4:

$ sparc-rtems5-sis -leon3 -m 4

 SIS - SPARC instruction simulator 2.9,  copyright Jiri Gaisler 1995
 Bug-reports to j...@gaisler.se

 LEON3 emulation enabled, 4 cpus online, delta 50 clocks

sis>

I have updated the README files in sis to reflect the new features.
Debugging in gdb works as before, but breakpoints are global until I
manage to add RTEMS threads awareness to sis.

A second (simple) patch is attached for leon3-sis.ini in rtems-tools,
just to allow rtems-test to run the SMP tests.

I will now move to gdb-8.2+ and merge RISCV support to sis.

Jiri.

diff --git a/rtems/config/tools/rtems-gdb-8.0.1-1.cfg b/rtems/config/tools/rtems-gdb-8.0.1-1.cfg
index 7911460..d3cdeef 100644
--- a/rtems/config/tools/rtems-gdb-8.0.1-1.cfg
+++ b/rtems/config/tools/rtems-gdb-8.0.1-1.cfg
@@ -12,6 +12,9 @@
 %patch add gdb https://devel.rtems.org/raw-attachment/ticket/3460/gdb-8.0.1-sis-leon2-leon3.diff
 %hash sha512 gdb-8.0.1-sis-leon2-leon3.diff a16859b5badbce8ecbc9259553b2abe7e93b4fb8ab899e18e8ddb294a1433f49df8ddee418bb6ab55dc2402e5ad6aca6274fb9e8b53278574f269a555fdeddcf
 
+%patch add gdb https://gaisler.se/gdb/gdb-8.0.1-sis-leon3-smp.diff
+%hash sha512 gdb-8.0.1-sis-leon3-smp.diff 1d086c656e6c240eee721f0f4a5cd43d4bbd29feff2ac22e6e56b6953c6390438976180575c0888c38a000c5ed6c8276479e9620315fdd6a6455214218ecbb78
+
  %ifos win32
%if %{_windows_os} == cygwin
 %patch add gdb https://devel.rtems.org/raw-attachment/ticket/3576/gdb-8.0.1-sis-cygwin.diff
diff --git a/tester/rtems/testing/bsps/leon3-sis.ini b/tester/rtems/testing/bsps/leon3-sis.ini
index d2a9e05..2f933a7 100644
--- a/tester/rtems/testing/bsps/leon3-sis.ini
+++ b/tester/rtems/testing/bsps/leon3-sis.ini
@@ -36,4 +36,4 @@ bsp  = leon3
 arch = sparc
 tester   = %{_rtscripts}/run.cfg
 bsp_run_cmd  = %{rtems_tools}/%{bsp_arch}-rtems%{rtems_version}-sis
-bsp_run_opts = -leon3 -nouartrx -r -tlim 200 s
+bsp_run_opts = -leon3 -nouartrx -r -tlim 200 s -m 4
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: PATCH: Multiprocessor support for SIS simulator

2018-12-16 Thread Sebastian Huber

Hello Jiri,

I tested your patches and checked it in:

https://git.rtems.org/rtems-source-builder/commit/?id=96673d751ab488d5d892ae67c1842aef9d5c068b
https://git.rtems.org/rtems-tools/commit/?id=820eba4546a21bf45d01f7742a59e5ad6da2a119

Thanks a lot for this stuff. It is really helpful for my RTEMS work.

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel