Re: [RFC][PATCH] Multimedia scheduling class, take 2

From: Chris Friesen
Date: Tue May 12 2009 - 19:04:28 EST


Jussi Laako wrote:
> Chris Friesen wrote:
>
>>Of course, without glibc/pthreads support you would only be able to set
>>the nice level for the current thread since you don't have any way to
>>map from "pthread_t *" to tid. And you wouldn't be able to create new
>>threads with a particular nice level already set.
>
>
> This is the problem... It has to work this way, otherwise it's pretty
> useless.

Then you're hooped, because glibc checks for scheduler policies it
"knows" about.

>>But that argument
>>holds true for a new sched policy as well, because glibc checks the
>>policy internally and only knows about the normal three.
>
>
> Don't tell that to my system, where also SCHED_IDLE, SCHED_BATCH (which
> are btw not listed on POSIX either) ...and... SCHED_MM work. It goes
> directly to kernel which does the checks and fails if it sees fit.

Really? You can call pthread_attr_setschedpolicy() with a policy of
SCHED_MM? On my copy of glibc 2.8 it explicitly checks for
FIFO/RR/OTHER and anything else is rejected.

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/