• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Doc
  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Products
    • Automation Designer
    • HMI Designer
    • Maritime HMIs
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • Other - Advanced Use
  • Linux Kernel Configuration

Linux Kernel Configuration

About

The page discusses recommended patches and configuration for the Linux kernel to provide the best possible performance for real time applications (without introducing a new application interface like e.g. RTAI).

The following sections will not go into details regarding patching and building, but rather focus on providing an overview.

More details regarding kernel patching and building can be found in the RT_PREEMPT_HOWTO.

RT_PREEMPT Patch

The RT_PREEMPT patch aims to make the standard Linux kernel fully preemptible and enable hard realtime capabilities. According to the RT_PREEMPT_HOWTO, this is "how the magic is done":

  • Making in-kernel locking-primitives (using spinlocks) preemptible though reimplementation with rtmutexes
  • Critical sections protected by i.e. spinlock_t and rwlock_t are now preemptible. The creation of non-preemptible sections (in kernel) is still possible with raw_spinlock_t (same APIs like spinlock_t).
  • Implementing priority inheritance for in-kernel mutexes, spinlocks and rw_semaphores
  • Converting interrupt handlers into preemptible kernel threads: The RT-Preempt patch treats soft interrupt handlers in kernel thread context, which is represented by a task_struct like a common userspace process. However, it is also possible to register an IRQ in kernel context.
  • Converting the old Linux timer API into separate infrastructures for high resolution kernel timers plus one for timeouts, leading to userspace POSIX timers with high resolution.

The latest and actively maintained kernel patches are listed on the Real-Time Linux Wiki.

Kernel Configuration

Configure the kernel according to your hardware requirements. Other than that most default configurations are fine, but the following should be ensured:

  • Enable High Resolution Timer Support
  • Enable Fully Premptible Kernel (RT)
  • Enable Tickless kernel
  • Disable Power management and ACPI options (depending on kernel version, this could be configured after building the kernel)

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

My account

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

© Copyright 2025 CDP Technologies. Privacy and cookie policy.

Return to top