lkml.org 
[lkml]   [2009]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] scheduler: introduce SCHED_RESET_ON_FORK scheduling policy flag, Second try

* Lennart Poettering <mzxreary@0pointer.de> wrote:

> On Fri, 05.06.09 13:54, Ingo Molnar (mingo@elte.hu) wrote:
>
> >
> >
> > * Lennart Poettering <mzxreary@0pointer.de> wrote:
> >
> > > Why expose this via sched_setscheduler() and not other syscalls
> > > such as prctl() or sched_setparam()?
> > >
> > > prctl() does not take a pid parameter. Due to that it would be
> > > impossible to modify this flag for other processes than the
> > > current one.
> > >
> > > The struct passed to sched_setparam() can unfortunately not be
> > > extended without breaking compatibility, since sched_setparam()
> > > lacks a size parameter.
> >
> > Well, it could be extended, if we wanted to. Right now
> > sched_priority has a valid value of 0 to 100. We could introduce
> > a new value '-1' to mean: 'extended struct sched_param'.
> >
> > A new getparam syscall could then be introduced - only used by
> > new user-space.
>
> The man page of sched_getparam() is pretty explicit in that the
> sched_priority field of the struct must lie between
> sched_get_priority_min() and sched_get_priority_max(). If you'd
> overload sched_priority like this you might end up breaking
> applications that rely on this, for example RT watchdogs that go
> through /proc and query the scheduling parameters of all threads.

Only the new sched_gtparam syscall would do this - and that syscall
would have to be propagated to glibc and user-space with appropriate
care of course. (probably resulting in a separate function not a
change/breakage of existing functionality)

Probably not worth the pain though.

Ingo


\
 
 \ /
  Last update: 2009-06-07 12:15    [W:0.057 / U:9.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site