[Devel] Re: [PATCH] Add kernel/notifier.c

2007-07-20 Thread Alexey Dobriyan
On Thu, Jul 19, 2007 at 02:48:59PM -0700, Andrew Morton wrote: On Thu, 19 Jul 2007 20:46:11 +0400 Alexey Dobriyan [EMAIL PROTECTED] wrote: There is separate notifier header, but no separate notifier .c file. Extract notifier code out of kernel/sys.c which will remain for misc syscalls

[Devel] [RFC][-mm PATCH 0/8] Memory controller introduction (v3)

2007-07-20 Thread Balbir Singh
Changelog since version 2 1. Improved error handling in mm/memory.c (spotted by YAMAMOTO Takashi) 2. Test results included 3. try_to_free_mem_container_pages() bug fix (sc-may_writepage is now set to !laptop_mode) Changelog since version 1 1. Fixed some compile time errors (in mm/migrate.c

[Devel] [RFC][-mm PATCH 1/8] Memory controller resource counters (v3)

2007-07-20 Thread Balbir Singh
From: Pavel Emelianov [EMAIL PROTECTED] Introduce generic structures and routines for resource accounting. Each resource accounting container is supposed to aggregate it, container_subsystem_state and its resource-specific members within. Signed-off-by: Pavel Emelianov [EMAIL PROTECTED]

[Devel] [RFC][-mm PATCH 2/8] Memory controller containers setup (v3)

2007-07-20 Thread Balbir Singh
Setup the memory container and add basic hooks and controls to integrate and work with the container. Signed-off-by: [EMAIL PROTECTED] --- include/linux/container_subsys.h |6 + include/linux/memcontrol.h | 21 + init/Kconfig |8 ++ mm/Makefile

[Devel] [RFC][-mm PATCH 3/8] Memory controller accounting setup (v3)

2007-07-20 Thread Balbir Singh
From: Pavel Emelianov [EMAIL PROTECTED] Basic setup routines, the mm_struct has a pointer to the container that it belongs to and the the page has a meta_page associated with it. Signed-off-by: Pavel Emelianov [EMAIL PROTECTED] Signed-off-by: [EMAIL PROTECTED] --- include/linux/memcontrol.h

[Devel] [RFC][-mm PATCH 5/8] Memory controller task migration (v3)

2007-07-20 Thread Balbir Singh
Allow tasks to migrate from one container to the other. We migrate mm_struct's mem_container only when the thread group id migrates. Signed-off-by: [EMAIL PROTECTED] --- mm/memcontrol.c | 35 +++ 1 file changed, 35 insertions(+) diff -puN

[Devel] [RFC][-mm PATCH 4/8] Memory controller memory accounting (v3)

2007-07-20 Thread Balbir Singh
Changelog 1. Improved error handling, uncharge on errors and check to see if we are leaking pages (review by YAMAMOTO Takashi) Add the accounting hooks. The accounting is carried out for RSS and Page Cache (unmapped) pages. There is now a common limit and accounting for both. The RSS

[Devel] [RFC][-mm PATCH 8/8] Add switch to control what type of pages to limit (v3)

2007-07-20 Thread Balbir Singh
Choose if we want cached pages to be accounted or not. By default both are accounted for. A new set of tunables are added. echo -n 1 mem_control_type switches the accounting to account for only mapped pages echo -n 2 mem_control_type switches the behaviour back Signed-off-by: [EMAIL

[Devel] unexpected scsi timeout

2007-07-20 Thread Vasily Averin
Tejun, Jeff I've noticed that some scsi commands for DVD-drive attached to pata_via successfully finishes without any delays but reports about TIMEOUT condition. It happens because of ATA_ERR bit is set in status register. As result for each command Error Handler thread awakened, requests sense

[Devel] Resource Management development plans

2007-07-20 Thread Srivatsa Vaddagiri
Here's a tentative development plan on resource management from our side. Would request others to comment/add their plans as part of this discussion. This plan, alongwith appropriate usage scenarios, is being requested for kernel-summit discussion. Most likely, the resource management plans will

[Devel] [PATCH 09/10] Task Containers(V11): Example CPU accounting subsystem

2007-07-20 Thread menage
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 [EMAIL PROTECTED]

[Devel] [PATCH 04/10] Task Containers(V11): Add container_clone() interface.

2007-07-20 Thread menage
This patch adds support for container_clone(), a way to create new containers intended to be used for systems such as namespace unsharing. A new subsystem callback, post_clone(), is added to allow subsystems to automatically configure cloned containers. Signed-off-by: Paul Menage [EMAIL

[Devel] [PATCH 06/10] Task Containers(V11): Shared container subsystem group arrays

2007-07-20 Thread menage
This patch replaces the struct css_group embedded in task_struct with a pointer; all tasks that have the same set of memberships across all hierarchies will share a css_group object, and will be linked via their css_groups field to the tasks list_head in the css_group. Assuming that many tasks

[Devel] [PATCH 05/10] Task Containers(V11): Add procfs interface

2007-07-20 Thread menage
This patch adds: /proc/containers - general system info /proc/*/container - per-task container membership info Signed-off-by: Paul Menage [EMAIL PROTECTED] --- fs/proc/base.c|7 ++ include/linux/container.h |2 kernel/container.c| 132

[Devel] [PATCH 10/10] Task Containers(V11): Simple task container debug info subsystem

2007-07-20 Thread menage
This example subsystem exports debugging information as an aid to diagnosing refcount leaks, etc, in the container framework. Signed-off-by: Paul Menage [EMAIL PROTECTED] --- include/linux/container_subsys.h |4 + init/Kconfig | 10 kernel/Makefile

[Devel] [PATCH 03/10] Task Containers(V11): Add fork()/exit() hooks

2007-07-20 Thread menage
This patch adds the necessary hooks to the fork() and exit() paths to ensure that new children inherit their parent's container assignments, and that exiting processes release reference counts on their containers. Signed-off-by: Paul Menage [EMAIL PROTECTED] --- include/linux/container.h |6

[Devel] [PATCH 07/10] Task Containers(V11): Automatic userspace notification of idle containers

2007-07-20 Thread menage
This patch adds the following files to the container filesystem: notify_on_release - configures/reports whether the container subsystem should attempt to run a release script when this container becomes unused release_agent - configures/reports the release agent to be used for this hierarchy

[Devel] Re: [RFC][-mm PATCH 2/8] Memory controller containers setup (v3)

2007-07-20 Thread Paul Menage
On 7/20/07, Balbir Singh [EMAIL PROTECTED] wrote: +config CONTAINER_MEM_CONT + bool Memory controller for containers + select CONTAINERS Andrew asked me to not use select in Kconfig files due to some unspecified problems seen in the past, so my latest patchset makes the subsystems

[Devel] Re: [RFC][-mm PATCH 3/8] Memory controller accounting setup (v3)

2007-07-20 Thread Paul Menage
On 7/20/07, Balbir Singh [EMAIL PROTECTED] wrote: + mem = mem_container_from_cont(task_container(p, + mem_container_subsys_id)); + css_get(mem-css); The container framework won't try to free a subsystem's root container state, so this isn't

[Devel] Re: [RFC][-mm PATCH 4/8] Memory controller memory accounting (v3)

2007-07-20 Thread Paul Menage
On 7/20/07, Paul Menage [EMAIL PROTECTED] wrote: + mem = rcu_dereference(mm-mem_container); + /* +* For every charge from the container, increment reference +* count +*/ + css_get(mem-css); + rcu_read_unlock(); It's not clear to me that

[Devel] Re: [PATCH 02/10] Task Containers(V11): Add tasks file interface

2007-07-20 Thread James Morris
On Fri, 20 Jul 2007, [EMAIL PROTECTED] wrote: +/* + * Attach task with pid 'pid' to container 'cont'. Call with + * container_mutex, may take task_lock of task + */ +static int attach_task_by_pid(struct container *cont, char *pidbuf) +{ + pid_t pid; + struct task_struct *tsk; +

[Devel] Re: [PATCH 02/10] Task Containers(V11): Add tasks file interface

2007-07-20 Thread Paul Menage
On 7/20/07, James Morris [EMAIL PROTECTED] wrote: + if ((current-euid) (current-euid != tsk-uid) + (current-euid != tsk-suid)) { + put_task_struct(tsk); + return -EACCES; I wonder if we should allow CAP_SYS_ADMIN to do

[Devel] Re: containers development plans (July 20 version)

2007-07-20 Thread Rohit Seth
Thanks Serge for collecting these requirements. Have we decided on container mini summit? Couple of points that I want to add in task container functionality section (not sure if these are already covered by items below): 1- Per container dirty page (write throttling) limit. 2- Per container

[Devel] Re: [RFC][-mm PATCH 8/8] Add switch to control what type of pages to limit (v3)

2007-07-20 Thread Paul Menage
On 7/20/07, Balbir Singh [EMAIL PROTECTED] wrote: -static struct mem_container init_mem_container; +static ssize_t mem_control_type_read(struct container *cont, + struct cftype *cft, + struct file *file, char __user *userbuf, +

[Devel] Re: [PATCH 4/5] [V2] Define is_global_init() and is_container_init()

2007-07-20 Thread Andrew Morton
On Thu, 19 Jul 2007 00:21:58 -0700 [EMAIL PROTECTED] wrote: --- lx26-22-rc6-mm1a.orig/kernel/pid.c2007-07-16 12:55:15.0 -0700 +++ lx26-22-rc6-mm1a/kernel/pid.c 2007-07-16 13:10:48.0 -0700 @@ -69,6 +69,13 @@ struct pid_namespace init_pid_ns = { .last_pid =

[Devel] Re: containers development plans (July 20 version)

2007-07-20 Thread Eric W. Biederman
Paul Menage [EMAIL PROTECTED] writes: On 7/20/07, Serge E. Hallyn [EMAIL PROTECTED] wrote: 4. task containers functionality base features virtualized continerfs mounts to support vserver mgmnt of sub-containers

[Devel] Re: [PATCH 4/5] [V2] Define is_global_init() and is_container_init()

2007-07-20 Thread sukadev
Andrew Morton [EMAIL PROTECTED] wrote: | On Thu, 19 Jul 2007 00:21:58 -0700 | [EMAIL PROTECTED] wrote: | | --- lx26-22-rc6-mm1a.orig/kernel/pid.c 2007-07-16 12:55:15.0 -0700 | +++ lx26-22-rc6-mm1a/kernel/pid.c 2007-07-16 13:10:48.0 -0700 | @@ -69,6 +69,13 @@ struct