lkml.org 
[lkml]   [2015]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [Resend PATCH v8 0/4] sched: Rewrite runnable load and utilization average tracking
On Wed, Jun 17, 2015 at 09:06:17PM +0800, Boqun Feng wrote:
>
> > So the problem is:
> >
> > 1) The tasks in the workload have too small weight (only 79), because
> > they share a task group.
> >
> > 2) Probably some "high" weight task even runnable a small time
> > contribute "big" to cfs_rq's load_avg.
>
> Thank you for your analysis.
>
> Some updates:
>
> I created a task group /g and set /g/cpu.shares to 13312 (1024 * 13),
> and then ran `stress --cpu 12` and `dbench 1` simultaneously in that
> group. The situation is much better, only one CPU is not fully loaded,
> and its utilization rate stays around 85%.
>

Hi,

That is good. You can as well disable autogroup, or "nicer" the autogroup,
or exec the dbench from another shell, etc...

Thank you for the tests. This may not be intuitive, but actually the results
showcased that:

1) the patchset improves the task group share management, accomplishes what it is
said to be in terms of fair share, finally.

2) the seamlessly combined runnable + blocked load_avg improves the share
of the sometimes runnable sometimes blocked tasks by preserving the blocked
load in the avg, fairness is achieved as the dbench has the same weight as
the 12 stress tasks, and the dbench (buried in CPU hogging tasks) performance
is thus improved.

Peter?

In addition, to correct the util_avg odd value, the following patch should work.
Send it here before I send another version.

Thanks,
Yuyang

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index a8fd7b9..2b0907c 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -687,7 +687,7 @@ void init_entity_runnable_average(struct sched_entity *se)
sa->load_avg = scale_load_down(se->load.weight);
sa->load_sum = sa->load_avg * LOAD_AVG_MAX;
sa->util_avg = scale_load_down(SCHED_LOAD_SCALE);
- sa->util_sum = sa->util_avg * LOAD_AVG_MAX;
+ sa->util_sum = LOAD_AVG_MAX;
/* when this task enqueue'ed, it will contribute to its cfs_rq's load_avg */
}
#else

\
 
 \ /
  Last update: 2015-06-18 05:21    [W:0.081 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site