[Devel] [RFC] [PATCH 0/5] cgroups: support for module-loadable subsystems

2009-12-04 Thread Ben Blum
[This is a revision of http://lkml.org/lkml/2009/11/2/442 ] This patch series implements support for building, loading, and unloading subsystems as modules, both within and outside the kernel source tree. It provides an interface cgroup_load_subsys() and cgroup_unload_subsys() which modular

[Devel] [RFC] [PATCH 1/5] cgroups: revamp subsys array

2009-12-04 Thread Ben Blum
Make subsys[] able to be dynamically populated to support modular subsystems From: Ben Blum bb...@andrew.cmu.edu This patch reworks the way the subsys[] array is used so that subsystems can register themselves after boot time, and enables the internals of cgroups to be able to handle when

[Devel] [RFC] [PATCH 2/5] cgroups: subsystem module loading interface

2009-12-04 Thread Ben Blum
Add interface between cgroups subsystem management and module loading From: Ben Blum bb...@andrew.cmu.edu This patch implements rudimentary module-loading support for cgroups - namely, a cgroup_load_subsys (similar to cgroup_init_subsys) for use as a module initcall, and a struct module pointer

[Devel] [RFC] [PATCH 3/5] cgroups: net_cls as module

2009-12-04 Thread Ben Blum
Allows the net_cls cgroup subsystem to be compiled as a module From: Ben Blum bb...@andrew.cmu.edu This patch modifies net/sched/cls_cgroup.c to allow the net_cls subsystem to be optionally compiled as a module instead of builtin. The cgroup_subsys struct is moved around a bit to allow the

[Devel] [RFC] [PATCH 4/5] cgroups: subsystem module unloading

2009-12-04 Thread Ben Blum
Provides support for unloading modular subsystems. From: Ben Blum bb...@andrew.cmu.edu This patch adds a new function cgroup_unload_subsys which is to be used for removing a loaded subsystem during module deletion. Reference counting of the subsystems' modules is moved from once (at load time)

[Devel] [RFC] [PATCH 5/5] cgroups: subsystem dependencies

2009-12-04 Thread Ben Blum
Adds support for cgroup subsystems to specify dependencies on other subsystems From: Ben Blum bb...@andrew.cmu.edu This patch adds a mechanism with which a subsystem can specify dependencies on other subsystems. Since subsystems can come and go, it would not be useful to refer to a depended-upon

[Devel] updated x86_64 eclone() stub

2009-12-04 Thread Dave Hansen
This more closely resembles what glibc does. The last version had a push/popq %ebp. But, after looking at the glibc code, I believe this to be unnecessary on 64-bit. Suka also pointed out that we were neglecting to pull the subthread's function argument off the stack. I also changed the

[Devel] Re: updated x86_64 eclone() stub

2009-12-04 Thread Louis Rilling
On 04/12/09 8:05 -0800, Dave Hansen wrote: syscall also destroys r11, so it should be added to the clobber list. Even though it is a ptregscall? The assembly instruction itself destroys r11 (same for rcx). Thanks, Louis -- Dr Louis RillingKerlabs Skype:

[Devel] Re: updated x86_64 eclone() stub

2009-12-04 Thread Louis Rilling
On 04/12/09 8:21 -0800, Dave Hansen wrote: On Fri, 2009-12-04 at 17:08 +0100, Louis Rilling wrote: On 04/12/09 8:05 -0800, Dave Hansen wrote: syscall also destroys r11, so it should be added to the clobber list. Even though it is a ptregscall? The assembly instruction itself

[Devel] [PATCH] Relax tcp.window_clamp value in INET restore

2009-12-04 Thread Dan Smith
This value can grow higher than 16k, but it clamped at packet receive time if over that limit. Instead of failing here, just clamp to the same limit. Signed-off-by: Dan Smith da...@us.ibm.com Cc: se...@us.ibm.com Cc: or...@librato.com --- net/ipv4/checkpoint.c |6 ++ 1 files changed, 2

[Devel] Re: ckpt-v19-rc2

2009-12-04 Thread Oren Laadan
Thinking about it further, here are two possible scenarios: A) Task maps a file beyond it's limit, never touches those extra page (if it did, it would get EFAULT) B) Task maps a file and writes the last page, then the file gets truncated (by at least a page). The task may continue to access

[Devel] [PATCH 3/3] checkpoint/powerpc: warn if full register state unavailable

2009-12-04 Thread Nathan Lynch
Emit a warning if we attempt to checkpoint a task for which the user nonvolatile register state (r13-r31) has not been saved. This should not ever happen. Signed-off-by: Nathan Lynch n...@pobox.com --- arch/powerpc/mm/checkpoint.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)

