public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: Srivatsa Vaddagiri <vatsa@in.ibm.com>
Cc: Ting Yang <tingy@cs.umass.edu>, Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org
Subject: Re: [patch] CFS scheduler, -v8
Date: Wed, 2 May 2007 10:48:29 -0700	[thread overview]
Message-ID: <20070502174829.GX19966@holomorphy.com> (raw)
In-Reply-To: <20070502173634.GA11308@in.ibm.com>

On Tue, May 01, 2007 at 10:57:14PM -0400, Ting Yang wrote:
>>  "A Proportional Share REsource Allocation Algorithm for Real-Time, 
>> Time-Shared Systems", by Ion Stoica. You can find the paper here: 
>> http://citeseer.ist.psu.edu/37752.html

On Wed, May 02, 2007 at 11:06:34PM +0530, Srivatsa Vaddagiri wrote:
> Good paper ..thanks for the pointer.
> I briefly went thr' the paper and my impression is it expect each task
> to specify the length of each new request it initiates. Is that correct?
> If we have to apply EEVDF to SCHED_NORMAL task scheduling under CFS, how
> would we calculate that "length of each new request" (which is reqd
> before we calculate its virtual deadline)?

l_i and w_i are both functions of the priority. You essentially arrange
l_i to express QoS wrt. latency, and w_i to express QoS wrt. bandwidth.


On Tue, May 01, 2007 at 10:57:14PM -0400, Ting Yang wrote:
>>  EXAMPLE: assume the system runs at 1000 tick/second, i.e. 1ms a tick, 
>> and the granularity of pre-exemption for CFS is 5 virtual ticks (the 
>> current setting). If, at time t=0, we start 2 tasks: p1 and p2, both 
>> have nice value 0 (weight 1024), and rq->fair_clock is initialized to 0. 
>> Now we have: 
>>        p1->fair_key = p2->fair_key = rq->fair_clock = 0.
>> CFS breaks the tie arbitrarily, say it executes p1. After 1 system tick 
>> (1ms later) t=1, we have:
>>        rq->fair_clock = 1/2, p1->fair_key = 1,  p2->fair_key = 0.
>> Suppose, a new task p3 starts with nice value -10 at this moment, that 
>> is p3->fair_key=1/2. In this case, CFS will not schedule p3 for 
>> execution until the fair_keys of p1 and p2 go beyond 5+1/2 (which 
>> translates to about 10ms later in this setting), _regardless_ the 
>> priority (weight) of p3.

On Wed, May 02, 2007 at 11:06:34PM +0530, Srivatsa Vaddagiri wrote:
> There is also p->wait_runtime which is taken into account when
> calculating p->fair_key. So if p3 had waiting in runqueue for long
> before, it can get to run quicker than 10ms later.

Virtual time is time from the task's point of view, which it has spent
executing. ->wait_runtime is a device to subtract out time spent on the
runqueue but not running from what would otherwise be virtual time to
express lag, whether deliberately or coincidentally. ->wait_runtime
would not be useful for EEVDF AFAICT, though it may be interesting to
report.


-- wli

  reply	other threads:[~2007-05-02 17:48 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-01 21:22 [patch] CFS scheduler, -v8 Ingo Molnar
2007-05-02  2:57 ` Ting Yang
2007-05-02  5:10   ` Willy Tarreau
2007-05-02  5:30   ` William Lee Irwin III
2007-05-02 10:05   ` Bill Huey
2007-05-02 10:27   ` Ingo Molnar
2007-05-02 17:36   ` Srivatsa Vaddagiri
2007-05-02 17:48     ` William Lee Irwin III [this message]
2007-05-02 18:15       ` Ingo Molnar
2007-05-02 18:56         ` William Lee Irwin III
2007-05-02 19:12           ` Ingo Molnar
2007-05-02 19:42             ` William Lee Irwin III
2007-05-03  2:48       ` Ting Yang
2007-05-03  3:18       ` Ting Yang
2007-05-03 10:19         ` Bill Huey
2007-05-02 23:41     ` Ting Yang
2007-05-02 18:42   ` Li, Tong N
2007-05-02 19:10     ` William Lee Irwin III
2007-05-03  3:07     ` Ting Yang
2007-05-03  8:50   ` Ingo Molnar
2007-05-03 14:26     ` Srivatsa Vaddagiri
2007-05-03 15:19       ` Ting Yang
2007-05-03 15:02     ` Ting Yang
2007-05-02  6:37 ` Mike Galbraith
2007-05-02  6:45   ` Ingo Molnar
2007-05-02  8:03   ` Gene Heskett
2007-05-02  8:12     ` Mike Galbraith
2007-05-02  8:48       ` Gene Heskett
2007-05-02  8:13     ` Ingo Molnar
2007-05-02  8:51       ` Gene Heskett
2007-05-02  7:59 ` Mike Galbraith
2007-05-02  8:11   ` Gene Heskett
2007-05-02 10:40   ` Ingo Molnar
2007-05-02  9:08 ` Balbir Singh
2007-05-02 10:05   ` Ingo Molnar
2007-05-02 10:59     ` Balbir Singh
2007-05-02 11:17       ` Ingo Molnar
2007-05-05  8:31         ` Esben Nielsen
2007-05-05 17:44           ` Linus Torvalds
2007-05-06  8:29             ` Ingo Molnar
2007-05-06  8:36               ` Willy Tarreau
2007-05-06  8:52                 ` Ingo Molnar
2007-05-06 17:45               ` Linus Torvalds
2007-05-07 11:30                 ` Esben Nielsen
2007-05-07 15:55                   ` Ingo Molnar
2007-05-07 16:11                   ` Linus Torvalds
2007-05-08  0:35                   ` Peter Williams
2007-05-08  9:05                     ` Esben Nielsen
2007-05-09  0:01                       ` Peter Williams
2007-05-10 13:09                     ` Pavel Machek
2007-05-11 16:50                       ` Linus Torvalds
2007-05-11 19:18                         ` Pavel Machek
2007-05-11 19:37                           ` Willy Tarreau
2007-05-11 20:53                             ` Kevin Bowling
2007-05-07 11:09             ` Esben Nielsen
2007-05-07 16:28               ` Linus Torvalds
2007-05-07 18:39                 ` Johannes Stezenbach
2007-05-07 18:55                   ` Linus Torvalds
2007-05-08  7:34                   ` Esben Nielsen
2007-05-08  9:54                     ` Johannes Stezenbach
2007-05-08 10:27                       ` Esben Nielsen
2007-05-08  5:36                 ` Matt Mackall
2007-05-02 12:58 ` Mark Lord
2007-05-02 12:58 ` Vegard Nossum
2007-05-02 16:41   ` Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2007-05-03  8:20 Zoltan Boszormenyi
2007-05-03 13:02 ` Ingo Molnar
2007-05-03 13:29   ` Damien Wyart
2007-05-03 14:53     ` Srivatsa Vaddagiri
2007-05-03 15:53       ` William Lee Irwin III
2007-05-03 18:44         ` Li, Tong N
2007-05-03 19:52           ` William Lee Irwin III
2007-05-07 14:22         ` Srivatsa Vaddagiri
2007-05-07 20:54           ` Li, Tong N
2007-05-07  0:04     ` 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=20070502174829.GX19966@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tingy@cs.umass.edu \
    --cc=vatsa@in.ibm.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