isolcpus=1,2,3 does not isolate on Raspberry Pi 4Bx4Gb 5.15.65-rt49/2.9 32bit

More
17 Feb 2023 17:35 #264703 by DrKnow65
Like the title says, when I add " isolcpus=1,2,3 idle=poll " to the end of the string at /boot/cmdline.text.
I do not get 1-3 when I cat /sys/devices/system/cpu/isolated.

When I run latency-histogram --nobase I get "4 cores no_isolcpus ARMv7 Processor rev 3 (v71) as a header. 
min(us)-108.6, sdev(us) 2.2, max(us)121.5

If I run the histogram and open htop I can see all 4 cores bouncing the loads around.

Can anyone verify isolcpus is working on their Rpi4x4gb with this or higher PreemptRT kernel.
This was compiled in the weee hours of the night last night from a vanilla RaspiOS 32bit with the gnipsel "Installing LinuxCNC on Debian 11" instructions after loading the kdoren/linux/releases PreemptRT kernel patches.

The Pi is up and running, talking nice to my 7i90, but looking like Mt.Everest on my histogram.

Thoughts? Instructions?

Please Log in or Create an account to join the conversation.

More
18 Feb 2023 08:37 - 18 Feb 2023 08:57 #264741 by elovalvo
kdoren's procedure puts all files in a separate folder that has the same name as the kernel release.
Indeed in the file /boot/config.txt you will find the command os_prefix=$KERN/ which in your case will be 5.15.65.rt65-v7l+.

Therefore you will need to edit the /boot/5.15.65.rt65-v7l+/cmdline.txt file.
In case it is not present, you can take the content of the one present in /boot/cmdline.txt and adapt it to your needs

in any case all the instructions and the link to the ready-made image are also available here:

forum.linuxcnc.org/9-installing-linuxcnc...erry-pi-3b-pi#260915
Last edit: 18 Feb 2023 08:57 by elovalvo.
The following user(s) said Thank You: DrKnow65

Please Log in or Create an account to join the conversation.

More
18 Feb 2023 10:53 #264747 by rmu
you can check cmdline the running kernel was started with with 'cat /proc/cmdline'
The following user(s) said Thank You: DrKnow65

Please Log in or Create an account to join the conversation.

More
18 Feb 2023 23:54 #264781 by DrKnow65
Sorry for not responding sooner guys, I have been blocked from the forum for "too many unsuccessful login attempts" not my fault, something to do with spam or hackers. On my cellphone's hotspot to post this.

I tried adding the isolcpus to the other cmdline.txt seems to have fixed me up.

Thanks guys!

Please Log in or Create an account to join the conversation.

More
06 Mar 2023 15:20 #265956 by nickom44
I was tinkering trying to reduce latency on a pi3b  and found what looks like a similar issue with isolcpus
  • Raspberry  pi 3b 
  • I'm running Linux raspberry pi  5.15.84-v8+ #1613  SMP PREEMPT  aarch64 GNU-Linux
  •  
  • compiled Run in place  as I couldn't get debuild to complete
  •  
  • echo -n ' isolcpus=1,2,3 idle=poll processor.max_cstate=1' | sudo tee -a /boot/cmdline.txt
  • checked all ok   
  • from terminal cat /boot/cmdline.txt      isolcpus=1,2,3 idle=poll processor.max_cstate=1
  •  
  • from terminal launched latency-histogram 
    • from terminal it says Note:  using POSIX non-realtime  
    • in histogram is says 4 cores no_isolcpus
Regards
Nick

 

Please Log in or Create an account to join the conversation.

More
07 Mar 2023 21:24 #266067 by andypugh

  • from terminal it says Note:  using POSIX non-realtime  

I would worry about that first. For some reason the system isn't finding your realtime kernel. 

You say you compiled from source. When you ran

./configure --with-realtime=uspace

Did the screen output suggest that it had found a realtime-capable kernel?  (You would need to scroll back to near the beginning)

Please Log in or Create an account to join the conversation.

More
08 Mar 2023 10:59 #266105 by elovalvo

I was tinkering trying to reduce latency on a pi3b  and found what looks like a similar issue with isolcpus
  • Raspberry  pi 3b 
  • I'm running Linux raspberry pi  5.15.84-v8+ #1613  SMP PREEMPT  aarch64 GNU-Linux
  •  
  • compiled Run in place  as I couldn't get debuild to complete
  •  
  • echo -n ' isolcpus=1,2,3 idle=poll processor.max_cstate=1' | sudo tee -a /boot/cmdline.txt
  • checked all ok   
  • from terminal cat /boot/cmdline.txt      isolcpus=1,2,3 idle=poll processor.max_cstate=1
  •  
  • from terminal launched latency-histogram 
    • from terminal it says Note:  using POSIX non-realtime  
    • in histogram is says 4 cores no_isolcpus


      Regards
      Nick


What is the contents of the /boot/config.txt file?

The OS "Linux raspberry pi  5.15.84-v8+ #1613  SMP PREEMPT  aarch64 GNU-Linux" is not realtime

Please Log in or Create an account to join the conversation.

More
08 Mar 2023 11:22 - 08 Mar 2023 11:24 #266107 by nickom44
Hi elovalvo,

Here's the contents .

Regards
Nick

GNU nano 5.4 config.txt # uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# Automatically load overlays for detected cameras
camera_auto_detect=1

# Automatically load overlays for detected DSI displays
display_auto_detect=1

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

## Run in 64-bit mode
arm_64bit=1

# Disable compensation for displays with overscan
disable_overscan=1

[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1

[all]

[pi4]
# Run as fast as firmware / board allows
arm_boost=1

[all]
Last edit: 08 Mar 2023 11:24 by nickom44. Reason: more info

Please Log in or Create an account to join the conversation.

More
09 Mar 2023 10:12 #266192 by rmu

  • compiled Run in place  as I couldn't get debuild to complete
  • from terminal launched latency-histogram 
    • from terminal it says Note:  using POSIX non-realtime  
    • in histogram is says 4 cores no_isolcpus

did you run "sudo make setuid" after building linuxcnc? without setuid bit rtapi_app doesn't have permission to get realtime scheduler priority.

Please Log in or Create an account to join the conversation.

More
10 Mar 2023 08:00 #266274 by elovalvo

Hi elovalvo,

Here's the contents .

Regards
Nick


From what I see missing any line of the type

kernel=vmlinuz-XXXXX

and therefore the operating system is not realtime.

If you want an image that definitely works on Raspberry Pi 3 you can use the one you find here: forum.linuxcnc.org/9-installing-linuxcnc...3b-pi?start=0#260915

Please Log in or Create an account to join the conversation.

Time to create page: 0.079 seconds
Powered by Kunena Forum