在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
RT-TestsThis repository contains some programs that test various rt-linux features. UsageCompilesudo apt-get install build-essential libnuma-devmake Run testsTo run one test thread per CPU or per CPU core, each thread on a separateprocessor, type sudo ./cyclictest -a -t -n -p99 On a non-realtime system, you may see something like T: 0 ( 3431) P:99 I:1000 C: 100000 Min: 5 Act: 10 Avg: 14 Max: 39242T: 1 ( 3432) P:98 I:1500 C: 66934 Min: 4 Act: 10 Avg: 17 Max: 39661 The rightmost column contains the most important result, i.e. the worst-caselatency of 39.242 milliseconds. On a realtime-enabled system, the result maylook like T: 0 ( 3407) P:99 I:1000 C: 100000 Min: 7 Act: 10 Avg: 10 Max: 18T: 1 ( 3408) P:98 I:1500 C: 67043 Min: 7 Act: 8 Avg: 10 Max: 22 and, thus, indicate an apparent short-term worst-case latency of 18microseconds. Running cyclictest only over a short period of time and without creatingappropriate real-time stress conditions is rather meaningless, since theexecution of an asynchronous event from idle state is normally always quitefast, and every - even non-RT system - can do that. The challenge is to minimizethe latency when reacting to an asynchronuous event, irrespective of what codepath is executed at the time when the external event arrives.Therefore, specific stress conditions must be present while cyclictest isrunning to reliably determine the worst-case latency of a given system. Latency fightingIf - as in the above example - a low worst-case latency is measured, and this isthe case even under a system load that is equivalent to the load expected underproduction conditions, everything is alright.Of course, the measurement must last suffciently long, preferably 24 hours ormore to run several hundred million test threads. If possible, the What, however, if the latency is higher than acceptable? Then, the famous"latency fighting" begins. For this purpose, the cyclictest tool provides the ./cyclictest -a -t -n -p99 -f -b100 This causes the program to abort execution, if the latency value exceeds 100microseconds; the culprit can then be found in the trace output at qemu-30047 2D.h3 742805us : __activate_task+0x42/0x68 <cyclicte-426> (199 1)qemu-30047 2D.h3 742806us : __trace_start_sched_wakeup+0x40/0x161 <cyclicte-426> (0 -1)qemu-30047 2DNh3 742806us!: try_to_wake_up+0x422/0x460 <cyclicte-426> (199 -5)qemu-30047 2DN.1 742939us : __sched_text_start+0xf3/0xdcd (c064e442 0) The first column indicates the calling process responsible for triggering thelatency. If the trace output is not obvious, it can be submitted to the OSADL LatencyFight Support Service at[email protected].In addition to the output of |
请发表评论