Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752011Ab3GBMVE (ORCPT ); Tue, 2 Jul 2013 08:21:04 -0400 Received: from na3sys009aog105.obsmtp.com ([74.125.149.75]:47958 "EHLO na3sys009aog105.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752338Ab3GBMVC (ORCPT ); Tue, 2 Jul 2013 08:21:02 -0400 From: Lei Wen To: Paul Turner , Alex Shi , Peter Zijlstra , Ingo Molnar , , Kamalesh Babulal , Lei Wen , Subject: [V3 2/2] sched: update cfs_rq weight earlier in enqueue_entity Date: Tue, 2 Jul 2013 20:15:06 +0800 Message-ID: <1372767306-9478-3-git-send-email-leiwen@marvell.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1372767306-9478-1-git-send-email-leiwen@marvell.com> References: <1372682002-15373-1-git-send-email-leiwen@marvell.com> <1372767306-9478-1-git-send-email-leiwen@marvell.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1309 Lines: 37 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 Cc: Alex Shi Cc: Paul Turner --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/