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

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

[Devel] Re: [-mm PATCH 0/8] Memory controller introduction (v2)

2007-07-05 Thread Balbir Singh
Balbir Singh wrote: > Changelog since version 1 > > 1. Fixed some compile time errors (in mm/migrate.c from Vaidyanathan S) > 2. Fixed a panic seen when LIST_DEBUG is enabled > 3. Added a mechanism to control whether we track page cache or both >page cache and mapped pages (as requested by Pav

[Devel] [PATCH 6/6] Define is_global_init() and is_container_init()

2007-07-05 Thread sukadev
Subject: [PATCH 6/6] Define is_global_init() and is_container_init(). From: Serge E. Hallyn <[EMAIL PROTECTED]> is_init() is an ambiguous name for the pid==1 check. Split it into is_global_init() and is_container_init(). A container init has it's tsk->pid == 1. A global init also has it's ts

[Devel] [PATCH 5/6] Use task_pid() to find leader's pid

2007-07-05 Thread sukadev
Subject: [PATCH 5/6] Use task_pid() to find leader's pid From: Sukadev Bhattiprolu <[EMAIL PROTECTED]> Use task_pid() to get leader's pid since find_pid() cannot be used after detach_pid(). See comments in the code below for more details. Signed-off-by: Sukadev Bhattiprolu <[EMAIL PROTECTED]> -

[Devel] [PATCH 4/6] Use pid_to_nr() in process info functions

2007-07-05 Thread sukadev
Subject: [PATCH 4/6] Use pid_to_nr() in process info functions From: Sukadev Bhattiprolu <[EMAIL PROTECTED]> Use pid_to_nr() function in getppid(), getpgid() and getsid() functions so they return the correct pid_t for processes in multiple pid namespaces. Note: We don't need pid_to_nr() in getp

[Devel] [PATCH 3/6] Rename child_reaper function.

2007-07-05 Thread sukadev
Subject: [PATCH 3/6] Rename child_reaper function. From: Sukadev Bhattiprolu <[EMAIL PROTECTED]> Rename the child_reaper() function to task_child_reaper() to be similar to other task_* functions and to distinguish the function from 'struct pid_namspace.child_reaper'. Signed-off-by: Sukadev Bha

[Devel] [PATCH 2/6] Rename pid_nr function

2007-07-05 Thread sukadev
Subject: [PATCH 2/6] Rename pid_nr function From: Sukadev Bhattiprolu <[EMAIL PROTECTED]> Rename pid_nr() function to pid_to_nr() which is more descriptive and will hopefully cause less confusion with new structure/functions being added to support multiple pid namespaces. Signed-off-by: Sukade

[Devel] [PATCH 1/6] Define and use task_active_pid_ns() wrapper

2007-07-05 Thread sukadev
Subject: [PATCH 1/6] Define and use task_active_pid_ns() wrapper From: Sukadev Bhattiprolu <[EMAIL PROTECTED]> With multiple pid namespaces, a process is known by some pid_t in every ancestor pid namespace. Every time the process forks, the child process also gets a pid_t in every ancestor pid

[Devel] [PATCH 0/6] Misc helper patches

2007-07-05 Thread sukadev
Pls let me know if I can push the following helper patches to Andrew Morton. I posted these a couple of times to Containers earlier and believe I have addressed the comments I received. [PATCH 1/6] Define and use task_active_pid_ns() wrapper [PATCH 2/6] Rename pid_nr function

[Devel] [-mm PATCH 6/8] Memory controller add per container LRU and reclaim (v2)

2007-07-05 Thread Balbir Singh
Add the meta_page to the per container LRU. The reclaim algorithm has been modified to make the isolate_lru_pages() as a pluggable component. The scan_control data structure now accepts the container on behalf of which reclaims are carried out. try_to_free_pages() has been extended to become conta

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

2007-07-05 Thread Balbir Singh
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: Balbir Singh <[EMAIL PROTECTED]> --- include/linux/memcontrol.h | 32 ++ include/linux/mm_types.h |4 +++

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

2007-07-05 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: Balbir Sin

[Devel] [-mm PATCH 7/8] Memory controller OOM handling (v2)

2007-07-05 Thread Balbir Singh
Out of memory handling for containers over their limit. A task from the container over limit is chosen using the existing OOM logic and killed. TODO: 1. As discussed in the OLS BOF session, consider implementing a user space policy for OOM handling. Signed-off-by: Balbir Singh <[EMAIL PROTECTED]

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

2007-07-05 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: Balbir Singh <[EMAIL PROTECTED]> --- mm/memcontrol.c | 35 +++ 1 file changed, 35 insertions(+) diff -puN mm/me

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

2007-07-05 Thread Balbir Singh
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 accounting is accounted at page_add_*_rmap() and page_remove_rmap() time. Page cache is accounted at add_to_page_cache(), __delete_from_page

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

2007-07-05 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]> Sig

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

2007-07-05 Thread Balbir Singh
Changelog since version 1 1. Fixed some compile time errors (in mm/migrate.c from Vaidyanathan S) 2. Fixed a panic seen when LIST_DEBUG is enabled 3. Added a mechanism to control whether we track page cache or both page cache and mapped pages (as requested by Pavel) This patchset implements an

[Devel] Re: [-mm PATCH 4/7] Memory controller memory accounting

2007-07-05 Thread Balbir Singh
Vaidyanathan Srinivasan wrote: >> >> +if (mem_container_charge(page, mm)) { > > Minor correction. The above line should be > > if (mem_container_charge(new, mm)) { > > to avoid compilation error. > > --Vaidy > > [snip] Thanks, Vaidy, Patch incorporated. -- Warm Regards,

[Devel] Re: netns summary (was Re: containers development plans)

2007-07-05 Thread Eric W. Biederman
Cedric Le Goater <[EMAIL PROTECTED]> writes: > Serge E. Hallyn wrote: >> We are trying to create a roadmap for the next year of >> 'container' development, to be reported to the upcoming kernel >> summit. Containers here is a bit of an ambiguous term, so we are >> taking it to mean all of: >> >>

[Devel] Re: [-mm PATCH 4/7] Memory controller memory accounting

2007-07-05 Thread Vaidyanathan Srinivasan
Balbir Singh wrote: > 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 accounting is accounted at page_add_*_rmap() and page_remove_rmap() > time. Page cache is accounted at add_to_pag

[Devel] Re: containers development plans

2007-07-05 Thread Paul Jackson
Thanks for responding, Eric. For those like me (I suspect I'm not alone) who drift in and out of this discussion, perhaps this would be a good time to describe again what are the containers you're discussing here - their key purpose(s) and their essential architecture. For extra credit, putting a

[Devel] Re: containers development plans

2007-07-05 Thread Eric W. Biederman
Paul Jackson <[EMAIL PROTECTED]> writes: >> they are indirectly related. Sorry for the noise. > > Well ... if this is noise, it should be me apologizing, not you . > I'm the one who asked. > >> Paul Menage's container patches provide a process aggregation mechanism, >> like PAGG did. This is a co

[Devel] Re: containers development plans

2007-07-05 Thread Cedric Le Goater
Paul Jackson wrote: > Could someone explain how these directions impact Paul Menage's > container patches and, the one I care about the most, kernel/cpuset.c? they are indirectly related. Sorry for the noise. Paul Menage's container patches provide a process aggregation mechanism, like PAGG did.

[Devel] Re: containers development plans

2007-07-05 Thread Paul Jackson
Could someone explain how these directions impact Paul Menage's container patches and, the one I care about the most, kernel/cpuset.c? -- I won't rest till it's the best ... Programmer, Linux Scalability Paul Jackson <[EMAIL PROTECTED]> 1.925.

[Devel] Re: containers development plans

2007-07-05 Thread Cedric Le Goater
Hello, some more comments on what we talked about at OLS and what we are working on. Serge E. Hallyn wrote: > We are trying to create a roadmap for the next year of > 'container' development, to be reported to the upcoming kernel > summit. Containers here is a bit of an ambiguous term, so we ar

[Devel] Re: [-mm PATCH 0/7] Memory controller introduction

2007-07-05 Thread Balbir Singh
Hi, Pavel, Pavel Emelianov wrote: > Balbir Singh wrote: > > As far as I remember at OLS we decided to implement per-zone RLU > lists and reuse the lru lock as well. This will remove all the > problems with per-container lists inconsistency. > It's there in the TODO list. It is easy to implemen

[Devel] netns summary (was Re: containers development plans)

2007-07-05 Thread Cedric Le Goater
Serge E. Hallyn wrote: > We are trying to create a roadmap for the next year of > 'container' development, to be reported to the upcoming kernel > summit. Containers here is a bit of an ambiguous term, so we are > taking it to mean all of: > > 1. namespaces > 2. process containers >

[Devel] Re: [-mm PATCH 0/7] Memory controller introduction

2007-07-05 Thread Pavel Emelianov
Balbir Singh wrote: > Resending with the patch numbering fixed and linux-mm copied > > This patchset implements another version of the memory controller. These > patches have been through a big churn, the first set of patches were posted > last year and earlier this year at > http://lkml.org