From: Lei Wen <leiwen@marvell.com>
To: Paul Turner <pjt@google.com>, Alex Shi <alex.shi@intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@elte.hu>, <mingo@redhat.com>,
Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>,
Lei Wen <leiwen@marvell.com>, <linux-kernel@vger.kernel.org>
Subject: [V2 2/2] sched: update cfs_rq weight earlier in enqueue_entity
Date: Mon, 1 Jul 2013 20:33:22 +0800 [thread overview]
Message-ID: <1372682002-15373-3-git-send-email-leiwen@marvell.com> (raw)
In-Reply-To: <1372682002-15373-1-git-send-email-leiwen@marvell.com>
Since we are going to calculate cfs_rq's average ratio by
runnable_load_avg/load.weight, if not increase the load.weight prior to
enqueue_entity_load_avg, it may lead to one cfs_rq's avg ratio higher
than 100%.
Adjust the sequence, so that all ratio is kept below 100%.
Signed-off-by: Lei Wen <leiwen@marvell.com>
---
kernel/sched/fair.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 07bd74c..d1eee84 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1788,8 +1788,8 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
* Update run-time statistics of the 'current'.
*/
update_curr(cfs_rq);
- enqueue_entity_load_avg(cfs_rq, se, flags & ENQUEUE_WAKEUP);
account_entity_enqueue(cfs_rq, se);
+ enqueue_entity_load_avg(cfs_rq, se, flags & ENQUEUE_WAKEUP);
update_cfs_shares(cfs_rq);
if (flags & ENQUEUE_WAKEUP) {
--
1.7.10.4
next prev parent reply other threads:[~2013-07-01 12:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-01 7:10 [PATCH 0/2] sched: add trace event for per-entity tracking Lei Wen
2013-07-01 7:10 ` [PATCH 1/2] sched: add trace events for task and rq usage tracking Lei Wen
2013-07-01 9:43 ` Kamalesh Babulal
2013-07-01 12:18 ` Lei Wen
2013-07-01 7:10 ` [PATCH 2/2] sched: update cfs_rq weight earlier in enqueue_entity Lei Wen
2013-07-01 8:06 ` [PATCH 0/2] sched: add trace event for per-entity tracking Alex Shi
2013-07-01 8:49 ` Lei Wen
2013-07-01 12:33 ` [PATCH V2 " Lei Wen
2013-07-01 12:33 ` [V2 1/2] sched: add trace events for task and rq usage tracking Lei Wen
2013-07-01 12:44 ` Peter Zijlstra
2013-07-01 13:25 ` Lei Wen
2013-07-01 12:33 ` Lei Wen [this message]
2013-07-01 14:07 ` [V2 2/2] sched: update cfs_rq weight earlier in enqueue_entity Paul Turner
2013-07-02 2:52 ` Lei Wen
2013-07-02 12:15 ` [PATCH V3 0/2] sched: add trace event for per-entity tracking Lei Wen
2013-07-02 12:15 ` [V3 1/2] sched: add trace events for task and rq usage tracking Lei Wen
2013-07-03 12:46 ` Lei Wen
2013-07-02 12:15 ` [V3 2/2] sched: update cfs_rq weight earlier in enqueue_entity 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=1372682002-15373-3-git-send-email-leiwen@marvell.com \
--to=leiwen@marvell.com \
--cc=alex.shi@intel.com \
--cc=kamalesh@linux.vnet.ibm.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
Powered by JetHome