Re: [LAU] chrt doesn't seem to be working

From: Florian Schmidt <mista.tapas@email-addr-hidden>
Date: Tue Nov 20 2007 - 10:25:29 EET

On Monday 19 November 2007, David Causse wrote:
> Ken Restivo a écrit :
> > I'm having a bit of difficulty getting chrt to, um, chrt.
> >
> > I've written a little MIDI-processing daemon and I want it to run with
> > high priority. It is very small and tight and I don't expect it to take
> > up much CPU, but I definitely want it running first.
> >
> > So I do this:
> > sudo /usr/bin/chrt -f -p 81 `pidof mydaemon`
> >
> > And then I do this:
> > ps -Leo pid,class,rtprio,ni,pri,pcpu,stat,comm --sort -rtprio
> >
> > And... my daemon does *not* show up in the process list at all.
>
> Try this :
> ps Haxo pid,class,rtprio,ni,pri,pcpu,stat,comm --sort=-rtprio
> --sort seems to skip some processes with the -edf syntax style, I don't
> know why...
> But your process won't be on top because you have set the SCHED_FIFO
> wich is not rtprio.
> You should use :
> chrt -p 81 `pidof mydaemon`
> SCHED_RT is the default.

hum? SCHED_FIFO is one of the posix realtime scheduling classes. the -f option
to chrt chooses this scheduling class.

SCHED_RT has different semantics (though also being a reatime scheduling
class). Which one you want depends on your needs. For most audio stuff
SCHED_FIFO is appropriate..

So chrt -f -p 81 will make your process the top priority in the system given
there's no higher one [doh!] ;)

Regards,
Flo

-- 
Palimm Palimm!
http://tapas.affenbande.org
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user
Received on Tue Nov 20 12:15:02 2007

This archive was generated by hypermail 2.1.8 : Tue Nov 20 2007 - 12:15:02 EET