lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 2 Jul 2013 20:15:06 +0800
From:	Lei Wen <leiwen@...vell.com>
To:	Paul Turner <pjt@...gle.com>, Alex Shi <alex.shi@...el.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...e.hu>, <mingo@...hat.com>,
	Kamalesh Babulal <kamalesh@...ux.vnet.ibm.com>,
	Lei Wen <leiwen@...vell.com>, <linux-kernel@...r.kernel.org>
Subject: [V3 2/2] sched: update cfs_rq weight earlier in enqueue_entity

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@...vell.com>
Cc: Alex Shi <alex.shi@...el.com>
Cc: Paul Turner <pjt@...gle.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