public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Antonio Vargas <wind@cocodriloo.com>
To: William Lee Irwin III <wli@holomorphy.com>,
	Antonio Vargas <wind@cocodriloo.com>,
	linux-kernel@vger.kernel.org, Robert Love <rml@tech9.net>
Subject: Re: fairsched + O(1) process scheduler
Date: Wed, 2 Apr 2003 00:19:27 +0200	[thread overview]
Message-ID: <20030401221927.GA8904@wind.cocodriloo.com> (raw)
In-Reply-To: <20030401164126.GA993@holomorphy.com>

On Tue, Apr 01, 2003 at 08:41:26AM -0800, William Lee Irwin III wrote:
> On Tue, Apr 01, 2003 at 02:51:59PM +0200, Antonio Vargas wrote:
> +
> +	if(fairsched){
> +		/* special processing for per-user fair scheduler */
> +	}
> 
> I suspect something more needs to happen there. =)

 :) I haven't even compiled with this patch, I'm just trying
to get around my ideas and thus I posted so that:

a. We had an off-site backup

b. People with experience could shout out loud if they saw
   some big-time silliness.

> I'd recommend a different approach, i.e. stratifying the queue into a
> user top level and a task bottom level. The state is relatively well
> encapsulated so it shouldn't be that far out.
> 
> 
> -- wli

I suspect you mean the scheduler runqueues?

My initial idea runs as follows:

a. On each array switch, we add some fixed value
   to user->ticks. (HZ perhaps?)

b. When adding, we cap at some maximum value.
   (2*HZ perhaps?)

c. On each timer tick, we decrement current->user->ticks.

d. When decrementing, if it's below zero we just
   end this thread. (user has expired)

e. When switching threads, we take the first one that belongs
   to a non-expired user. I think this can be done by sending
   the user-expired threads to the expired array, just like
   when they expire themselves.

I'll try to code this tonight, so I'll post later on
if I'm lucky.

I think this needs much less complexity for a first version,
but I would try what you propose if I get intimate enough
with the scheduler.

Greets, Antonio.

  reply	other threads:[~2003-04-01 22:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-01 12:51 fairsched + O(1) process scheduler Antonio Vargas
2003-04-01 16:41 ` William Lee Irwin III
2003-04-01 22:19   ` Antonio Vargas [this message]
2003-04-02 12:46     ` Antonio Vargas
2003-04-02 16:35       ` William Lee Irwin III
2003-04-02 21:36         ` Antonio Vargas
2003-04-02 21:35           ` Robert Love
2003-04-02 22:07             ` Antonio Vargas
2003-04-02 22:10               ` Robert Love
2003-04-02 22:35                 ` Antonio Vargas
2003-04-03 17:15                 ` Corey Minyard
2003-04-03 18:17                   ` Robert Love
     [not found]     ` <200304021144.21924.frankeh@watson.ibm.com>
2003-04-03 12:53       ` Antonio Vargas
2003-04-03 19:22         ` William Lee Irwin III
2003-04-04 11:27           ` Antonio Vargas
2003-04-04 14:04             ` William Lee Irwin III
2003-04-04 20:12               ` Antonio Vargas
2003-04-04 20:40                 ` William Lee Irwin III
     [not found]             ` <200304041453.16630.frankeh@watson.ibm.com>
2003-04-04 21:36               ` Antonio Vargas
     [not found]                 ` <200304081456.34367.frankeh@watson.ibm.com>
2003-04-08 20:19                   ` Antonio Vargas
2003-04-01 18:33 ` Robert Love

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=20030401221927.GA8904@wind.cocodriloo.com \
    --to=wind@cocodriloo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rml@tech9.net \
    --cc=wli@holomorphy.com \
    /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