mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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: [V3 2/2] sched: update cfs_rq weight earlier in enqueue_entity
Date: Tue, 2 Jul 2013 20:15:06 +0800	[thread overview]
Message-ID: <1372767306-9478-3-git-send-email-leiwen@marvell.com> (raw)
In-Reply-To: <1372767306-9478-1-git-send-email-leiwen@marvell.com>

We are expecting runnable_load_avg is less than load.weight, 
So that runnable_load_avg/load.weight could well present out the system's
load distribution.

if not increase the load.weight prior to enqueue_entity_load_avg, it may
lead to runnable_load_avg is higher than load.weight, so that people
may get confused.

Signed-off-by: Lei Wen <leiwen@marvell.com>
Cc: Alex Shi <alex.shi@intel.com>
Cc: Paul Turner <pjt@google.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 2290469..53224d1 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1778,8 +1778,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


      parent reply	other threads:[~2013-07-02 12:21 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   ` [V2 2/2] sched: update cfs_rq weight earlier in enqueue_entity Lei Wen
2013-07-01 14:07     ` 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     ` Lei Wen [this message]

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=1372767306-9478-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