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>] [day] [month] [year] [list]
Message-ID: <50B33BEF.4050304@linux.vnet.ibm.com>
Date:	Mon, 26 Nov 2012 17:52:47 +0800
From:	Michael Wang <wangyun@...ux.vnet.ibm.com>
To:	LKML <linux-kernel@...r.kernel.org>
CC:	Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...e.hu>,
	Paul Turner <pjt@...gle.com>, Mike Galbraith <efault@....de>
Subject: [RFC] could we remove some work to reduce the overhead of cgroup?

Hi, Folks

I'm trying to find the place where we could reduce the overhead
of cgroup, especially when there is only root_task_group
(thanks for Peter's suggestion).

I found that no place is using the load info of root_task_group
and root cfs_rq currently, could we do some thing like below
to reduce the overhead?



diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 2cebc81..67cf709 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -1515,6 +1515,13 @@ static void update_cfs_rq_blocked_load(struct cfs_rq *cfs_rq, int force_update)
        u64 now = cfs_rq_clock_task(cfs_rq) >> 20;
        u64 decays;
 
+       /*
+        * do not work on root cfs_rq and task group, since no one need their
+        * load info.
+        */
+       if (cfs_rq->tg && cfs_rq->tg == &root_task_group)
+               return;
+
        decays = now - cfs_rq->last_decay;
        if (!decays && !force_update)
                return;



There are other places we could save works if we stop calculate
the load info of root_task_group and root cfs_rq, like the update
work of blocked_load_avg, runnable_load_avg and tg_load_contrib.

Those info are used to calculate the load of cfs_rq, so we could
use that load when we calculate the parent cfs_rq's load sum, but
since root task group has no parent, those info should be useless.

Please let me know if you think this is wrong or you have better
idea on where we can reduce the overhead of cgroup.


Regards,
Michael Wang

--
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