From: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
To: menage@google.com
Cc: akpm@linux-foundation.org, sekharan@us.ibm.com, dev@sw.ru,
xemul@sw.ru, serue@us.ibm.com, vatsa@in.ibm.com,
ebiederm@xmission.com, ckrm-tech@lists.sourceforge.net,
linux-kernel@vger.kernel.org, containers@lists.osdl.org,
mbligh@google.com, rohitseth@google.com, devel@openvz.org
Subject: Re: [PATCH 0/7] Containers (V8): Generic Process Containers
Date: Mon, 23 Apr 2007 16:37:33 +0530 [thread overview]
Message-ID: <462C9375.5030901@linux.vnet.ibm.com> (raw)
In-Reply-To: <20070406233221.989528000@menage.corp.google.com>
[-- Attachment #1: Type: text/plain, Size: 1511 bytes --]
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;
[-- Attachment #2: container-irq-fix.patch --]
[-- Type: text/x-patch, Size: 1709 bytes --]
Index: linux-2.6.20/kernel/container.c
===================================================================
--- linux-2.6.20.orig/kernel/container.c
+++ linux-2.6.20/kernel/container.c
@@ -1638,6 +1638,7 @@ int container_is_descendant(const struct
static void container_init_subsys(struct container_subsys *ss) {
int retval;
+ unsigned long flags;
struct list_head *l;
printk(KERN_ERR "Initializing container subsys %s\n", ss->name);
@@ -1651,7 +1652,7 @@ static void container_init_subsys(struct
* 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);
+ spin_lock_irqsave(&container_group_lock, flags);
l = &init_container_group.list;
do {
struct container_group *cg =
@@ -1659,7 +1660,7 @@ static void container_init_subsys(struct
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);
+ spin_unlock_irqrestore(&container_group_lock, flags);
need_forkexit_callback |= ss->fork || ss->exit;
Index: linux-2.6.20/init/Kconfig
===================================================================
--- linux-2.6.20.orig/init/Kconfig
+++ linux-2.6.20/init/Kconfig
@@ -239,8 +239,13 @@ config IKCONFIG_PROC
through /proc/config.gz.
config CONTAINERS
- bool
-
+ 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
config CPUSETS
bool "Cpuset support"
next prev parent reply other threads:[~2007-04-23 11:08 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-06 23:32 [PATCH 0/7] Containers (V8): Generic Process Containers menage
2007-04-06 23:32 ` [PATCH 1/7] Containers (V8): Generic container system abstracted from cpusets code menage
2007-04-06 23:32 ` [PATCH 2/7] Containers (V8): Cpusets hooked into containers menage
2007-04-23 10:52 ` Vaidyanathan Srinivasan
2007-04-25 4:59 ` Paul Menage
2007-04-06 23:32 ` [PATCH 4/7] Containers (V8): Simple CPU accounting container subsystem menage
2007-04-10 13:16 ` Srivatsa Vaddagiri
2007-04-06 23:32 ` [PATCH 5/7] Containers (V8): Resource Groups over generic containers menage
2007-04-06 23:32 ` [PATCH 6/7] Containers (V8): BeanCounters over generic process containers menage
2007-04-09 7:46 ` Pavel Emelianov
2007-04-09 16:44 ` William Lee Irwin III
2007-04-06 23:32 ` [PATCH 7/7] Containers (V8): Container interface to nsproxy subsystem menage
[not found] ` <20070407001324.271959000@menage.corp.google.com>
2007-04-07 1:58 ` [ckrm-tech] [PATCH 3/7] Containers (V8): Add generic multi-subsystem API to containers Paul Menage
2007-04-07 4:18 ` Srivatsa Vaddagiri
2007-04-07 17:30 ` Paul Menage
2007-04-10 14:42 ` Srivatsa Vaddagiri
2007-04-10 14:52 ` Srivatsa Vaddagiri
2007-04-10 15:45 ` [ckrm-tech] " Paul Menage
2007-04-11 4:47 ` Srivatsa Vaddagiri
2007-04-11 5:01 ` Srivatsa Vaddagiri
2007-04-11 8:42 ` Paul Menage
2007-04-11 16:42 ` Srivatsa Vaddagiri
2007-04-23 11:07 ` Vaidyanathan Srinivasan [this message]
2007-04-25 5:04 ` [ckrm-tech] [PATCH 0/7] Containers (V8): Generic Process Containers Paul Menage
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=462C9375.5030901@linux.vnet.ibm.com \
--to=svaidy@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=ckrm-tech@lists.sourceforge.net \
--cc=containers@lists.osdl.org \
--cc=dev@sw.ru \
--cc=devel@openvz.org \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@google.com \
--cc=menage@google.com \
--cc=rohitseth@google.com \
--cc=sekharan@us.ibm.com \
--cc=serue@us.ibm.com \
--cc=vatsa@in.ibm.com \
--cc=xemul@sw.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox