[Devel] Re: [PATCH 01/10] memcg: add page_cgroup flags for dirty page tracking

2010-10-05 Thread KAMEZAWA Hiroyuki
On Sun, 3 Oct 2010 23:57:56 -0700 Greg Thelen gthe...@google.com wrote: Add additional flags to page_cgroup to track dirty pages within a mem_cgroup. Signed-off-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Signed-off-by: Andrea Righi ari...@develer.com Signed-off-by: Greg Thelen

[Devel] Re: [PATCH 02/10] memcg: document cgroup dirty memory interfaces

2010-10-05 Thread KAMEZAWA Hiroyuki
On Sun, 3 Oct 2010 23:57:57 -0700 Greg Thelen gthe...@google.com wrote: Document cgroup dirty memory interfaces and statistics. Signed-off-by: Andrea Righi ari...@develer.com Signed-off-by: Greg Thelen gthe...@google.com Nice. Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com

[Devel] Re: [PATCH 03/10] memcg: create extensible page stat update routines

2010-10-05 Thread KAMEZAWA Hiroyuki
On Sun, 3 Oct 2010 23:57:58 -0700 Greg Thelen gthe...@google.com wrote: Replace usage of the mem_cgroup_update_file_mapped() memcg statistic update routine with two new routines: * mem_cgroup_inc_page_stat() * mem_cgroup_dec_page_stat() As before, only the file_mapped statistic is

[Devel] Re: [PATCH 06/10] memcg: add kernel calls for memcg dirty page stats

2010-10-05 Thread KAMEZAWA Hiroyuki
On Sun, 3 Oct 2010 23:58:01 -0700 Greg Thelen gthe...@google.com wrote: Add calls into memcg dirty page accounting. Notify memcg when pages transition between clean, file dirty, writeback, and unstable nfs. This allows the memory controller to maintain an accurate view of the amount of its

[Devel] Re: [PATCH 04/10] memcg: disable local interrupts in lock_page_cgroup()

2010-10-05 Thread KAMEZAWA Hiroyuki
On Sun, 3 Oct 2010 23:57:59 -0700 Greg Thelen gthe...@google.com wrote: If pages are being migrated from a memcg, then updates to that memcg's page statistics are protected by grabbing a bit spin lock using lock_page_cgroup(). In an upcoming commit memcg dirty page accounting will be

[Devel] Re: [PATCH 03/10] memcg: create extensible page stat update routines

2010-10-05 Thread Greg Thelen
KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com writes: On Sun, 3 Oct 2010 23:57:58 -0700 Greg Thelen gthe...@google.com wrote: Replace usage of the mem_cgroup_update_file_mapped() memcg statistic update routine with two new routines: * mem_cgroup_inc_page_stat() *

[Devel] Re: [PATCH 07/10] memcg: add dirty limits to mem_cgroup

2010-10-05 Thread KAMEZAWA Hiroyuki
On Sun, 3 Oct 2010 23:58:02 -0700 Greg Thelen gthe...@google.com wrote: Extend mem_cgroup to contain dirty page limits. Also add routines allowing the kernel to query the dirty usage of a memcg. These interfaces not used by the kernel yet. A subsequent commit will add kernel calls to

[Devel] Re: [PATCH 04/10] memcg: disable local interrupts in lock_page_cgroup()

2010-10-05 Thread Greg Thelen
KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com writes: On Sun, 3 Oct 2010 23:57:59 -0700 Greg Thelen gthe...@google.com wrote: If pages are being migrated from a memcg, then updates to that memcg's page statistics are protected by grabbing a bit spin lock using lock_page_cgroup(). In an

[Devel] Re: [PATCH 08/10] memcg: add cgroupfs interface to memcg dirty limits

2010-10-05 Thread KAMEZAWA Hiroyuki
On Sun, 3 Oct 2010 23:58:03 -0700 Greg Thelen gthe...@google.com wrote: Add cgroupfs interface to memcg dirty page limits: Direct write-out is controlled with: - memory.dirty_ratio - memory.dirty_bytes Background write-out is controlled with: - memory.dirty_background_ratio

