Questions tagged [preempt-rt]

PREEMPT_RT is the real-time patch for the Linux kernel

PREEMPT_RT is a real-time patch aiming at reducing the maximum latency experienced by tasks running on the Linux kernel. Some parts of the patch have been merged into the mainline kernel from time to time. The development is sponsored by the Linux Foundation under the Real Time Linux collaborative project.

53 questions
2
votes
0 answers

Unexpectedly high latency spikes measured with hwlat

I am using hwlat_detector tracer to measure system latencies that are caused outside the Linux. The machine used for measurements is Asus Zenbook ux331un. I did disable processor power states with idle=poll kernel cmd-line parameter, hyper threading…
gnov
  • 21
  • 1
2
votes
0 answers

Linux PREEMPT_RT: Are system calls still handled in software interrupt handler?

According to the Linux source code and this topic : do system calls execute inside a software interrupt handler in entirety? It seems that some system calls are handled entirely inside the interrupt handler (without considering vDSO system calls).…
Loukis95
  • 21
  • 2
2
votes
1 answer

mlockall(): cannot allocate memory

I am getting the error: mlockall failed: Cannot allocate memory when calling the function mlockall(): if(mlockall(MCL_CURRENT|MCL_FUTURE) == -1) { printf("mlockall failed: %m\n"); exit(-2); } IDE used: Eclipse OS: Ubuntu…
inapathtolearn
  • 65
  • 2
  • 10
2
votes
0 answers

What are suitable POSIX-mechanisms for sharing resources between real-time and non-real-time tasks?

I am currently working with a PREEMPT_RT patched Linux system (including librt and libpthread) and it seems that my real-time threads work fairly reliable from a timing point of view. What mechanism would be suitable to prevent race conditions when…
dubbaluga
  • 2,223
  • 5
  • 29
  • 38
1
vote
0 answers

About PREEMPT_RT caveats & local_lock

Recently, I am reading about linux locking,from https://www.kernel.org/doc/html/latest/locking/locktypes.html#local-lock when I read this : local_lock on RT The mapping of local_lock to spinlock_t on PREEMPT_RT kernels has a few implications. For…
1
vote
1 answer

Problem with two displays on a system running Ubuntu with Preempt_RT patch

For developing a control program i need a rt system. I decided to use Ubuntu with Preempt rt patch. I tried out different kernels (Versions 5.19, 6.0 and 6.2) and patched with the corresponding patch. I do have two monitors connected to my pc via a…
Jens
  • 21
  • 3
1
vote
0 answers

PREEMPT_RT kernel doesn't look preemptive

I'm trying to make a device running Linux. My system was built with Buildroot 2022.02; Kernel is 4.19.252 (+PREEMPT_RT patch) assembled with…
1
vote
1 answer

Meaning of "SCA" in flag SCA_MIGRATE_ENABLE/DISABLE in Linux kernel

These flags are defined in kernel/sched/sched.h and are used when enabling/disabling migration for a task in core.c. I haven't been able to determine what SCA is short for from looking at the code or patch notes.
1
vote
0 answers

Preempt RT linux building process failed

I followed this guide https://docs.ros.org/en/foxy/Tutorials/Building-Realtime-rt_preempt-kernel-for-ROS-2.html At building time (make -j nprocdeb-pkg) I get an error, that I think I solved following the second answer of this guide…
1
vote
1 answer

Investigating thread stack overflow

I am experiencing segmentation fault when running my multi-threaded embedded application. GDB gave me a hint that the stack could be corrupt which lead me to believe the stack is too small for the problematic thread. Increasing the stack size seem…
norq
  • 1,404
  • 2
  • 18
  • 35
1
vote
1 answer

Besides checking /boot/config_xx and /proc/config.gz, how to confirm the preempt rt option is enabled or not for a specific Linux kernel?

Besides checking /boot/config_xx and /proc/config.gz, how to confirm the preempt rt option is enabled or not for a specific Linux kernel? I can login to the OS by SSH and I have the root permission.
John
  • 2,963
  • 11
  • 33
1
vote
0 answers

PREEMPT RT kernel latency issue

I am currently running Debian 9 stretch with a PREEMPT RT kernel patch on a beaglebone black. My kernel version is: 4.4.155-ti-rt-r155 I have performed a latency test by writing a kernel module that turn an LED on after an interrupt is triggered by…
1
vote
1 answer

What has priority over SCHED_DEADLINE?

In experimenting with scheduling a high speed thread, I've noticed that sometimes there are large periods (multiple ms) that the thread is not scheduled. I was wondering what might be able to do this to the scheduler in the configuration I am…
xl600
  • 71
  • 5
1
vote
0 answers

Raspberry Pi RT Preempt Linux Kernel Build Error

I am trying to Build and install a Raspberry Pi RT Preempt Linux Kernel. These are the steps that I had followed: I installed the pre-compiled kernel kernel-4.4.9-rt17.tgz I downloaded Raspberry Pi kernel sources and applied the Real Time…
1
vote
1 answer

when is RT_PREEMPT patch released for Linux kernel 4.11

When is RT_PREEMPT patch released for linux kernel 4.11, the newest stable Linux Kernel? I know I can enable CONFIG_PREEMPT in the mainline Linux Kernel but what are the differences between this mainline PREEMPT and the RT_PREEMPT patch? Does…
winston
  • 123
  • 4