Hi Tiago,
On 06/28/2016 11:55 AM, Tiago Brito wrote:
Hi, so after comparing the binaries I realized that my NW application is using hard float instruction, unlike it's SW counter part.
I changed my NW application toolchain for one which support soft float in order to check if my measurements are consistent. And in some way the execution time gap between both for-loops decreased significantly, but there's still a 100 ms gap between both execution times.
Before the NW was measuring 155 ms and the SW was measuring 610 ms. Now the NW is measuring 500 ms whilst the SW is measuring the same 610 ms as before.
My theory is that Genode's scheduling might be delaying the SW execution. I say this because I added a print in the resume function of the thread scheduler and it prints several times when the SW for-loop is executing.
What I want to ask is, is my theory plausible? Would the SW scheduler delay the execution by 100 ms? It seems a bit too much time... What can I do to shorten this time gap between both executions?
By default, if you do not configure any CPU quota and priority, the kernel will schedule round-robin. As long as the "normal" world is not stopped during the calculation within your "secure" Genode component, it will be executed side-by-side. But I wonder why it is not stopped - did you changed the execution model?
If you want to ensure that your specific calculation routine is always executed when it is runnable, you have to add a:
<resource name="CPU" quantum="100"/>
in its start node within the XML configuration of the init component. This will give 100% of the CPU quota to your component. But be aware that you can easily starve other components this way, as long as your component never blocks.
Regards Stefan
Thanks in advance, Tiago
2016-06-27 12:16 GMT+01:00 Tiago Brito <tb.genode@...9...>:
Hi again, I'm using the linaro's arm-linux-gnueabihf 5.3 toolchain to compile the application running on top of the NW linux, but I want to try and compile it using the same compiler version used for genode since the use of different compilers is probably interfering with my benchmark measurements (it's the only variant).
I tried using the GCC present in genode's toolchain but I'm having several No such file or directory errors with stdio.h and string.h includes. My application also uses sockets, so the necessary include files are used and may cause similar errors in the compilation process.
Do you have any suggestion on how to solve this and get the same basic for-loop to show similar performance results in both the Normal and Secure World execution contexts?
Thanks, Tiago
2016-06-23 17:20 GMT+01:00 Christian Helmuth < christian.helmuth@...1...>:
Hello Tiago,
On Thu, Jun 23, 2016 at 04:32:18PM +0100, Tiago Brito wrote:
I did not check if the binary code is similar, but I did measure just
the
for-loop in both worlds and the times are those I described previously.
You really should compare the binary code as example that's slower in SW uses floating arithmetics unless I'm mistaken. If the code is similar and the execution time differs much, there may be an issue with FPU handling in SW.
Greets
Christian Helmuth Genode Labs
http://www.genode-labs.com/ · http://genode.org/ https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape _______________________________________________ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape
genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main