[Devel] [PATCH 0/3] checkpoint/powerpc: fixes etc

2009-12-04 Thread Nathan Lynch
Hi Oren, Here are a few patches against ckpt-v19-rc2 that improve the state of checkpoint/restart on powerpc. Please feel free to fold them into the powerpc portion of the patchset. Nathan Lynch (3): checkpoint/powerpc: fix 32-bit build checkpoint/powerpc: save and restore nvgprs for

[Devel] [PATCH 2/3] checkpoint/powerpc: save and restore nvgprs for checkpoint/restart

2009-12-04 Thread Nathan Lynch
On system call entry, powerpc explicitly saves and restores the full user register state for only a few special system calls (fork, clone, etc). The checkpoint and restart syscalls need this treatment too. Signed-off-by: Nathan Lynch n...@pobox.com --- arch/powerpc/include/asm/systbl.h |4

[Devel] [PATCH 1/3] checkpoint/powerpc: fix 32-bit build

2009-12-04 Thread Nathan Lynch
Need to cast u64 to unsigned long before casting it to a pointer type. Signed-off-by: Nathan Lynch n...@pobox.com --- arch/powerpc/kernel/process.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index

[Devel] [PATCH] cr_tests: fix syscall numbers for powerpc

2009-12-04 Thread Nathan Lynch
Update to the values for ckpt-v19-rc2, and add eclone. --- cr.h |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cr.h b/cr.h index a58c2e4..8acd750 100644 --- a/cr.h +++ b/cr.h @@ -71,12 +71,16 @@ /* parisc unsupported. */ #if __powerpc__ +#ifndef __NR_eclone

[Devel] [PATCH] cr_tests: attempt all tests

2009-12-04 Thread Nathan Lynch
Bailing at the first failure in runall.sh inhibits good test coverage. Attempt to run all tests and keep running counts of tests passed and attempted. Signed-off-by: Nathan Lynch n...@pobox.com --- runall.sh | 60 1 files changed,

[Devel] Re: [PATCH] Relax tcp.window_clamp value in INET restore

2009-12-04 Thread Serge E. Hallyn
Quoting Dan Smith (da...@us.ibm.com): This value can grow higher than 16k, but it clamped at packet receive time if over that limit. Instead of failing here, just clamp to the same limit. Signed-off-by: Dan Smith da...@us.ibm.com Cc: se...@us.ibm.com Tested-by: Serge Hallyn

[Devel] [PATCH 0/5] user-cr fixes and generic stack API

2009-12-04 Thread Nathan Lynch
Hi Oren, Here's a patch series against ckpt-v19-rc2 that fixes a couple of minor issues for powerpc and adds a generic stack API (genstack). Nathan Lynch (5): catch attempts to build clone_ppc_.S in 64-bit mode user-cr: align powerpc sp for eclone, clean up __eclone user-cr: add generic

[Devel] [PATCH 1/5] catch attempts to build clone_ppc_.S in 64-bit mode

2009-12-04 Thread Nathan Lynch
It will build fine, but runtime is another matter. Signed-off-by: Nathan Lynch n...@pobox.com --- clone_ppc_.S |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/clone_ppc_.S b/clone_ppc_.S index b736e13..ebc07f3 100644 --- a/clone_ppc_.S +++ b/clone_ppc_.S @@ -11,6

[Devel] [PATCH 2/5] user-cr: align powerpc sp for eclone, clean up __eclone

2009-12-04 Thread Nathan Lynch
Using genstack in nsexeccwp exposed this bug. The child_stack value being passed to the kernel via clone_args was not properly aligned, causing the child function to access the guard page. And it turns out we needn't pass child_sp [r4] to the __eclone wrapper at all, so remove it. Finally, the

[Devel] [PATCH 3/5] user-cr: add generic stack API

2009-12-04 Thread Nathan Lynch
A few problems exist with the management of stacks for clone/eclone in the restart utility. * Stacks are allocated from the heap via malloc. This means any mishandling of the the stack setup by the platform eclone code can result in silent data corruption. At a time when architecture

[Devel] [PATCH 5/5] user-cr: use genstack API in nsexeccwp

2009-12-04 Thread Nathan Lynch
Signed-off-by: Nathan Lynch n...@pobox.com --- Makefile|2 +- nsexeccwp.c | 11 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index b1485cb..35188f9 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,7 @@ restart: CFLAGS += -D__REENTRANT

[Devel] [PATCH 4/5] user-cr: use genstack API in restart.c

2009-12-04 Thread Nathan Lynch
Fixes a couple of off-by-one bugs and makes it more portable. Signed-off-by: Nathan Lynch n...@pobox.com --- Makefile |2 +- restart.c | 42 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index