[Devel] Re: [PATCH 09/10] writeback: make determine_dirtyable_memory() static.

2010-10-05 Thread KAMEZAWA Hiroyuki
On Sun, 3 Oct 2010 23:58:04 -0700 Greg Thelen gthe...@google.com wrote: The determine_dirtyable_memory() function is not used outside of page writeback. Make the routine static. No functional change. Just a cleanup in preparation for a change that adds memcg dirty limits consideration into

[Devel] Re: [PATCH 05/10] memcg: add dirty page accounting infrastructure

2010-10-05 Thread KAMEZAWA Hiroyuki
On Sun, 3 Oct 2010 23:58:00 -0700 Greg Thelen gthe...@google.com wrote: Add memcg routines to track dirty, writeback, and unstable_NFS pages. These routines are not yet used by the kernel to count such pages. A later change adds kernel calls to these new routines. Signed-off-by: Greg

[Devel] Re: [PATCH 08/10] memcg: add cgroupfs interface to memcg dirty limits

2010-10-05 Thread Greg Thelen
KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com writes: On Sun, 3 Oct 2010 23:58:03 -0700 Greg Thelen gthe...@google.com wrote: Add cgroupfs interface to memcg dirty page limits: Direct write-out is controlled with: - memory.dirty_ratio - memory.dirty_bytes Background

[Devel] Re: [PATCH 10/10] memcg: check memcg dirty limits in page writeback

2010-10-05 Thread KAMEZAWA Hiroyuki
On Sun, 3 Oct 2010 23:58:05 -0700 Greg Thelen gthe...@google.com wrote: If the current process is in a non-root memcg, then global_dirty_limits() will consider the memcg dirty limit. This allows different cgroups to have distinct dirty limits which trigger direct and background writeback at

[Devel] Re: [PATCH 05/10] memcg: add dirty page accounting infrastructure

2010-10-05 Thread Greg Thelen
KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com writes: On Sun, 3 Oct 2010 23:58:00 -0700 Greg Thelen gthe...@google.com wrote: Add memcg routines to track dirty, writeback, and unstable_NFS pages. These routines are not yet used by the kernel to count such pages. A later change adds

[Devel] Re: [PATCH 08/10] memcg: add cgroupfs interface to memcg dirty limits

2010-10-05 Thread KAMEZAWA Hiroyuki
On Tue, 05 Oct 2010 00:33:15 -0700 Greg Thelen gthe...@google.com wrote: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com writes: On Sun, 3 Oct 2010 23:58:03 -0700 Greg Thelen gthe...@google.com wrote: Add cgroupfs interface to memcg dirty page limits: Direct write-out is

[Devel] Re: [PATCH 08/10] memcg: add cgroupfs interface to memcg dirty limits

2010-10-05 Thread Andrea Righi
On Tue, Oct 05, 2010 at 12:33:15AM -0700, Greg Thelen wrote: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com writes: On Sun, 3 Oct 2010 23:58:03 -0700 Greg Thelen gthe...@google.com wrote: Add cgroupfs interface to memcg dirty page limits: Direct write-out is controlled with:

[Devel] Re: [PATCH 07/10] memcg: add dirty limits to mem_cgroup

2010-10-05 Thread Andrea Righi
On Sun, Oct 03, 2010 at 11:58:02PM -0700, Greg Thelen wrote: Extend mem_cgroup to contain dirty page limits. Also add routines allowing the kernel to query the dirty usage of a memcg. These interfaces not used by the kernel yet. A subsequent commit will add kernel calls to utilize these

[Devel] Re: [PATCH 03/10] memcg: create extensible page stat update routines

2010-10-05 Thread Minchan Kim
On Sun, Oct 03, 2010 at 11:57:58PM -0700, Greg Thelen wrote: Replace usage of the mem_cgroup_update_file_mapped() memcg statistic update routine with two new routines: * mem_cgroup_inc_page_stat() * mem_cgroup_dec_page_stat() As before, only the file_mapped statistic is managed. However,

