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
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
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
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]>
-
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
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
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
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
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
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
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 +++
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
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]
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
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
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
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
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,
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:
>>
>>
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
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
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
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.
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.
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
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
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
>
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
28 matches
Mail list logo