Thread (79 messages) 79 messages, 8 authors, 2014-09-18

[PATCH v5 08/12] sched: move cfs task on a CPU with higher capacity

From: vincent.guittot@linaro.org (Vincent Guittot)
Date: 2014-09-03 12:49:56
Also in: lkml

On 3 September 2014 14:26, Preeti U Murthy [off-list ref] wrote:
On 09/03/2014 05:14 PM, Vincent Guittot wrote:
quoted
On 3 September 2014 11:11, Preeti U Murthy [off-list ref] wrote:
quoted
On 09/01/2014 02:15 PM, Vincent Guittot wrote:
[snip]
quoted
quoted
Ok I understand your explanation above. But I was wondering if you would
need to add this check around rq->cfs.h_nr_running >= 1 in the above two
cases as well.
yes you're right for the test if (rq->nr_running >= 2).

It's not so straight forward for nr_busy_cpus which reflects how many
CPUs have not stopped their tick. The scheduler assumes that the
latter are busy with cfs tasks
quoted
I have actually raised this concern over whether we should be using
rq->nr_running or cfs_rq->nr_running while we do load balancing in reply
to your patch3. While all our load measurements are about the cfs_rq
I have just replied to your comments on patch 3. Sorry for the delay
quoted
load, we use rq->nr_running, which may include tasks from other sched
classes as well. We divide them to get average load per task during load
balancing which is wrong, isn't it? Similarly during nohz_kick_needed(),
we trigger load balancing based on rq->nr_running again.

In this patch too, even if you know that the cpu is being dominated by
tasks that do not belong to cfs class, you would be triggering a futile
load balance if there are no fair tasks to move.
This patch adds one additional condition that is based on
rq->cfs.h_nr_running so it should not trigger any futile load balance.
Then, I have also take advantage of this patch to clean up
nohz_kick_needed as proposed by Peter but the conditions are the same
than previously (except the one with rq->cfs.h_nr_running)

I can prepare another patchset that will solve the concerns that you
raised for nohz_kick_needed and in patch 3 but i would prefer not
include them in this patchset which is large enough and which subject
is a bit different.
Does it seem ok for you ?
Sure Vincent, thanks! I have in fact sent out a mail raising my concern
over rq->nr_running. If others agree on the issue to be existing, maybe
we can work on this next patchset that can clean this up in all places
necessary and not just in nohz_kick_needed().
Ok, let continue this discussion on the other thread

Regards,
Vincent
Regards
Preeti U Murthy
quoted
Regards,
Vincent
quoted
Regards
Preeti U Murthy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help