[Devel] Re: [PATCH 04/10] memcg: disable local interrupts in lock_page_cgroup()

2010-10-05 Thread Minchan Kim
On Sun, Oct 03, 2010 at 11:57:59PM -0700, Greg Thelen wrote: If pages are being migrated from a memcg, then updates to that memcg's page statistics are protected by grabbing a bit spin lock using lock_page_cgroup(). In an upcoming commit memcg dirty page accounting will be updating memcg page

[Devel] Re: [PATCH 05/10] memcg: add dirty page accounting infrastructure

2010-10-05 Thread Minchan Kim
On Sun, Oct 03, 2010 at 11:58:00PM -0700, Greg Thelen wrote: Add memcg routines to track dirty, writeback, and unstable_NFS pages. These routines are not yet used by the kernel to count such pages. A later change adds kernel calls to these new routines. Signed-off-by: Greg Thelen

[Devel] [RFC V1] Replace pid_t in autofs4 with struct pid reference.

2010-10-05 Thread Daniel Lezcano
I resurect and refreshed this old patch from https://lists.linux-foundation.org/pipermail/containers/2007-February/003726.html This patch makes automount to work within a container. Make autofs4 container-friendly by caching struct pid reference rather than pid_t and using pid_nr() to retreive a

[Devel] Re: [PATCH 08/10] memcg: add cgroupfs interface to memcg dirty limits

