[LITMUS^RT] litmus-dev Digest, Vol 49, Issue 4
Björn Brandenburg
bbb at mpi-sws.org
Sun Mar 20 19:56:57 CET 2016
> On 17 Mar 2016, at 02:03, Shuai Zhao <zs673 at york.ac.uk> wrote:
>
> Hi
>
> I got more information.
>
> The result I showed in the first email is tested with hyper thread disabled. In the result the interval of thread cpu timer goes greater than that of wall clock so we get a difference of a negative value.
>
> However, if I enable the hyperthreading in BIOS, the wall clock will always greater so we get a difference of positive value. Yet the value will still double if I double the loop time.
>
> Do you have any idea why this happens?
>
> Best wishes
> Shuai
>
>
> On 16 March 2016 at 23:22, Shuai Zhao <zs673 at york.ac.uk <mailto:zs673 at york.ac.uk>> wrote:
> Hi All
>
> Thank you for helping.
>
> 1. It happens both on Generic Linux kernel and Litmus. I suppose that it is an issue with generic Linux or my machine. But I think you may now the answer as you also deal with clocks in Litmus.
>
> 2. It seems that NTP is not responsible as I tried with clock CLOCK_MONOTONIC_RAW as well, but get same results.
>
> 3. Yes, I bind the thread to core 1 during its life time but still same results.
>
> More info, I tried out the same test program on a laptop and the results are opposite. The difference between thread cpu timer and wall clock still doubles but the interval of wall clock is always greater. Yet on my desktop the interval of thread cpu time is greater. Really Really weird. The cpu clock speed on the laptop is 2000 MHz but it runs at 1996 MHz.
>
> I attached the program here so you can also try out at your side. Compile with gcc -g -Wall -O2 clock.c -lrt -lpthread. The program takes a param to set how many times the thread will loop.
>
> Thank you for helping again.
>
> Best wishes
> Shuai
As I said, I haven’t seen this behavior before, but my guess would be that it might have something to do with Intel’s Turbo Boost feature (unless you disabled that in the BIOS).
In any case, since it is present in vanilla Linux, I’m afraid we probably won’t be able to offer too much help here. Perhaps StackOverflow or some other general Q&A forum is a better place to get more information on this.
- Björn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20160320/bc754db7/attachment.html>
More information about the litmus-dev
mailing list