Rtprio with preempt kernel for real time scheduling in 2011

Discussioni e feedback su pacchetti e repository MIB
Post Reply
User avatar
NicCo
Amministratore
Amministratore
Posts: 4739
Joined: 6 December 2007, 19:54

Rtprio with preempt kernel for real time scheduling in 2011

Post by NicCo »

Source:
http://forum.mandriva.com/en/viewtopic. ... 33#p851978


Rtprio with preempt kernel for real time scheduling in 2011

Previous reference guide (worked well until 2010.2):
Mdv come workstation-audio-midi professionale
http://mib.pianetalinux.org/mib/forum/v ... =21&t=2178

In Mandriva 2011 there are many changes from the past distributions, so the methods we used to achieve some results are no more working.

With previous Mandriva distro it was possible with a standard kernel, or better with a preempt one, to give rtprio to user tasks, in 2011.0 it seemed not be more possible to do, but Jon Remener writing in the Mandriva Forum affirmed he found a way to achieve the same past results without having the need using a kernel-rt

He did not specified well how, so yesterday I wrote him to ask to be more precise, explaining step by step the verified solution, he answered kindly, and I wished to copy here his solution to verify with our friends othoth-tux, oiram73, and others interested, if that solution is good even for them in Mandriva 2011.0
Jon Remener wrote:Sorry for the long delay, I've been busy. This is a copy of my limits.conf file, which seems to be working fine, instead of going by groups you need to explicitly set users accounts. Make sure the default values are first(the ones with a *).

#<domain> <type> <item> <value>
#
* - nice 0
* - rtprio 0

anethema - nice -15
anethema - rtprio 80
#* soft core 0
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#@student - maxlogins 4

deluge hard nofile 10000


To launch applications as a user using chrt, you will need to add the setuid flag to it's permissions. This way, whoever runs it runs, it will run as root. Your applications that it starts will run as root too. I know it's not the best solution, but it will work if you still can't grant the elevated privileges.

To set the flag:
chmod +s /usr/bin/chrt

chrt allows you to set programs to different scheduling policies. Check the man page for information and google for more information.
To use chrt to start a program to realtime with a priority of -51:
chrt -r 50 <program name>
Bye, NicCo
.
--- Professional experience ---
Kernel designer, engineer, maintainer and tester for ROSA Desktop and OpenMandriva Lx O.S.

--- currently I'm playing with ---
LTS Kernels > Linux 4.1.12-nrjQL <<< Linux 3.18.17-nrjQL <<< Linux 3.14.46-nrjQL
EOL Kernels > Linux 3.19.8-nrjQL <<< Linux 3.17.8-nrjQL <<< Linux 3.15.10-nrjQL

User avatar
oiram73
Utente senior
Utente senior
Posts: 405
Joined: 5 January 2009, 13:33
ROSA: -
OpenMandriva: 2014
Kernel: 3.19.8-nrjQL-realtim
Desktop: KDE 4.14.3
country: Italia
Location: Perugia
Contact:

Re: Rtprio with preempt kernel for real time scheduling in

Post by oiram73 »

Code: Select all

Test in progress
:D :D :D :D
Sto scrivendo da 2011 su chiavetta usb.
Apportate modifiche al file limits.conf come indicato;
sto usando kernel-rt-mib-0.7
:lol: Yes funziona no xruns:
testato con rosegarden (midi) e smplayer in esecuzione contemporanea: audio perfettissimo!
Oggi si fa festa!!!!!!!!!!
Ancora qualche test qua e là e poi fra qualche giorno faccio l'upgrade sull'hd principale!
Grazie mille a Jon Remener e a NicCo.
:D :mrgreen: :lol:
OMA-2014
oiram/bin/selom
Da ognuno secondo le proprie capacità ad ognuno secondo i propri bisogni!

User avatar
oiram73
Utente senior
Utente senior
Posts: 405
Joined: 5 January 2009, 13:33
ROSA: -
OpenMandriva: 2014
Kernel: 3.19.8-nrjQL-realtim
Desktop: KDE 4.14.3
country: Italia
Location: Perugia
Contact:

Re: Rtprio with preempt kernel for real time scheduling in

Post by oiram73 »

Per NVIDIA:
ho provato a cambiare la LICENSE da NVIDIA a GPL nel file /usr/src/nvidia-current-280.13-69.1mib2010.2/nv.c ed il modulo viene affettivamente compilato ma evidentemente c'è qualcosa che non va visto che poi X non viene caricato, il sistema va in freeze e sono costretto a riavviare con ctrl+alt+stamp+b.
Succede la stessa cosa con i driver scaricati dal sito Nvidia.
OMA-2014
oiram/bin/selom
Da ognuno secondo le proprie capacità ad ognuno secondo i propri bisogni!

User avatar
NicCo
Amministratore
Amministratore
Posts: 4739
Joined: 6 December 2007, 19:54

Re: Rtprio with preempt kernel for real time scheduling in

Post by NicCo »

A parte il Kernel RT che sapevamo già avere problemi con Nvidia, e forse con Ati
che mi sai dire del kernel NRJ eseguendo la stessa guida del Topic in oggetto?
.
--- Professional experience ---
Kernel designer, engineer, maintainer and tester for ROSA Desktop and OpenMandriva Lx O.S.

--- currently I'm playing with ---
LTS Kernels > Linux 4.1.12-nrjQL <<< Linux 3.18.17-nrjQL <<< Linux 3.14.46-nrjQL
EOL Kernels > Linux 3.19.8-nrjQL <<< Linux 3.17.8-nrjQL <<< Linux 3.15.10-nrjQL

User avatar
oiram73
Utente senior
Utente senior
Posts: 405
Joined: 5 January 2009, 13:33
ROSA: -
OpenMandriva: 2014
Kernel: 3.19.8-nrjQL-realtim
Desktop: KDE 4.14.3
country: Italia
Location: Perugia
Contact:

Re: Rtprio with preempt kernel for real time scheduling in

Post by oiram73 »

NicCo wrote:che mi sai dire del kernel NRJ eseguendo la stessa guida del Topic in oggetto?
Si si funziona anche con l' NRJ! :D :D
OMA-2014
oiram/bin/selom
Da ognuno secondo le proprie capacità ad ognuno secondo i propri bisogni!

Post Reply