Re: [LAD] Realtime threads and security

From: torbenh <torbenh@email-addr-hidden>
Date: Fri Feb 18 2011 - 13:18:52 EET

On Thu, Feb 17, 2011 at 10:04:31PM +0000, Fons Adriaensen wrote:
> On Thu, Feb 17, 2011 at 10:53:54PM +0100, Robin Gareus wrote:
>
> > /proc/sys/kernel/sched_rt_runtime_us
> > /proc/sys/kernel/sched_rt_period_us
> >
> > > I've been told than on OSX, when a process runs in realtime, it is only allowed
> > > to use a certain ratio of CPU time. And if it goes over this limit, it loses its
> > > priority. Is there something comparable on Linux? Maybe with the files in
> > > /proc/sys that you mention?
> >
> > not exactly. /proc kernel.sched_rt_runtime_us globally limits realtime
> > scheduling time. To limit it per process you'll need cgroups.
>
> Still this provides protection against any RT-process that goes
> out of control. If the limit is exceeded, all RT procs will be
> blocked for the next sched_rt_period_us (default seems to be 1s),
> which should give you the opportunity to kill the offending process.
>
> There seem to be some restrictions on runtime / period, this must
> be between 0.95 and 1.00 or zero. Which means that in order to adjust
> period you first need to set runtime to zero, then adjust period, then
> reset runtime to a value within the accepted range.

if that restriction exists, its a bug.
i remember that i successfully set the ratio to 0.1 ...

>
> --
> FA
>
> _______________________________________________
> Linux-audio-dev mailing list
> Linux-audio-dev@email-addr-hidden
> http://lists.linuxaudio.org/listinfo/linux-audio-dev

-- 
torben Hohn
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Fri Feb 18 16:15:01 2011

This archive was generated by hypermail 2.1.8 : Fri Feb 18 2011 - 16:15:02 EET