[PlanetCCRMA] What about the real time kernel

Be be.0 at gmx.com
Thu Nov 11 19:43:49 PST 2021

Thank you for sharing this. It would be great to document somewhere. I
though the PREEMPT_RT code that has been merged upstream was only
available with a build time option. It is great that at least some of it
can be enabled with boot time options on generic kernel builds.

Many computers' motherboard firmware doesn't expose a switch to disable
SMT, but this can be done with the 'nosmt' boot option for Linux. I
found that this helps more than boot option or configuration to make
audio less likely to glitch at low latencies, but I haven't tried yet
the boot options you just posted about.

On 11/11/21 14:20, Fernando Lopez-Lezcano wrote:
> On 11/11/21 4:08 AM, Yann Collette wrote:
>> Hello,
>> I still compile the RT kernel for Fedora 33, 34 and 35.
> Hi Yann,
> Thanks so much for doing this!
> I have been too busy and there has not been demand (till now) for an
> rt patched kernel. I will probably skip building Planet CCRMA's rt
> kernels as there is an option for those that need it.
> As to what I use for music...
> I have started using the "normal" Fedora kernel. Newer kernels have
> the PREEMPT_DYNAMIC option which allows you to turn on full preemption
> on boot. Fedora defaults to it being "off" which means you get
> PREEMPT_VOLUNTARY (I think), which is not good for low latency audio.
> But if you add this to the boot command line (in /etc/defaults/grub),
> and recreate the configuration in /boot, the next time you boot you
> will have full preemption:
> ----
> preempt=full
> ----
> You can verify it is on by doing:
> ----
> dmesg|grep preempt
> ----
> As many parts of the RT patch have been migrating over the years to
> the standard kernel the results are not bad at all.
> My latest testing (for critical use) also uses these boot line switches:
> ----
> processor.max_cstate=1 idle=poll
> ----
> These disallow the CPU from going to lower clock speeds and that seems
> to fix xruns when using jackd at low latencies (in my latest test I
> also disabled hyperthreading in the BIOS, I still have to test again
> with it ON to see if it really makes a difference). A replacement
> computer to the control system that runs our Listening Room speaker
> array is now running at 64 frames per period - the best I could do
> before was 128.
> If you have an Intel CPU upping the minimum clock speed in the
> intel_pstate driver (and disabling turbo) is also good (those tweaks
> are in /sys/devices/system/cpu/intel_pstate). I have not double
> checked if this is still needed if you do processor.max_cstat=1....
> Hope this helps...
> -- Fernando
> PS: I have been building and using tweaked Fedora kernels that have a
> hacked Motu USB driver (as outlined in a LinuxMusicians thread) that
> is quite effective at using newer firmware hardware with 64 I/O
> channels on USB2 (not super easy to use and not 100% perfect but does
> the job). But I have not released them... Caveat: this driver does NOT
> really work with a fully RT patched kernel, something to do with the
> number of interrupt and thus context switches it generates.
>> $ dnf search kernel-rt
>> Dernière vérification de l’expiration des métadonnées effectuée il y
>> a 2 days, 15:16:38 le lun. 08 nov. 2021 21:49:52.
>> ====================================================================
>> Nom correspond à : kernel-rt
>> =====================================================================
>> kernel-rt-mao.x86_64 : The Linux Real Time Kernel
>> kernel-rt-mao.src : The Linux Real Time Kernel
>> kernel-rt-mao-devel.x86_64 : Development package for building real
>> time kernel modules to match the 5.14.2.rt21 kernel
>> kernel-rt-mao-headers.x86_64 : Header files for the Linux real time
>> kernel for use by glibc
>> The last one I uploaded is 5.14.2-rt21.
>> The 5.15 is still based on a .0 kernel, so I am waiting for a new
>> release before compiling this version.
>> Best regards,
>> Yann
>> Le 11/11/2021 à 13:02, Yoann LE BARS a écrit :
>>> Hello, everybody out there!
>>>     Well, I have not used Fedora for several months, but I will
>>> probably install it back. So I have been looking to Planet CCRMA
>>> repository, as well to ycollet/linuxmao COPR: there is no more
>>> real-time kernel. As the RT patch is well on its way to be
>>> mainlined, does it mean that the standard kernel is now considered
>>> fulfilling the requirement for music production?
>>>     Best regards.
>> _______________________________________________
>> PlanetCCRMA mailing list
>> PlanetCCRMA at ccrma.stanford.edu
>> https://cm-mail.stanford.edu/mailman/listinfo/planetccrma
> _______________________________________________
> PlanetCCRMA mailing list
> PlanetCCRMA at ccrma.stanford.edu
> https://cm-mail.stanford.edu/mailman/listinfo/planetccrma

More information about the PlanetCCRMA mailing list