2011-02-04 20:23:31

by Martin

[permalink] [raw]
Subject: scheduling policy was: Re: 2.6.37 considered stable?

Gene Heskett wrote:
> Chuckle. I've been running 2.6.37 here, with all of that new group
> scheduling stuff enabled, the desktop feels great and my only fuss is that
> kaffiene, when watching digital tv on my pcHD-3000 card, is NOT getting
> enough time so both the audio and the video have little 20 millisecond
> holes chopped in them at sub-second intervals. Not the most pleasant
> thing
> to watch. I would appreciate any suggestions on how to get such an
> application a higher priority.
>

Gene, have you tried schedtool to set the scheduling policy of the process to
SCHED_FIFO or even SCHED_ISO?

Before anyone asks, yes, relying on schedtool puts a little reponsibility on
user space, but it is my firm believe that (a) you can't auto-everything and
(b) the onus should be on the distro not the user.

Martin


2011-02-05 06:32:14

by Mike Galbraith

[permalink] [raw]
Subject: Re: scheduling policy was: Re: 2.6.37 considered stable?

On Fri, 2011-02-04 at 21:23 +0100, Dr. Martin Rogge wrote:
> Gene Heskett wrote:
> > Chuckle. I've been running 2.6.37 here, with all of that new group
> > scheduling stuff enabled, the desktop feels great and my only fuss is that
> > kaffiene, when watching digital tv on my pcHD-3000 card, is NOT getting
> > enough time so both the audio and the video have little 20 millisecond
> > holes chopped in them at sub-second intervals. Not the most pleasant
> > thing
> > to watch. I would appreciate any suggestions on how to get such an
> > application a higher priority.
> >
>
> Gene, have you tried schedtool to set the scheduling policy of the process to
> SCHED_FIFO or even SCHED_ISO?

/*
* Scheduling policies
*/
#define SCHED_NORMAL 0
#define SCHED_FIFO 1
#define SCHED_RR 2
#define SCHED_BATCH 3
/* SCHED_ISO: reserved but not implemented yet */
#define SCHED_IDLE

> Before anyone asks, yes, relying on schedtool puts a little reponsibility on
> user space, but it is my firm believe that (a) you can't auto-everything and
> (b) the onus should be on the distro not the user.

You only want to run apps RT if they really really need it though. In
many cases, running an app RT will reduce performance, and may well
increase latencies. (deterministic != quick like a bunny;)

-Mike

2011-02-05 12:27:11

by Martin

[permalink] [raw]
Subject: Re: scheduling policy was: Re: 2.6.37 considered stable?

Mike Galbraith wrote:

>> Gene, have you tried schedtool to set the scheduling policy of the
>> process to SCHED_FIFO or even SCHED_ISO?
>
> /*
> * Scheduling policies
> */
> #define SCHED_NORMAL 0
> #define SCHED_FIFO 1
> #define SCHED_RR 2
> #define SCHED_BATCH 3
> /* SCHED_ISO: reserved but not implemented yet */
> #define SCHED_IDLE

When I mentioned SCHED_ISO I was making the mental note "provided you are
running a scheduler that supports SCHED_ISO" as I do.

> You only want to run apps RT if they really really need it though. In
> many cases, running an app RT will reduce performance, and may well
> increase latencies. (deterministic != quick like a bunny;)

I agree with that statement, and on all machines I own the video applications
run under SCHED_NORMAL nice 0. However, on machines where the audio/video
performance is borderline, it may help to tweak the scheduling policy (save
buying new hardware).

Regarding "quick like a bunny": depending on the KPI (forgive the corporate
lingo ;-) you are looking at, it means different things. For me as a desktop
user, it is determined by the "snappiness" and "smoothness" of the user
interface and all other applications with direct user interaction. Throughput
KPIs are less relevant, although still important for foreground applications.

A solution that gives me that, to the extent that compiling large projects in
the background is unnoticable to the user experience, is superior to others.
Unfortunately, in my experience, auto-this and auto-that is not always the
answer.

Anyway, all I wanted to do is to encourage Gene to try something out and see
if it helps.

Martin