Page 1 of 1
PREEMPT debian kernel rt issues
Posted: Wed Dec 26, 2018 12:04 am
by wakoo
On fresh Debian 9 I've installed a real-time kernel (official from the repos: linux-image-4.9.0-8-rt-amd64). Well, in accordance with this
info, the real time kernel may have this specs:
Code: Select all
CONFIG_HZ_1000=y
CONFIG_HZ=1000
CONFIG_PREEMPT_RT_FULL=y
CONFIG_PREEMPT=y
But on linux-image-4.9.0-8-rt-amd64, the parameters are:
My question is, How to edit those specs on kernel and how to make those changes persistent.
Salut!
Re: PREEMPT debian kernel rt issues
Posted: Wed Dec 26, 2018 9:07 am
by khz
Processor type and features -> Preemption Model -> (höchste RT-Einstellung vornehmen)
Processor type and features -> Timer Frequency auf 1000
==>
Realtime Kernel:
https://wiki.debianforum.de/Realtime_Ke ... figurieren >> 5 Kompilieren >> 6 Installieren (
https://www.deepl.com/translate)
The Debian Administrator's Handbook: 8.10. Compiling a Kernel
https://debian-handbook.info/browse/sta ... ation.html (https://debian-handbook.info/browse/de- ... ation.html)
Debian GNU/Linux Installation Guide: 8.6. Compiling a New Kernel
https://www.debian.org/releases/stable/ ... 06.html.en (https://www.debian.org/releases/stable/ ... 06.html.de)
Re: PREEMPT debian kernel rt issues
Posted: Wed Dec 26, 2018 1:19 pm
by Jack Winter
wakoo wrote:My question is, How to edit those specs on kernel and how to make those changes persistent.
You probably shouldn't. The kernel is most likely configured as a so called tickless kernel which most likely is better for our purposes than using the 1000Hz ticker (grep the config file for NO_HZ). Also check that it has CONFIG_HIGH_RES_TIMERS and CONFIG_SND_HRTIMER=m / CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
The info on
https://wiki.linuxaudio.org/wiki/system ... the_kernel referring to kernel configuration is IMO no longer relevant.
If you really want to, you'll have to learn how to build and install your own kernel..
Re: PREEMPT debian kernel rt issues
Posted: Wed Dec 26, 2018 4:28 pm
by wakoo
Thanks for the answers. Now I've learned a little about the kernel. I forget the next lines from the
wiki of linuxaudio.org:
Since Debian Wheezy an RT variant is also available in the stock repositories; unfortunately its system timer is set to 250 Hz instead of 1000 Hz, so you'll probably want to recompile your own kernel anyway, especially if you use ALSA MIDI.
So, I have two options: 1) Compile my own kernel, or 2) Download a kernel rt (like AVLinux).
I appreciate your help.
Regards and Happy Music-hacking!
Re: PREEMPT debian kernel rt issues
Posted: Wed Dec 26, 2018 5:39 pm
by khz
Welcome btw
Liquorix Kernel and/or "make menuconfig"

<EDIT>
Code: Select all
cat /proc/interrupts | grep -i time; sleep 10; cat /proc/interrupts | grep time
My results:
Code: Select all
0: 74763084 0 0 0 0 0 IO-APIC 2-edge timer
LOC: 12117727 21586639 18222512 17371363 17532116 17976564 Local timer interrupts
0: 74803799 0 0 0 0 0 IO-APIC 2-edge timer
LOC: 12124588 21597292 18231815 17380505 17539466 17985614 Local timer interrupts
Code: Select all
zcat /proc/config.gz |grep CONFIG_HZ_
My results:
Code: Select all
# CONFIG_HZ_PERIODIC is not set
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set
CONFIG_HZ_1000=y
==>
https://stackoverflow.com/questions/124 ... 7#43212587
Code: Select all
zcat /proc/config.gz |grep CONFIG_PREEMPT
My results:
Code: Select all
CONFIG_PREEMPT_RCU=y
CONFIG_PREEMPT_NOTIFIERS=y
CONFIG_PREEMPT=y
CONFIG_PREEMPT_RT_BASE=y
CONFIG_PREEMPT_LAZY=y
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT__LL is not set
# CONFIG_PREEMPT_RTB is not set
CONFIG_PREEMPT_RT_FULL=y
CONFIG_PREEMPT_COUNT=y
# CONFIG_PREEMPTIRQ_EVENTS is not set
# CONFIG_PREEMPT_TRACER is not set
</EDIT>
Re: PREEMPT debian kernel rt issues
Posted: Wed Dec 26, 2018 7:19 pm
by sysrqer
Do you actually have a problem with the way it is at the moment? I've compiled many kernels and played with this option but I've never seen any difference with it and, as far as I understand, there is not a consensus about which is best. Unless you have a reason to, or you want to learn to build your own kernels, then don't worry about it.