[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b97d63e4-0ff7-720b-30d7-ad27611e9a8c@gmail.com>
Date: Wed, 10 May 2023 15:05:01 +0700
From: Bagas Sanjaya <bagasdotme@...il.com>
To: Vineeth Pillai <vineeth@...byteword.org>,
luca.abeni@...tannapisa.it, Juri Lelli <juri.lelli@...hat.com>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Steven Rostedt <rostedt@...dmis.org>,
Joel Fernandes <joel@...lfernandes.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
Valentin Schneider <vschneid@...hat.com>
Cc: Jonathan Corbet <corbet@....net>, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org
Subject: Re: [PATCH 2/2] Documentation: sched/deadline: Update GRUB
description
On 5/8/23 23:08, Vineeth Pillai wrote:
> diff --git a/Documentation/scheduler/sched-deadline.rst b/Documentation/scheduler/sched-deadline.rst
> index 9d9be52f221a..0c73f07f712d 100644
> --- a/Documentation/scheduler/sched-deadline.rst
> +++ b/Documentation/scheduler/sched-deadline.rst
> @@ -195,11 +195,15 @@ Deadline Task Scheduling
> its utilization is added to the active utilization of the runqueue where
> it has been enqueued.
>
> - For each runqueue, the algorithm GRUB keeps track of two different bandwidths:
> + For each runqueue, the algorithm GRUB keeps track of three different bandwidths:
>
> - Active bandwidth (running_bw): this is the sum of the bandwidths of all
> tasks in active state (i.e., ActiveContending or ActiveNonContending);
>
> + - Active bandwidth of SCHED_FLAG_RECLAIM tasks(reclaim_bw): this is the sum of
> + bandwidth of all tasks in active state which participates in GRUB. This is a
> + subset of running_bw and is needed for reclaimable bandwidth calculation.
> +
> - Total bandwidth (this_bw): this is the sum of all tasks "belonging" to the
> runqueue, including the tasks in Inactive state.
>
> @@ -209,12 +213,12 @@ Deadline Task Scheduling
> to
>
> dq = -max{ Ui / Umax, (1 - Uinact - Uextra) } dt
> + dq = -(Ureclaim / (Uextra + Uinact + Ureclaim)) dt
>
> where:
>
> - - Ui is the bandwidth of task Ti;
> - - Umax is the maximum reclaimable utilization (subjected to RT throttling
> - limits);
> + - Ureclaim is the (per runqueue) bandwidth of all SCHED_FLAG_RECLAIM tasks
> + in active state;
> - Uinact is the (per runqueue) inactive utilization, computed as
> (this_bq - running_bw);
> - Uextra is the (per runqueue) extra reclaimable utilization
> @@ -222,7 +226,8 @@ Deadline Task Scheduling
>
>
> Let's now see a trivial example of two deadline tasks with runtime equal
> - to 4 and period equal to 8 (i.e., bandwidth equal to 0.5)::
> + to 4 and period equal to 8 (i.e., bandwidth equal to 0.5). Tasks are
> + allowed to use the whole cpu(Umax = 1)::
>
> A Task T1
> |
> @@ -244,7 +249,7 @@ Deadline Task Scheduling
> 0 1 2 3 4 5 6 7 8
>
>
> - A running_bw
> + A reclaim_bw
> |
> 1 ----------------- ------
> | | |
> @@ -272,7 +277,7 @@ Deadline Task Scheduling
>
> This is the 0-lag time for Task T1. Since it didn't woken up in the
> meantime, it enters the Inactive state. Its bandwidth is removed from
> - running_bw.
> + running_bw and reclaim_bw.
> Task T2 continues its execution. However, its runtime is now decreased as
> dq = - 0.5 dt because Uinact = 0.5.
> Task T2 therefore reclaims the bandwidth unused by Task T1.
> @@ -280,7 +285,7 @@ Deadline Task Scheduling
> - Time t = 8:
>
> Task T1 wakes up. It enters the ActiveContending state again, and the
> - running_bw is incremented.
> + running_bw and reclaim_bw are incremented.
>
>
> 2.3 Energy-aware scheduling
LGTM, thanks!
Reviewed-by: Bagas Sanjaya <bagasdotme@...il.com>
--
An old man doll... just what I always wanted! - Clara
Powered by blists - more mailing lists