public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Lennart Poettering <mzxreary@0pointer.de>
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org
Subject: Re: [PATCH] scheduler: introduce SCHED_RESET_ON_FORK scheduling policy flag, Second try
Date: Sun, 7 Jun 2009 12:11:36 +0200	[thread overview]
Message-ID: <20090607101136.GL31286@elte.hu> (raw)
In-Reply-To: <20090605145541.GB19690@tango.0pointer.de>


* 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

  reply	other threads:[~2009-06-07 10:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-29  8:38 [PATCH] scheduler: introduce SCHED_RESET_ON_FORK scheduling policy flag, Second try Lennart Poettering
2009-05-29  9:28 ` Peter Zijlstra
2009-05-29 10:39   ` Lennart Poettering
2009-06-03 14:07 ` Lennart Poettering
2009-06-05 11:54 ` Ingo Molnar
2009-06-05 14:55   ` Lennart Poettering
2009-06-07 10:11     ` Ingo Molnar [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-07-03 12:33 Raz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090607101136.GL31286@elte.hu \
    --to=mingo@elte.hu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mzxreary@0pointer.de \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox