[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1347380774-9546-9-git-send-email-wagi@monom.org>
Date: Tue, 11 Sep 2012 18:26:14 +0200
From: Daniel Wagner <wagi@...om.org>
To: netdev@...r.kernel.org, cgroups@...r.kernel.org
Cc: Daniel Wagner <daniel.wagner@...-carit.de>,
Gao feng <gaofeng@...fujitsu.com>,
Jamal Hadi Salim <jhs@...atatu.com>,
John Fastabend <john.r.fastabend@...el.com>,
Li Zefan <lizefan@...wei.com>,
Neil Horman <nhorman@...driver.com>, Tejun Heo <tj@...nel.org>
Subject: [PATCH v3 8/8] cgroup: Define CGROUP_SUBSYS_COUNT according the configuration
From: Daniel Wagner <daniel.wagner@...-carit.de>
Since we know exactly how many subsystems exists at compile time we are
able to define CGROUP_SUBSYS_COUNT correctly. CGROUP_SUBSYS_COUNT will
be at max 12 (all controllers enabled). Depending on the architecture
we safe either 32 - 12 pointers (80 bytes) or 64 - 12 pointers (416
bytes) per cgroup.
With this change we can also remove the temporary placeholder to avoid
compilation errors.
Signed-off-by: Daniel Wagner <daniel.wagner@...-carit.de>
Cc: Gao feng <gaofeng@...fujitsu.com>
Cc: Jamal Hadi Salim <jhs@...atatu.com>
Cc: John Fastabend <john.r.fastabend@...el.com>
Cc: Li Zefan <lizefan@...wei.com>
Cc: Neil Horman <nhorman@...driver.com>
Cc: Tejun Heo <tj@...nel.org>
Cc: netdev@...r.kernel.org
Cc: cgroups@...r.kernel.org
---
include/linux/cgroup.h | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 798c532..5bb73a5 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -48,16 +48,10 @@ extern const struct file_operations proc_cgroup_operations;
#define IS_SUBSYS_ENABLED(option) IS_ENABLED(option)
enum cgroup_subsys_id {
#include <linux/cgroup_subsys.h>
- __CGROUP_TEMPORARY_PLACEHOLDER
+ CGROUP_SUBSYS_COUNT,
};
#undef IS_SUBSYS_ENABLED
#undef SUBSYS
-/*
- * This define indicates the maximum number of subsystems that can be loaded
- * at once. We limit to this many since cgroupfs_root has subsys_bits to keep
- * track of all of them.
- */
-#define CGROUP_SUBSYS_COUNT (BITS_PER_BYTE*sizeof(unsigned long))
/* Per-subsystem/per-cgroup state maintained by the system. */
struct cgroup_subsys_state {
--
1.7.12.315.g682ce8b
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists