OpenVZ Forum - RDF feed
type: channel
items: [PATCH 0/7] Containers (V8): Generic Process Containers
items: [PATCH 1/7] Containers (V8): Generic container system abstracted from cpusets code
items: [PATCH 2/7] Containers (V8): Cpusets hooked into containers
items: [PATCH 3/7] Containers (V8): Add generic multi-subsystem API to containers
items: [PATCH 4/7] Containers (V8): Simple CPU accounting container subsystem
items: [PATCH 5/7] Containers (V8): Resource Groups over generic containers
items: [PATCH 6/7] Containers (V8): BeanCounters over generic process containers
items: [PATCH 7/7] Containers (V8): Container interface to nsproxy subsystem
items: Re: [PATCH 6/7] Containers (V8): BeanCounters over generic process containers
items: Re: [PATCH 4/7] Containers (V8): Simple CPU accounting container subsystem
items: Re: [PATCH 2/7] Containers (V8): Cpusets hooked into containers
items: Re: [PATCH 0/7] Containers (V8): Generic Process Containers
items: Re: [ckrm-tech] [PATCH 0/7] Containers (V8): Generic Process Containers

[PATCH 0/7] Containers (V8): Generic Process Containers
type: item
description: -- This is an update to my multi-hierarchy multi-subsystem generic process containers patch. Changes since V7 (12th Feb) include: - Removed the config-time choice of the number of supported hierarchies - this is now completely dynamic; new hierarchies are allocated on demand, and freed when no longer in use. - Subsystems are now registered at compile-time in linux/container_subsys.h. This allows for faster access to subsystem state since the id is a compile-time constant, so there's only a single extra pointer dereference compared to having a pointer directly in the task_struct. It also avoids wasting space with unused subsystem pointers. - Removed the container pointers from container_group - this results in a structure very similar to Srivatsa Vaddagiri's rcfs approach. (RCFS uses the nsproxy object rather than the container_group object; merging container_group and nsproxy would be pretty straightforward if desired). - Removed callback_mutex from container subsystem to be purely back in the cpuset subsystem. Renamed manage_mutex to container_mutex. - Condensed post_attach_task() into attach_task() now that callback_mutex is purely within cpuset.c - Simplified the container_subsys_state reference counting - stricter rules on liveness make adding reference counts cheaper. Still TODO: - decide whether "Containers" is an acceptable name for the system given its usage by some other development groups, or whether something else (ProcessSets? ResourceGroups?) would be better - decide whether merging container_group and nsproxy is desirable - add a hash-table based lookup for container_group objects. - use seq_file properly in container tasks files (and also in cpuset_attach_task) to avoid having to allocate a big array for all the container's task pointers. - add back support for the "release agent" functionality - lots more testing - define standards for container file names Generic Process Containers -------------------------- There have recently been various proposal…
creator: Paul Menage
date: 2007-04-06T23:32:21-00:00

[PATCH 1/7] Containers (V8): Generic container system abstracted from cpusets code
type: item
description: This patch creates a generic process container system based on (and parallel top) the cpusets code. At a coarse level it was created by copying kernel/cpuset.c, doing s/cpuset/container/g, and stripping out any code that was cpuset-specific rather than applicable to any process container subsystem. Signed-off-by: Paul Menage <menage@google.com> --- Documentation/containers.txt | 229 +++++++ fs/proc/base.c | 7 include/linux/container.h | 96 +++ include/linux/sched.h | 5 init/Kconfig | 9 init/main.c | 3 kernel/Makefile | 1 kernel/container.c | 1260 +++++++++++++++++++++++++++++++++++++++++++ kernel/exit.c | 2 kernel/fork.c | 3 10 files changed, 1614 insertions(+), 1 deletion(-) Index: container-2.6.20-new/fs/proc/base.c ============================================================ ======= --- container-2.6.20-new.orig/fs/proc/base.c +++ container-2.6.20-new/fs/proc/base.c @@ -68,6 +68,7 @@ #include <linux/security.h> #include <linux/ptrace.h> #include <linux/seccomp.h> +#include <linux/container.h> #include <linux/cpuset.h> #include <linux/audit.h> #include <linux/poll.h> @@ -1870,6 +1871,9 @@ static struct pid_entry tgid_base_stuff[ #ifdef CONFIG_CPUSETS REG("cpuset", S_IRUGO, cpuset), #endif +#ifdef CONFIG_CONTAINERS + REG("container", S_IRUGO, container), +#endif INF("oom_score", S_IRUGO, oom_score), REG("oom_adj", S_IRUGO|S_IWUSR, oom_adjust), #ifdef CONFIG_AUDITSYSCALL @@ -2151,6 +2155,9 @@ static struct pid_entry tid_base_stuff[] #ifdef CONFIG_CPUSETS REG("cpuset", S_IRUGO, cpuset), #endif +#ifdef CONFIG_CONTAINERS + REG("container", S_IRUGO, container), +#endif INF("oom_score", S_IRUGO, oom_score), REG("oom_adj", S_IRUGO|S_IWUSR, oom_adjust), #ifdef CONFIG_AUDITSYSCALL Index: container-2.6.20-new/include/linux/container.h ============================================================ ======= --- /dev/null +++ container-2.6.20-new/include/linux/container.h @@ -0,0 +1,96 @@ +#ifndef _LINUX_CONTAINER_H +#define _LINUX_CONTAINER_H +/* + * container interface + * + * C…
creator: Paul Menage
date: 2007-04-06T23:32:22-00:00

[PATCH 2/7] Containers (V8): Cpusets hooked into containers
type: item
description: This patch removes the process grouping code from the cpusets code, instead hooking it into the generic container system. This temporarily adds cpuset-specific code in kernel/container.c, which is removed by the next patch in the series. Signed-off-by: Paul Menage <menage@google.com> --- Documentation/cpusets.txt | 81 +-- fs/proc/base.c | 4 fs/super.c | 5 include/linux/container.h | 10 include/linux/cpuset.h | 16 include/linux/fs.h | 2 include/linux/mempolicy.h | 2 include/linux/sched.h | 4 init/Kconfig | 14 kernel/container.c | 117 ++++ kernel/cpuset.c | 1100 +++++----------------------------------------- kernel/exit.c | 2 kernel/fork.c | 7 13 files changed, 286 insertions(+), 1078 deletions(-) Index: container-2.6.20-new/include/linux/container.h ============================================================ ======= --- container-2.6.20-new.orig/include/linux/container.h +++ container-2.6.20-new/include/linux/container.h @@ -27,9 +27,6 @@ extern struct file_operations proc_conta extern void container_lock(void); extern void container_unlock(void); -extern void container_manage_lock(void); -extern void container_manage_unlock(void); - struct container { unsigned long flags; /* "unsigned long" so bitops work */ @@ -47,6 +44,10 @@ struct container { struct container *parent; /* my parent */ struct dentry *dentry; /* container fs entry */ + +#ifdef CONFIG_CPUSETS + struct cpuset *cpuset; +#endif }; /* struct cftype: @@ -79,6 +80,9 @@ struct cftype { int container_add_file(struct container *cont, const struct cftype *cft); int container_is_removed(const struct container *cont); +void container_set_release_agent_path(const char *path); + +int container_path(const struct container *cont, char *buf, int buflen); #else /* !CONFIG_CONTAINERS */ Index: container-2.6.20-new/include/linux/cpuset.h ============================================================ ======= --- container-2.6.20-new.orig/include/linux/cpuset.h +++ container-2.6.20-new/include/linux/cpuset.h @@ -11,16 +11,…
creator: Paul Menage
date: 2007-04-06T23:32:23-00:00

[PATCH 3/7] Containers (V8): Add generic multi-subsystem API to containers
type: item
description: This patch removes all cpuset-specific knowlege from the container system, replacing it with a generic API that can be used by multiple subsystems. Cpusets is adapted to be a container subsystem. Signed-off-by: Paul Menage <menage@google.com> --- Documentation/containers.txt | 415 +++++++++-- Documentation/cpusets.txt | 20 include/linux/container.h | 156 +++- include/linux/container_subsys.h | 14 include/linux/cpuset.h | 14 include/linux/mempolicy.h | 12 include/linux/sched.h | 4 kernel/container.c | 1465 ++++++++++++++++++++++++++++----------- kernel/cpuset.c | 161 ++-- kernel/exit.c | 2 kernel/fork.c | 9 mm/mempolicy.c | 2 12 files changed, 1712 insertions(+), 562 deletions(-) Index: container-2.6.20-new/include/linux/container.h =================================================================== --- container-2.6.20-new.orig/include/linux/container.h +++ container-2.6.20-new/include/linux/container.h @@ -9,33 +9,96 @@ */ #include <linux/sched.h> +#include <linux/kref.h> #include <linux/cpumask.h> #include <linux/nodemask.h> #ifdef CONFIG_CONTAINERS -extern int number_of_containers; /* How many containers are defined in system? */ +#define SUBSYS(_x) _x ## _subsys_id, +enum container_subsys_id { +#include <linux/container_subsys.h> + CONTAINER_SUBSYS_COUNT +}; +#undef SUBSYS extern int container_init_early(void); extern int container_init(void); extern void container_init_smp(void); extern void container_fork(struct task_struct *p); -extern void container_exit(struct task_struct *p); +extern void container_fork_callbacks(struct task_struct *p); +extern void container_exit(struct task_struct *p, int run_callbacks); extern struct file_operations proc_container_operations; extern void container_lock(void); extern void container_unlock(void); +struct containerfs_root; + +/* Per-subsystem/per-container state maintained by the system. */ +struct container_subsys_state { + /* The container that this subsystem is attached to. Useful + * for subsystems that want to know ab…
creator: Paul Menage
date: 2007-04-06T23:32:24-00:00

[PATCH 4/7] Containers (V8): Simple CPU accounting container subsystem
type: item
description: This example demonstrates how to use the generic container subsystem for a simple resource tracker that counts, for the processes in a container, the total CPU time used and the %CPU used in the last complete 10 second interval. Portions contributed by Balbir Singh <balbir@in.ibm.com> Signed-off-by: Paul Menage <menage@google.com> --- include/linux/container_subsys.h | 6 + include/linux/cpu_acct.h | 14 ++ init/Kconfig | 7 + kernel/Makefile | 1 kernel/cpu_acct.c | 204 +++++++++++++++++++++++++++++++++++++++ kernel/sched.c | 14 ++ 6 files changed, 243 insertions(+), 3 deletions(-) Index: container-2.6.20-new/include/linux/cpu_acct.h ============================================================ ======= --- /dev/null +++ container-2.6.20-new/include/linux/cpu_acct.h @@ -0,0 +1,14 @@ + +#ifndef _LINUX_CPU_ACCT_H +#define _LINUX_CPU_ACCT_H + +#include <linux/container.h> +#include <asm/cputime.h> + +#ifdef CONFIG_CONTAINER_CPUACCT +extern void cpuacct_charge(struct task_struct *, cputime_t cputime); +#else +static void inline cpuacct_charge(struct task_struct *p, cputime_t cputime) {} +#endif + +#endif Index: container-2.6.20-new/init/Kconfig ============================================================ ======= --- container-2.6.20-new.orig/init/Kconfig +++ container-2.6.20-new/init/Kconfig @@ -278,6 +278,13 @@ config PROC_PID_CPUSET depends on CPUSETS default y +config CONTAINER_CPUACCT + bool "Simple CPU accounting container subsystem" + select CONTAINERS + help + Provides a simple Resource Controller for monitoring the + total CPU consumed by the tasks in a container + config RELAY bool "Kernel->user space relay support (formerly relayfs)" help Index: container-2.6.20-new/kernel/cpu_acct.c ============================================================ ======= --- /dev/null +++ container-2.6.20-new/kernel/cpu_acct.c @@ -0,0 +1,204 @@ +/* + * kernel/cpu_acct.c - CPU accounting container subsystem + * + * Copyright (C) Google Inc, 2006 + * + * Developed by Paul Menage (menage…
creator: Paul Menage
date: 2007-04-06T23:32:25-00:00

[PATCH 5/7] Containers (V8): Resource Groups over generic containers
type: item
description: This patch provides the RG core and numtasks controller as container subsystems, intended as an example of how to implement a more complex resource control system over generic process containers. The changes to the core involve primarily removing the group management, task membership and configfs support and adding interface layers to talk to the generic container layer instead. Each resource controller becomes an independent container subsystem; the RG core is essentially a library that the resource controllers can use to provide the RG API to userspace. Rather than a single shares and stats file in each group, there's a <controller>_shares and a <controller>_stats file, each linked to the appropriate resource controller. include/linux/container_subsys.h | 6 include/linux/moduleparam.h | 12 - include/linux/numtasks.h | 28 ++ include/linux/res_group.h | 86 +++++++ include/linux/res_group_rc.h | 125 ++++++++++ init/Kconfig | 22 + kernel/Makefile | 1 kernel/fork.c | 7 kernel/res_group/Makefile | 2 kernel/res_group/local.h | 38 +++ kernel/res_group/numtasks.c | 451 +++++++++++++++++++++++++++++++++++++++ kernel/res_group/res_group.c | 135 +++++++++++ kernel/res_group/rgcs.c | 302 ++++++++++++++++++++++++++ kernel/res_group/shares.c | 228 +++++++++++++++++++ 14 files changed, 1439 insertions(+), 4 deletions(-) Index: container-2.6.20-new/include/linux/moduleparam.h ============================================================ ======= --- container-2.6.20-new.orig/include/linux/moduleparam.h +++ container-2.6.20-new/include/linux/moduleparam.h @@ -78,11 +78,17 @@ struct kparam_array /* Helper functions: type is byte, short, ushort, int, uint, long, ulong, charp, bool or invbool, or XXX if you define param_get_XXX, param_set_XXX and param_check_XXX. */ -#define module_param_named(name, value, type, perm) \ - param_check_##type(name, &(value)); \ - module_param_call(name, param_set_##type, param_get_##type, &value, perm); \ +#define module_param_named_call(name, value, type…
creator: Paul Menage
date: 2007-04-06T23:32:26-00:00

[PATCH 6/7] Containers (V8): BeanCounters over generic process containers
type: item
description: This patch implements the BeanCounter resource control abstraction over generic process containers. It contains the beancounter core code, plus the numfiles resource counter. It doesn't currently contain any of the memory tracking code or the code for switching beancounter context in interrupts. Currently all the beancounters resource counters are lumped into a single hierarchy; ideally it would be possible for each resource counter to be a separate container subsystem, allowing them to be connected to different hierarchies. --- fs/file_table.c | 11 + include/bc/beancounter.h | 194 ++++++++++++++++++++ include/bc/misc.h | 27 ++ include/bc/task.h | 64 ++++++ include/linux/container_subsys.h | 6 include/linux/fs.h | 3 include/linux/sched.h | 3 init/Kconfig | 4 init/main.c | 3 kernel/Makefile | 1 kernel/bc/Kconfig | 17 + kernel/bc/Makefile | 7 kernel/bc/beancounter.c | 368 +++++++++++++++++++++++++++++++++++++++ kernel/bc/misc.c | 57 ++++++ kernel/softirq.c | 7 15 files changed, 771 insertions(+), 1 deletion(-) Index: container-2.6.20-new/init/Kconfig ============================================================ ======= --- container-2.6.20-new.orig/init/Kconfig +++ container-2.6.20-new/init/Kconfig @@ -607,6 +607,10 @@ config STOP_MACHINE Need stop_machine() primitive. endmenu +menu "Beancounters" +source "kernel/bc/Kconfig" +endmenu + menu "Block layer" source "block/Kconfig" endmenu Index: container-2.6.20-new/kernel/Makefile ============================================================ ======= --- container-2.6.20-new.orig/kernel/Makefile +++ container-2.6.20-new/kernel/Makefile @@ -12,6 +12,7 @@ obj-y = sched.o fork.o exec_domain.o obj-$(CONFIG_STACKTRACE) += stacktrace.o obj-y += time/ +obj-$(CONFIG_BEANCOUNTERS) += bc/ obj-$(CONFIG_DEBUG_MUTEXES) += mutex-debug.o obj-$(CONFIG_LOCKDEP) += lockdep.o ifeq ($(CONFIG_PROC_FS),y) Index: container-2.6.20-new/kernel/bc/Kconfig ============================================================ ======= --- /dev/null +++ container…
creator: Paul Menage
date: 2007-04-06T23:32:27-00:00

[PATCH 7/7] Containers (V8): Container interface to nsproxy subsystem
type: item
description: This is intended as a simple illustration of how a virtual server system could be integrated with generic containers, and hence take advantage of other resource-control efforts. A real implementation would probably allow parameters such as configuring what kinds of namespace creations triggered new containers, etc. When a task enters a new namespace via a clone() or unshare(), a new container is created and the task moves into it. Developed by Serge Hallyn <serue@us.ibm.com>, adapted by Paul Menage <menage@google.com> Signed-off-by: Paul Menage <menage@google.com> --- include/linux/container_subsys.h | 6 ++ include/linux/nsproxy.h | 6 ++ init/Kconfig | 9 +++ kernel/Makefile | 1 kernel/fork.c | 4 + kernel/ns_container.c | 99 +++++++++++++++++++++++++++++++++++++++ kernel/nsproxy.c | 6 ++ 7 files changed, 131 insertions(+) Index: container-2.6.20-new/include/linux/nsproxy.h ============================================================ ======= --- container-2.6.20-new.orig/include/linux/nsproxy.h +++ container-2.6.20-new/include/linux/nsproxy.h @@ -53,4 +53,10 @@ static inline void exit_task_namespaces( put_nsproxy(ns); } } +#ifdef CONFIG_CONTAINER_NS +int ns_container_clone(struct task_struct *tsk); +#else +static inline int ns_container_clone(struct task_struct *tsk) { return 0; } +#endif + #endif Index: container-2.6.20-new/kernel/Makefile ============================================================ ======= --- container-2.6.20-new.orig/kernel/Makefile +++ container-2.6.20-new/kernel/Makefile @@ -39,6 +39,7 @@ obj-$(CONFIG_COMPAT) += compat.o obj-$(CONFIG_CONTAINERS) += container.o obj-$(CONFIG_CPUSETS) += cpuset.o obj-$(CONFIG_CONTAINER_CPUACCT) += cpu_acct.o +obj-$(CONFIG_CONTAINER_NS) += ns_container.o obj-$(CONFIG_IKCONFIG) += configs.o obj-$(CONFIG_STOP_MACHINE) += stop_machine.o obj-$(CONFIG_AUDIT) += audit.o auditfilter.o Index: container-2.6.20-new/kernel/fork.c ============================================================ ======= --- container-2.6.20-new.orig…
creator: Paul Menage
date: 2007-04-06T23:32:28-00:00

Re: [PATCH 6/7] Containers (V8): BeanCounters over generic process containers
type: item
description: menage@google.com wrote: > This patch implements the BeanCounter resource control abstraction > over generic process containers. It contains the beancounter core > code, plus the numfiles resource counter. It doesn't currently contain > any of the memory tracking code or the code for switching beancounter > context in interrupts. > > Currently all the beancounters resource counters are lumped into a > single hierarchy; ideally it would be possible for each resource > counter to be a separate container subsystem, allowing them to be > connected to different hierarchies. Thanks for your attention, but since we have decided to build a "new" resource controllers above your containers infrastructure, I think there is no need in further BC code porting. Thanks, Pavel.
creator: xemul
date: 2007-04-09T07:43:07-00:00

Re: [PATCH 6/7] Containers (V8): BeanCounters over generic process containers
type: item
description: On Fri, Apr 06, 2007 at 04:32:27PM -0700, menage@google.com wrote: > This patch implements the BeanCounter resource control abstraction > over generic process containers. It contains the beancounter core > code, plus the numfiles resource counter. It doesn't currently contain > any of the memory tracking code or the code for switching beancounter > context in interrupts. > Currently all the beancounters resource counters are lumped into a > single hierarchy; ideally it would be possible for each resource > counter to be a separate container subsystem, allowing them to be I'm very happy to see the BeanCounter work revived. The utility of this work should extend far beyond feature work like containers and into stability and reliability areas as well. -- wli
creator: William Lee Irwin III
date: 2007-04-09T16:44:34-00:00

Re: [PATCH 4/7] Containers (V8): Simple CPU accounting container subsystem
type: item
description: On Fri, Apr 06, 2007 at 04:32:25PM -0700, menage@google.com wrote: > +struct container_subsys cpuacct_subsys = { > + .name = "cpuacct", > + .create = cpuacct_create, > + .destroy = cpuacct_destroy, > + .populate = cpuacct_populate, > + .subsys_id = cpuacct_subsys_id, > +}; container_register_subsys(&cpuacct_subsys) is missing .. -- Regards, vatsa
creator: Srivatsa Vaddagiri
date: 2007-04-10T13:16:42-00:00

Re: [PATCH 2/7] Containers (V8): Cpusets hooked into containers
type: item
description: menage@google.com wrote: > This patch removes the process grouping code from the cpusets code, > instead hooking it into the generic container system. This temporarily > adds cpuset-specific code in kernel/container.c, which is removed by > the next patch in the series. > > Signed-off-by: Paul Menage <menage@google.com> > [snip] > Index: container-2.6.20-new/init/Kconfig > ============================================================ ======= > --- container-2.6.20-new.orig/init/Kconfig > +++ container-2.6.20-new/init/Kconfig > @@ -239,17 +239,12 @@ config IKCONFIG_PROC > through /proc/config.gz. > > config CONTAINERS > - bool "Container support" > - help > - This option will let you create and manage process containers, > - which can be used to aggregate multiple processes, e.g. for > - the purposes of resource tracking. > - > - Say N if unsure > + bool Hi Paul, This looks like some patch generation error. Description for containers should not be removed after applying this patch. --Vaidy > > config CPUSETS > bool "Cpuset support" > depends on SMP > + select CONTAINERS > help > This option will let you create and manage CPUSETs which > allow dynamically partitioning a system into sets of CPUs and > @@ -278,6 +273,11 @@ config SYSFS_DEPRECATED > If you are using a distro that was released in 2006 or later, > it should be safe to say N here. > > +config PROC_PID_CPUSET > + bool "Include legacy /proc/<pid>/cpuset file" > + depends on CPUSETS > + default y > + > config RELAY > bool "Kernel->user space relay support (formerly relayfs)" > help [snip]
creator: Vaidyanathan Srinivas
date: 2007-04-23T10:52:49-00:00

Re: [PATCH 0/7] Containers (V8): Generic Process Containers
type: item
description: Hi Paul, In [patch 3/7] Containers (V8): Add generic multi-subsystem API to containers, you have forcefully enabled interrupt in container_init_subsys() with spin_unlock_irq() which breaks on PPC64. > +static void container_init_subsys(struct container_subsys *ss) { > + int retval; > + struct list_head *l; > + printk(KERN_ERR "Initializing container subsys %s\n", > ss->name); > + > + /* Create the top container state for this subsystem */ > + ss->root = &rootnode; > + retval = ss->create(ss, dummytop); > + BUG_ON(retval); > + init_container_css(ss, dummytop); > + > + /* Update all container groups to contain a subsys > + * pointer to this state - since the subsystem is > + * newly registered, all tasks and hence all container > + * groups are in the subsystem's top container. */ > + spin_lock_irq(&container_group_lock); > + l = &init_container_group.list; > + do { > + struct container_group *cg = > + list_entry(l, struct container_group, list); > + cg->subsys[ss->subsys_id] = > dummytop->subsys[ss->subsys_id]; > + l = l->next; > + } while (l != &init_container_group.list); > + spin_unlock_irq(&container_group_lock); Interrupt gets enabled here and on PPC64, the kernel takes a pending decrementer and crashes because it is too early to handle them. Use of irqsave and restore routines would fix the problem. I have included the fix along with minor Kconfig correction. Also your 3/7 patch did not showup on LKML. --Vaidy > + > + need_forkexit_callback |= ss->fork || ss->exit;
creator: Vaidyanathan Srinivas
date: 2007-04-23T11:07:33-00:00

Re: [PATCH 2/7] Containers (V8): Cpusets hooked into containers
type: item
description: On 4/23/07, Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> wrote: > > > > config CONTAINERS > > - bool "Container support" > > - help > > - This option will let you create and manage process containers, > > - which can be used to aggregate multiple processes, e.g. for > > - the purposes of resource tracking. > > - > > - Say N if unsure > > + bool > > Hi Paul, > > This looks like some patch generation error. Description for > containers should not be removed after applying this patch. No, this is intentional - in the first patch in the series, CONFIG_CONTAINER was a user-selectable option so it had a description; in the second it becomes an option that's only selected if other selected systems (e.g. cpusets) depend on it. So it no longer needs help text. Cheers, Paul
creator: Paul Menage
date: 2007-04-25T04:59:40-00:00

Re: [ckrm-tech] [PATCH 0/7] Containers (V8): Generic Process Containers
type: item
description: On 4/23/07, Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> wrote: > Hi Paul, > > In [patch 3/7] Containers (V8): Add generic multi-subsystem API to > containers, you have forcefully enabled interrupt in > container_init_subsys() with spin_unlock_irq() which breaks on PPC64. > > > > +static void container_init_subsys(struct container_subsys *ss) { > > + int retval; > > + struct list_head *l; > > + printk(KERN_ERR "Initializing container subsys %s\n", > > ss->name); > > + > > + /* Create the top container state for this subsystem */ > > + ss->root = &rootnode; > > + retval = ss->create(ss, dummytop); > > + BUG_ON(retval); > > + init_container_css(ss, dummytop); > > + > > + /* Update all container groups to contain a subsys > > + * pointer to this state - since the subsystem is > > + * newly registered, all tasks and hence all container > > + * groups are in the subsystem's top container. */ > > + spin_lock_irq(&container_group_lock); > > + l = &init_container_group.list; > > + do { > > + struct container_group *cg = > > + list_entry(l, struct container_group, list); > > + cg->subsys[ss->subsys_id] = > > dummytop->subsys[ss->subsys_id]; > > + l = l->next; > > + } while (l != &init_container_group.list); > > + spin_unlock_irq(&container_group_lock); > > Interrupt gets enabled here and on PPC64, the kernel takes a pending > decrementer and crashes because it is too early to handle them. > > Use of irqsave and restore routines would fix the problem. OK, thanks. I'll add that change. Paul
creator: Paul Menage
date: 2007-04-25T05:04:53-00:00