This content has been marked as final. Show 3 replies
$ uname -a
Linux bunty 2.6.24-15-rt #1 SMP PREEMPT RT Tue Apr 8 02:25:55 UTC 2008 i686 GNU/Linux
This does not help. I also disabled the CPU frequency and power save options in the BIOS.
I still get this message on boot
[ 18.958304] ..TIMER: vector=0x31 apic1=0 pin1=2 apic2=-1 pin2=-1
[ 19.070491] checking TSC synchronization [CPU#0 -> CPU#1]:
[ 19.090481] Measured 261160 cycles TSC warp between CPUs, turning off TSC clock.
[ 19.090484] Marking TSC unstable due to: check_tsc_sync_source failed.
Does this explain problem? If so is there any way around it? My application requires one realtime thread that would be OK if it just ran on 1 CPU leaving the other to do the non realtime tasks.
DR_PJ wrote:Did you perhaps overstrip this - getNanoseconds() only returns the nanosecond portion of the time, you also have to check the milliseconds part.?
I think the my clock sometimes goes backwards. This is a stripped down version of my code.
assert(t2>=t1); // this fails
eg. Try assert(t2.compareTo(t1) >=0)
BTW Always use the getTime(dest) version to avoid the allocation overhead.
I do get this message in dmesg on boot "Clocksource tsc unstable".This is very common - the tsc is unstable on most mp systems.
Check the available and current clocksource used by the kernel (you need to be root):
You want to use hpet if available, else acpi_pm. You do not want jiffies. You do not want TSC if you have an unstable TSC. To set the clocksource just write to the current_clocksource file eg:
~ # cat /sys/devices/system/clocksource/clocksource0/available_clocksource hpet acpi_pm jiffies tsc ~ # cat /sys/devices/system/clocksource/clocksource0/current_clocksource hpet
echo hpet > /sys/devices/system/clocksource/clocksource0/current_clocksource
Can I force the realtime thread to live on a given CPU?Not directly. Java RTS allows all RealtimeThreads and all NoHeapRealtimeThreads to be bound to particular cpu or group of CPUs (processor sets on Solaris, cpusets on Linux). But this functionality is only available on Linux in the forthcoming 2.1 beta