public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Timothy Miller <miller@techsource.com>
To: John Lee <johnl@aurema.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH] O(1) Entitlement Based Scheduler
Date: Wed, 25 Feb 2004 19:31:03 -0500	[thread overview]
Message-ID: <403D3E47.4080501@techsource.com> (raw)
In-Reply-To: <Pine.GSO.4.03.10402260834530.27582-100000@swag.sw.oz.au>



John Lee wrote:
> 
> On Wed, 25 Feb 2004, Timothy Miller wrote:
> 
> 
>>Well, considering that X is suid root, it's okay to require that it be 
>>run at nice -15, but how is the user without root access going to renice 
>>xmms?  
> 
> 
> Hm, I would have thought the vast majority of xmms users would be running
> it on their own machines, to which they have root access. Hope I'm not 
> missing something here... :-)

It's a security concern to have to login as root unnecessarily.  It's 
bad enough we have to do that to change X11 configuration, but we 
shouldn't have to do that every time we want to start xmms.  And just 
suid root is also a security concern.

> 
> 
>>Even for those who do, they're not going to want to have to 
>>renice xmms every time they run it.  Furthermore, it seems like a bad 
>>idea to keep marking more and more programs as suid root just so that 
>>they can boost their priority.
> 
> 
> Assuming that all/most xmms users do have root permissions, I would think
> that this is a very minor inconvenience... isn't xmms something which you
> tend to start up once and leave running until you log out?

This is a bad assumption.  You should never require users to login as 
root to do basic user-oriented tasks.  Indeed, it's often nice to have 
an icon or menu option to start it without having to pull up a terminal, 
and if the program ASKS for the root password, it's annoying to have to 
type that in just to get it to start.

Under Solaris, a number of device nodes (sound, serial ports, etc.) have 
their ownership changed to that of the user who logs into the console. 
This is so that they can access those devices without logging in as root.

What about computer labs of Linux boxes where users do not own the 
computers and are therefore not allowed to login as root.  Should they 
be prohibited from running xmms properly?

For a while, the sysadmin here at work tried to deploy Windows boxes 
with restricted user priveleges, and the users were not given the admin 
password.  For the engineers, that changed, fortunately.  But consider 
what would happen if Linux boxes were deployed that way.  It would suck 
if Windows users could still listen to MP3's during heavy CPU usage but 
Linux users could not.  There are many good reasons to lock down 
workstations and not provide root access.

> 
> I don't think xmms needs to be an suid program, it can just be given a
> renice once (ie. more shares, -9 ==> 101 shares, which is 5 times
> the default, just my choice) and then left alone. Furthermore, the
> controls that my patch features are intended to be exercised as root,
> normal users can do less (as for nice, you can give your own processes
> less shares but not more, and can apply _more_ restrictive CPU caps on
> your tasks).

If someone does not own the box they're using, but they want to, say, 
contribute to xmms development, they're going to be starting and 
stopping the program quite frequently.  They're not going to have any 
way to set the nice level.

Consider what happens if some other user logs in remotely to that 
workstation and starts a large compile.

>>From my testing so far, X and xmms have been the only candidates for a
> shares increase, as these two have been the most talked about :-).
> And after all, one purpose of the patch is to allow users to allocate CPU
> to their tasks in any way they deem fit.

They are the most talked about, so you tested them.  Fine.  But we all 
know that they are not representative samples.  There are bound to be 
numerous other programs that have similar problems.

The way your scheduler works, USERS cannot "allocate CPU to their tasks 
in any way they deem fit".  Only system administrators can.

> 
>>Not to say that your idea is bad... in fact, it may be a pipe dream to 
>>get "flawless" interactivity without explicitly marking which programs 
>>have to be boosted in priority.  Still, Nick and Con have done a 
>>wonderful job at getting close.
> 
> 
> They have indeed, there haven't been any "poor interactivity" emails for a
> while now :-).
> 
> Good interactivity was just one of my goals, I was also aiming for better
> CPU resource allocation and simplification of the main code paths in the
> scheduler by doing away with heuristics, and therefore better throughput.

I read your paper, and I think you have some wonderful ideas.  Don't get 
me wrong.  I think that your ideas, coupled with an interactivity 
estimator, have an excellent chance of producing a better scheduler.

In fact, that may be the only "flaw" in your design.  It sounds like 
your scheduler does an excellent job at fairness with very low overhead. 
  The only problem with it is that it doesn't determine priority 
