Re: [patch] CFS (Completely Fair Scheduler), v2

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Peter Williams
Date: Tuesday, April 17, 2007 - 5:06 pm

Willy Tarreau wrote:

One way of handling forked tasks is to give them a high priority but a 
small chunk (i.e. give them a relatively short time to do some work and 
surrender the CPU voluntarily before you boot them off).  If you choose 
the size of this reduced chunk well the vast majority of tasks will 
never be booted off and will do a small bit of work and either exit or 
sleep and will suffer no penalty as a result of this mechanism.  But it 
gives you a chance to move any newly forked process that turns out to be 
a CPU hog to a lower priority before it gets its next chunk of CPU at 
which time it can revert to getting normal size chunks as pre-emption 
will stop it hogging the CPU from then on.

I've trialled this mechanism in some of my schedulers and it works well.

I found that 10 milliseconds was a good value for the initial chunk of 
CPU for a newly forked process.

Peter
-- 
Peter Williams                                   pwil3058@bigpond.net.au

"Learning, n. The kind of ignorance distinguishing the studious."
  -- Ambrose Bierce
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch] CFS (Completely Fair Scheduler), v2, Ingo Molnar, (Mon Apr 16, 3:07 pm)
Re: [patch] CFS (Completely Fair Scheduler), v2, S.Çağlar, (Mon Apr 16, 3:12 pm)
Re: [patch] CFS (Completely Fair Scheduler), v2, Peter Williams, (Mon Apr 16, 9:06 pm)
Re: [patch] CFS (Completely Fair Scheduler), v2, Gene Heskett, (Mon Apr 16, 9:53 pm)
Re: [patch] CFS (Completely Fair Scheduler), v2, Willy Tarreau, (Mon Apr 16, 10:25 pm)
Re: [patch] CFS (Completely Fair Scheduler), v2, Gene Heskett, (Mon Apr 16, 10:51 pm)
Re: [patch] CFS (Completely Fair Scheduler), v2, Mike Galbraith, (Mon Apr 16, 10:51 pm)
Re: [patch] CFS (Completely Fair Scheduler), v2, Ingo Molnar, (Mon Apr 16, 11:18 pm)
Re: [patch] CFS (Completely Fair Scheduler), v2, Ingo Molnar, (Mon Apr 16, 11:27 pm)
Re: [patch] CFS (Completely Fair Scheduler), v2, Peter Williams, (Mon Apr 16, 11:46 pm)
Re: [patch] CFS (Completely Fair Scheduler), v2, Ingo Molnar, (Mon Apr 16, 11:49 pm)
Re: [patch] CFS (Completely Fair Scheduler), v2, Ingo Molnar, (Tue Apr 17, 12:01 am)
Re: [patch] CFS (Completely Fair Scheduler), v2, Paolo Ornati, (Tue Apr 17, 12:18 am)
Re: [patch] CFS (Completely Fair Scheduler), v2, Davide Libenzi, (Tue Apr 17, 12:31 am)
Re: [patch] CFS (Completely Fair Scheduler), v2, Ingo Molnar, (Tue Apr 17, 12:39 am)
Re: [patch] CFS (Completely Fair Scheduler), v2, William Lee Irwin III, (Tue Apr 17, 12:51 am)
Re: [patch] CFS (Completely Fair Scheduler), v2, Davide Libenzi, (Tue Apr 17, 1:03 am)
Re: [patch] CFS (Completely Fair Scheduler), v2, Ingo Molnar, (Tue Apr 17, 1:16 am)
Re: [patch] CFS (Completely Fair Scheduler), v2, Nick Piggin, (Tue Apr 17, 1:18 am)
Re: [patch] CFS (Completely Fair Scheduler), v2, Ingo Molnar, (Tue Apr 17, 1:20 am)
Re: [patch] CFS (Completely Fair Scheduler), v2, Ingo Molnar, (Tue Apr 17, 1:26 am)
Re: [patch] CFS (Completely Fair Scheduler), v2, Peter Williams, (Tue Apr 17, 1:30 am)
Re: [patch] CFS (Completely Fair Scheduler), v2, Nick Piggin, (Tue Apr 17, 1:41 am)
Re: [patch] CFS (Completely Fair Scheduler), v2, Ingo Molnar, (Tue Apr 17, 1:52 am)
Re: [patch] CFS (Completely Fair Scheduler), v2, Ingo Molnar, (Tue Apr 17, 1:57 am)
Re: [patch] CFS (Completely Fair Scheduler), v2, Ingo Molnar, (Tue Apr 17, 1:59 am)
Re: [patch] CFS (Completely Fair Scheduler), v2, Ingo Molnar, (Tue Apr 17, 2:53 am)
Re: [patch] CFS (Completely Fair Scheduler), v2, Peter Williams, (Tue Apr 17, 7:05 am)
Re: [patch] CFS (Completely Fair Scheduler), v2, S.Çağlar, (Tue Apr 17, 7:45 am)
Re: [patch] CFS (Completely Fair Scheduler), v2, Gabriel C, (Tue Apr 17, 8:48 am)
Re: [patch] CFS (Completely Fair Scheduler), v2, Ingo Molnar, (Tue Apr 17, 9:01 am)
Re: [patch] CFS (Completely Fair Scheduler), v2, Gene Heskett, (Tue Apr 17, 9:12 am)
Re: [patch] CFS (Completely Fair Scheduler), v2, Gene Heskett, (Tue Apr 17, 10:15 am)
Re: [patch] CFS (Completely Fair Scheduler), v2, Gene Heskett, (Tue Apr 17, 10:18 am)
Re: [patch] CFS (Completely Fair Scheduler), v2, Gene Heskett, (Tue Apr 17, 10:22 am)
Re: [patch] CFS (Completely Fair Scheduler), v2, Peter Williams, (Tue Apr 17, 5:06 pm)
Re: [patch] CFS (Completely Fair Scheduler), v2, Peter Williams, (Wed Apr 18, 12:15 pm)