cyclictest problem with the --smi option

tblocklinux

New Member
Joined
Jun 9, 2021
Messages
2
Reaction score
1
Credits
35
Hello all,

I have a problem that I have been working on for some time now, but unfortunately could not solve.
I am working on a NUC6CAYH running Ubuntu 20.04.2 LTS. However, I have made the kernel real-time capable with the Preempt RT patch.
uname -r -v -p -o deliver:
4.9.251-rt166 #1 SMP PREEMPT RT Sun Feb 7 16:35:16 CET 2021 x86_64 GNU/Linux

Here I am trying to find out via: "cyclictest --mlockall --smp --priority=98 --Interval=1000 --distance=0 --smi" if my latencies in a concurrently running program are coming from the System Management Interrupts.

So far so good I think...
Now to my problem. When I run the cyclictest as root user (via sudo su) it only works if I omit the --smi option. If I add the option and run the test, the input returns the following result:
# /dev/cpu_dma_latency set to 0us
WARN: /dev/cpu/0/msr open failed, try chown or chmod +r /dev/cpu/*/msr, or run as root
FATAL: Could not open MSR interface, errno: 2
WARN: /dev/cpu/1/msr open failed, try chown or chmod +r /dev/cpu/*/msr, or run as root
FATAL: Could not open MSR interface, errno: 2


Also, I already tried to create the directories myself for all four cores manually using the following commands: (found in other forum)
mkdir -p /dev/cpu/0
mknod -m 444 /dev/cpu/0/msr c 202 0
mknod -m 444 /dev/cpu/0/cpuid c 203 0
chmod a+rwx /dev/cpu/0/msr

And then run the test again. Unfortunately, this did not work either. This returned:
# /dev/cpu_dma_latency set to 0us
WARN: /dev/cpu/0/msr open failed, try chown or chmod +r /dev/cpu/*/msr, or run as root
FATAL: Could not open MSR interface, errno: 6


Maybe someone can help me here.
Would help me very much
 


This puts me well out of my depth, so until those with more knowledge appear a couple of questions

Did you install cyclictest from the Ubuntu 20 repository or elsewhere ?
have you tried running it without the Preempt RT patch.?
 
Hi,
to your first question: I installed the cyclictest via the rt-test suite, like on this page:
As an addition, I am able to run the cyclictest without the --smi option. And this option enable "count/detection on processors with SMI count support" [http://manpages.ubuntu.com/manpages/cosmic/man8/cyclictest.8.html]

And to your second question: yes, I tried to run the test on the "normal" kernel and get the same Problem. However it would not help if it would work either (except for troubleshooting) because I have to run my Program on a real time operating system.
My intention to run the cyclictest with the --smi option was to determine if the latencies I get, comes from an System Managed Interrupt.
 

Members online


Latest posts

Top