From: Lei Wen <leiwen@marvell.com>
To: Paul Turner <pjt@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@elte.hu>, <mingo@redhat.com>,
<leiwen@marvell.com>, <linux-kernel@vger.kernel.org>
Subject: [PATCH 3/8] sched: change update_rq_runnable_avg using h_nr_running
Date: Sun, 18 Aug 2013 16:25:17 +0800 [thread overview]
Message-ID: <1376814322-7320-4-git-send-email-leiwen@marvell.com> (raw)
In-Reply-To: <1376814322-7320-1-git-send-email-leiwen@marvell.com>
Since update_rq_runnable_avg is used only by cfs scheduler, it
should not consider the task beyond the cfs type.
If one cfs task is running with one rt task, the only cfs task
should be no aware of the existence of rt task, and behavior
like one cfs task occasionly throttled by some bandwidth control
mechanism. Thus its sleep time should not being taken into
runnable avg load calculation.
Signed-off-by: Lei Wen <leiwen@marvell.com>
---
kernel/sched/fair.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index e6b99b4..9869d4d 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2893,7 +2893,7 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)
}
if (!se) {
- update_rq_runnable_avg(rq, rq->nr_running);
+ update_rq_runnable_avg(rq, rq->cfs.h_nr_running);
inc_nr_running(rq);
}
hrtick_update(rq);
@@ -4142,7 +4142,7 @@ static void __update_blocked_averages_cpu(struct task_group *tg, int cpu)
list_del_leaf_cfs_rq(cfs_rq);
} else {
struct rq *rq = rq_of(cfs_rq);
- update_rq_runnable_avg(rq, rq->nr_running);
+ update_rq_runnable_avg(rq, rq->cfs.h_nr_running);
}
}
--
1.7.5.4
next prev parent reply other threads:[~2013-08-18 8:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-18 8:25 [PATCH 0/8] sched: fixes for the nr_running usage Lei Wen
2013-08-18 8:25 ` [PATCH 1/8] sched: change load balance number to h_nr_running of run queue Lei Wen
2013-08-18 8:25 ` [PATCH 2/8] sched: change cpu_avg_load_per_task using h_nr_running Lei Wen
2013-08-18 8:25 ` Lei Wen [this message]
2013-08-18 8:25 ` [PATCH 4/8] sched: change pick_next_task_fair to h_nr_running Lei Wen
2013-08-18 8:25 ` [PATCH 5/8] sched: change update_sg_lb_stats " Lei Wen
2013-08-18 8:25 ` [PATCH 6/8] sched: change find_busiest_queue " Lei Wen
2013-08-18 8:25 ` [PATCH 7/8] sched: change active_load_balance_cpu_stop to use h_nr_running Lei Wen
2013-08-18 8:25 ` [PATCH 8/8] sched: document the difference between nr_running and h_nr_running Lei Wen
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=1376814322-7320-4-git-send-email-leiwen@marvell.com \
--to=leiwen@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=pjt@google.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;
as well as URLs for NNTP newsgroup(s).