On Thu, 11 Feb 2010 08:54:29 +0100 Max Müller wrote: > Clark Williams schrieb: > > On Tue, 9 Feb 2010 07:41:58 +0000 (UTC) > > Max Miller wrote: > > > > > >> Hello, > >> > >> im am using the PREEMPT-RT patch on linux 2.6.29.6. It runs on a MSI965GSE > >> industial board with Intel ATOM CPU (N270, 1,6GHz) and i945GSE Northbridge. > >> > >> I got about 45µs as maximum and 13µs as average latency when hyperthreading is > >> disabled. With enabled Hyperthreading the maximum latency increses to about > >> 100µs. I measured the latency with cyclictest. > >> > >> What can i do to get better maximum latency? Can I do somthing in the kernel > >> configuration or are there some kernel bootoptions? Or is it still impossible > >> with this CPU to get better results? > >> > >> Thanks in advance, > >> Max Miller > >> > >> > >> > > > > Make sure you turn off any power management settings in the BIOS and > > turn off the irqbalance and cpuspeed services on the Linux side. > > > > What cyclictest command are you using to measure latency? > > > > Clark > > > > I run cyclictest as follows: > > cyclictest -n -t3 -p99 You might want to try the new cyclictest option --smp (which is really the options -t, -a -n) and I'd back the priority down to -p95 just to keep out of the way of watchdog and migration threads. In general, when I run it on a multi-core box I use: $ cyclictest --smp -m -p95 -d0 Lately on AMD boxes I use --numa, which makes calls into libnuma to allocated memory on local nodes for the measurement threads. If you want to get fancy and look at at the history of the run, you can use the -h option to keep a histogram of buckets (1 bucket == 1 microsecond). > > For generating additional system load i run (one to several instances): > > while true; do echo "blah" > /dev/null; done & > > Then i watch the max. latency from the thread with the highest priority. > Sometimes i add the parameter '-h' to generate a history. In this > history i can > see that the most latency times are under 20µs, only about 5ppm are > worse than 30µs. > Am i doing this correctly? You're seeing some nice numbers there (any max latency under 100us is pretty good). I have a python program I've been developing named 'rteval' which kicks off a kernel compile and a scheduler benchmark called 'hackbench', then runs cyclictest with the histogram option. After the run it generates a report on how well cyclictest did with the loads in place. If you're interested, you can get rteval from my kernel.org git repo: $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rteval.git It's not 100% complete, but it's getting there. > > > The only powersave setting in the BIOS is "Intel speedstep" which i > disabled. > > > I will check with disabled "irqbalance and cpuspeed services" disabled > and will report later. > > > What should the adequate max. latency on this system? > > I'd say you're doing pretty good keeping under 50us. You might want to try it under a heavier load than the shell script you've been running. If you don't want to fool with rteval, try kicking off a kernel compile in another window like this: $ while true; do make -j4 clean bzImage modules; done and then run cyclictest. A kernel compile with parallel jobs (-j) is a good overall load of computation and I/O.