2010-10-05 Thread David Rientjes
On Tue, 5 Oct 2010, Andrea Righi wrote: mmh... looking at the code it seems the same behaviour, but in Documentation/sysctl/vm.txt we say a different thing (i.e., for dirty_bytes): If dirty_bytes is written, dirty_ratio becomes a function of its value (dirty_bytes / the amount of dirtyable

[Devel] Re: [PATCH 07/10] memcg: add dirty limits to mem_cgroup

2010-10-05 Thread Greg Thelen
Andrea Righi ari...@develer.com writes: On Sun, Oct 03, 2010 at 11:58:02PM -0700, Greg Thelen wrote: Extend mem_cgroup to contain dirty page limits. Also add routines allowing the kernel to query the dirty usage of a memcg. These interfaces not used by the kernel yet. A subsequent commit

[Devel] Re: [PATCH 1/1] cgroups: strcpy destination string overflow

2010-10-05 Thread Andrew Morton
On Tue, 5 Oct 2010 12:38:05 +0400 Evgeny Kuznetsov ext-eugeny.kuznet...@nokia.com wrote: From: Evgeny Kuznetsov ext-eugeny.kuznet...@nokia.com Function strcpy is used without check for maximum allowed source string length and could cause destination string overflow. Check for string length

[Devel] Re: [PATCH 1/1] cgroups: strcpy destination string overflow

2010-10-05 Thread Paul Menage
On Tue, Oct 5, 2010 at 12:48 PM, Andrew Morton a...@linux-foundation.org wrote: On Tue,  5 Oct 2010 12:38:05 +0400 Evgeny Kuznetsov ext-eugeny.kuznet...@nokia.com wrote: From: Evgeny Kuznetsov ext-eugeny.kuznet...@nokia.com Function strcpy is used without check for maximum allowed source

[Devel] Re: [PATCH 03/10] memcg: create extensible page stat update routines

2010-10-05 Thread Greg Thelen
Minchan Kim minchan@gmail.com writes: On Sun, Oct 03, 2010 at 11:57:58PM -0700, Greg Thelen wrote: Replace usage of the mem_cgroup_update_file_mapped() memcg statistic update routine with two new routines: * mem_cgroup_inc_page_stat() * mem_cgroup_dec_page_stat() As before, only the

[Devel] Re: [PATCH 00/10] memcg: per cgroup dirty page accounting

2010-10-05 Thread Andrea Righi
On Sun, Oct 03, 2010 at 11:57:55PM -0700, Greg Thelen wrote: This patch set provides the ability for each cgroup to have independent dirty page limits. Limiting dirty memory is like fixing the max amount of dirty (hard to reclaim) page cache used by a cgroup. So, in case of multiple cgroup

[Devel] Re: [PATCH 04/10] memcg: disable local interrupts in lock_page_cgroup()

2010-10-05 Thread Greg Thelen
Minchan Kim minchan@gmail.com writes: On Sun, Oct 03, 2010 at 11:57:59PM -0700, Greg Thelen wrote: If pages are being migrated from a memcg, then updates to that memcg's page statistics are protected by grabbing a bit spin lock using lock_page_cgroup(). In an upcoming commit memcg dirty

[Devel] Re: [PATCH 03/10] memcg: create extensible page stat update routines

2010-10-05 Thread Minchan Kim
On Wed, Oct 6, 2010 at 4:59 AM, Greg Thelen gthe...@google.com wrote: Minchan Kim minchan@gmail.com writes: On Sun, Oct 03, 2010 at 11:57:58PM -0700, Greg Thelen wrote: Replace usage of the mem_cgroup_update_file_mapped() memcg statistic update routine with two new routines: *

[Devel] Re: [PATCH 04/10] memcg: disable local interrupts in lock_page_cgroup()

2010-10-05 Thread Minchan Kim
On Wed, Oct 6, 2010 at 8:26 AM, Greg Thelen gthe...@google.com wrote: Minchan Kim minchan@gmail.com writes: On Sun, Oct 03, 2010 at 11:57:59PM -0700, Greg Thelen wrote: If pages are being migrated from a memcg, then updates to that memcg's page statistics are protected by grabbing a bit

[Devel] Re: [PATCH 10/10] memcg: check memcg dirty limits in page writeback

2010-10-05 Thread Minchan Kim
On Mon, Oct 4, 2010 at 3:58 PM, Greg Thelen gthe...@google.com wrote: If the current process is in a non-root memcg, then global_dirty_limits() will consider the memcg dirty limit. This allows different cgroups to have distinct dirty limits which trigger direct and background writeback at

[Devel] Re: [PATCH 01/10] memcg: add page_cgroup flags for dirty page tracking

2010-10-05 Thread Daisuke Nishimura
On Sun, 3 Oct 2010 23:57:56 -0700 Greg Thelen gthe...@google.com wrote: Add additional flags to page_cgroup to track dirty pages within a mem_cgroup. Signed-off-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Signed-off-by: Andrea Righi ari...@develer.com Signed-off-by: Greg Thelen

[Devel] Re: [PATCH 02/10] memcg: document cgroup dirty memory interfaces

2010-10-05 Thread Daisuke Nishimura
On Sun, 3 Oct 2010 23:57:57 -0700 Greg Thelen gthe...@google.com wrote: Document cgroup dirty memory interfaces and statistics. Signed-off-by: Andrea Righi ari...@develer.com Signed-off-by: Greg Thelen gthe...@google.com I think you will change nfs to nfs_unstable, but anyway, Acked-by:

[Devel] Re: [PATCH 00/10] memcg: per cgroup dirty page accounting

2010-10-05 Thread Balbir Singh
* Greg Thelen gthe...@google.com [2010-10-03 23:57:55]: This patch set provides the ability for each cgroup to have independent dirty page limits. Limiting dirty memory is like fixing the max amount of dirty (hard to reclaim) page cache used by a cgroup. So, in case of multiple cgroup

[Devel] Re: C/R and stdio redirection

2010-10-05 Thread Sukadev Bhattiprolu
Greg Kurz [gk...@fr.ibm.com] wrote: | On Tue, 2010-09-07 at 13:03 -0700, Sukadev Bhattiprolu wrote: | Suppose we create a container and redirect its stdout/stderr as follows: | | lxc-execute -name foo -- /path/to/app /tmp/xyz.out 21 | | If we attempt to checkpoint the container 'foo',