dynamically.



  reply	other threads:[~2004-02-26  0:21 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-25 14:35 [RFC][PATCH] O(1) Entitlement Based Scheduler John Lee
2004-02-25 17:09 ` Timothy Miller
2004-02-25 22:12   ` John Lee
2004-02-26  0:31     ` Timothy Miller [this message]
2004-02-26  2:04       ` John Lee
2004-02-26  2:18       ` Peter Williams
2004-02-26  2:42         ` Mike Fedyk
2004-02-26  4:10           ` Peter Williams
2004-02-26  4:19             ` Mike Fedyk
2004-02-26 19:23               ` Shailabh Nagar
2004-02-26 19:46                 ` Mike Fedyk
2004-02-26 20:42                   ` Shailabh Nagar
2004-02-26 16:10           ` Timothy Miller
2004-02-26 19:47             ` Mike Fedyk
2004-02-26 22:51             ` Peter Williams
2004-02-27 10:06               ` Helge Hafting
2004-02-27 11:04                 ` Peter Williams
2004-02-26 16:08         ` Timothy Miller
2004-02-26 16:51           ` Rik van Riel
2004-02-26 20:15           ` Peter Williams
2004-02-27 14:46             ` Timothy Miller
2004-02-28  5:00               ` Peter Williams
2004-03-04 21:18         ` Robert White
2004-03-04 23:15           ` Peter Williams
2004-02-26  2:48       ` Nuno Silva
2004-02-26  4:25         ` Peter Williams
2004-02-26 15:57           ` Rik van Riel
2004-02-26 19:28             ` Shailabh Nagar
2004-02-26 16:12         ` Timothy Miller
2004-02-25 22:51 ` Pavel Machek
2004-02-26  3:14   ` John Lee
2004-02-25 23:45 ` Rik van Riel
2004-02-26  7:18 ` John Lee
     [not found] <fa.f12rt3d.c0s9rt@ifi.uio.no>
     [not found] ` <fa.ishajoq.q5g90m@ifi.uio.no>
2004-02-25 23:33   ` Junio C Hamano
2004-02-26  8:15     ` Catalin BOIE
  -- strict thread matches above, loose matches on Subject: below --
2004-02-26  3:30 Albert Cahalan
2004-02-26  6:19 ` Peter Williams
2004-02-26 17:57   ` Albert Cahalan
2004-02-26 23:24     ` Peter Williams
2004-03-01  3:47       ` Peter Williams
     [not found] <1tfy0-7ly-29@gated-at.bofh.it>
     [not found] ` <1thzJ-A5-13@gated-at.bofh.it>
     [not found]   ` <1tjrN-2m5-1@gated-at.bofh.it>
     [not found]     ` <1tjLa-2Ab-9@gated-at.bofh.it>
     [not found]       ` <1tlaf-3OY-11@gated-at.bofh.it>
     [not found]         ` <1tljX-3Wf-5@gated-at.bofh.it>
     [not found]           ` <1tznd-CP-35@gated-at.bofh.it>
     [not found]             ` <1tzQe-10s-25@gated-at.bofh.it>
2004-02-26 20:14               ` Bill Davidsen
     [not found] <1t8wp-qF-11@gated-at.bofh.it>
     [not found] ` <1th6J-az-13@gated-at.bofh.it>
     [not found]   ` <403E2929.2080705@tmr.com>
2004-02-27  3:44     ` Rik van Riel
2004-02-28 21:27       ` Bill Davidsen
2004-02-28 23:55         ` Peter Williams
2004-03-04 21:08           ` Timothy Miller
     [not found] <fa.fi4j08o.17nchps@ifi.uio.no>
     [not found] ` <fa.ctat17m.8mqa3c@ifi.uio.no>
2004-02-29 11:58   ` Joachim B Haga
2004-02-29 20:39     ` Paul Jackson
2004-02-29 22:56     ` Peter Williams
     [not found] <894006121@toto.iv>
2004-03-01  0:00 ` Peter Chubb
2004-03-02  1:25   ` Peter Williams
     [not found] <fa.jgj0bdi.b3u6qk@ifi.uio.no>
2004-03-01  1:54 ` Andy Lutomirski
2004-03-01  2:54   ` Peter Williams
2004-03-01  3:46     ` Andy Lutomirski
2004-03-01  4:18       ` Peter Williams
2004-03-02 23:36   ` Peter Williams
     [not found] <fa.ftul5bl.nlk3pr@ifi.uio.no>
     [not found] ` <fa.cvc8vnj.ahebjd@ifi.uio.no>
2004-03-01  9:18   ` Joachim B Haga
2004-03-01 10:18     ` Paul Wagland
2004-03-01 19:11       ` Mike Fedyk
     [not found] <fa.fi4j08o.17nchps@ifi.uio.no.suse.lists.linux.kernel>
     [not found] ` <fa.ctat17m.8mqa3c@ifi.uio.no.suse.lists.linux.kernel>
     [not found]   ` <yydjishqw10p.fsf@galizur.uio.no.suse.lists.linux.kernel>
     [not found]     ` <40426E1C.8010806@aurema.com.suse.lists.linux.kernel>
2004-03-03  2:48       ` Andi Kleen
2004-03-03  3:45         ` Peter Williams
2004-03-03 10:13           ` Andi Kleen
2004-03-03 23:46             ` Peter Williams
2004-03-03 15:57           ` Andi Kleen
2004-03-04  0:41             ` Peter Williams
2004-03-05  3:55               ` Andi Kleen
     [not found] <1vuMd-5jx-5@gated-at.bofh.it>
     [not found] ` <1vuMd-5jx-7@gated-at.bofh.it>
     [not found]   ` <1vuMd-5jx-9@gated-at.bofh.it>
     [not found]     ` <1vuMd-5jx-11@gated-at.bofh.it>
     [not found]       ` <1vuMd-5jx-3@gated-at.bofh.it>
     [not found]         ` <1vvyx-6jy-13@gated-at.bofh.it>
     [not found]           ` <1vBE2-48V-21@gated-at.bofh.it>
2004-03-03 21:38             ` Bill Davidsen

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=403D3E47.4080501@techsource.com \
    --to=miller@techsource.com \
    --cc=johnl@aurema.com \
    --cc=linux-kernel@vger.kernel.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