From: Lennart Poettering <mzxreary@0pointer.de>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org
Subject: Re: [PATCH] scheduler: introduce SCHED_RESET_ON_FORK scheduling policy flag, Second try
Date: Fri, 5 Jun 2009 16:55:41 +0200 [thread overview]
Message-ID: <20090605145541.GB19690@tango.0pointer.de> (raw)
In-Reply-To: <20090605115410.GA16008@elte.hu>
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.
Any further comments on the patch? Could this be merged? Any changes
necessary?
Lennart
--
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
next prev parent reply other threads:[~2009-06-05 14:56 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 [this message]
2009-06-07 10:11 ` Ingo Molnar
-- 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=20090605145541.GB19690@tango.0pointer.de \
--to=mzxreary@0pointer.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.