[Devel] Re: [PATCH 2/2] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
On Sun, Feb 21, 2010 at 01:38:28PM -0800, David Rientjes wrote: On Sun, 21 Feb 2010, Andrea Righi wrote: diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 0b19943..c9ff1cd 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -137,10 +137,11 @@ static struct

[Devel] Re: [PATCH 2/2] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
On Mon, Feb 22, 2010 at 09:32:21AM +0900, KAMEZAWA Hiroyuki wrote: - if (vm_dirty_bytes) - dirty = DIV_ROUND_UP(vm_dirty_bytes, PAGE_SIZE); + dirty_bytes = mem_cgroup_dirty_bytes(); + if (dirty_bytes) + dirty = DIV_ROUND_UP(dirty_bytes, PAGE_SIZE); else {

[Devel] Re: [PATCH 2/2] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
On Mon, Feb 22, 2010 at 11:52:15AM -0500, Vivek Goyal wrote: unsigned long determine_dirtyable_memory(void) { - unsigned long x; - - x = global_page_state(NR_FREE_PAGES) + global_reclaimable_pages(); - + unsigned long memcg_memory, memory; + + memory =

[Devel] Re: [PATCH 2/2] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
On Tue, Feb 23, 2010 at 10:40:40AM +0100, Andrea Righi wrote: If vm_highmem_is_dirtyable=0, In that case, we can still return with memcg_memory which can be more than memory. IOW, highmem is not dirtyable system wide but still we can potetially return back saying for this cgroup we can

[Devel] Re: [PATCH 2/2] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
On Tue, Feb 23, 2010 at 02:22:12PM -0800, David Rientjes wrote: On Tue, 23 Feb 2010, Vivek Goyal wrote: Because you have modified dirtyable_memory() and made it per cgroup, I think it automatically takes care of the cases of per cgroup dirty ratio, I mentioned in my previous

[Devel] Re: [PATCH 2/2] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
On Tue, Feb 23, 2010 at 04:29:43PM -0500, Vivek Goyal wrote: On Sun, Feb 21, 2010 at 04:18:45PM +0100, Andrea Righi wrote: [..] diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 0b19943..c9ff1cd 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -137,10 +137,11

[Devel] Re: [PATCH 2/2] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
On Fri, Feb 26, 2010 at 04:48:11PM -0500, Vivek Goyal wrote: On Thu, Feb 25, 2010 at 04:12:11PM +0100, Andrea Righi wrote: On Tue, Feb 23, 2010 at 04:29:43PM -0500, Vivek Goyal wrote: On Sun, Feb 21, 2010 at 04:18:45PM +0100, Andrea Righi wrote: [..] diff --git

[Devel] Re: [PATCH 2/2] memcg: dirty pages instrumentation

2010-02-28 Thread KAMEZAWA Hiroyuki
On Fri, 26 Feb 2010 16:48:11 -0500 Vivek Goyal vgo...@redhat.com wrote: On Thu, Feb 25, 2010 at 04:12:11PM +0100, Andrea Righi wrote: On Tue, Feb 23, 2010 at 04:29:43PM -0500, Vivek Goyal wrote: On Sun, Feb 21, 2010 at 04:18:45PM +0100, Andrea Righi wrote: Because bdi_thres calculation

[Devel] Re: [PATCH 2/2] memcg: dirty pages instrumentation

2010-02-26 Thread Vivek Goyal
On Thu, Feb 25, 2010 at 04:12:11PM +0100, Andrea Righi wrote: On Tue, Feb 23, 2010 at 04:29:43PM -0500, Vivek Goyal wrote: On Sun, Feb 21, 2010 at 04:18:45PM +0100, Andrea Righi wrote: [..] diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 0b19943..c9ff1cd 100644 ---

[Devel] Re: [PATCH 2/2] memcg: dirty pages instrumentation

2010-02-26 Thread Vivek Goyal
On Fri, Feb 26, 2010 at 11:21:21PM +0100, Andrea Righi wrote: On Fri, Feb 26, 2010 at 04:48:11PM -0500, Vivek Goyal wrote: On Thu, Feb 25, 2010 at 04:12:11PM +0100, Andrea Righi wrote: On Tue, Feb 23, 2010 at 04:29:43PM -0500, Vivek Goyal wrote: On Sun, Feb 21, 2010 at 04:18:45PM +0100,

[Devel] Re: [PATCH 2/2] memcg: dirty pages instrumentation

2010-02-25 Thread KAMEZAWA Hiroyuki
On Thu, 25 Feb 2010 15:34:44 +0100 Andrea Righi ari...@develer.com wrote: On Tue, Feb 23, 2010 at 02:22:12PM -0800, David Rientjes wrote: On Tue, 23 Feb 2010, Vivek Goyal wrote: Because you have modified dirtyable_memory() and made it per cgroup, I think it automatically takes

[Devel] Re: [PATCH 2/2] memcg: dirty pages instrumentation

2010-02-23 Thread Vivek Goyal
On Tue, Feb 23, 2010 at 10:40:40AM +0100, Andrea Righi wrote: On Mon, Feb 22, 2010 at 11:52:15AM -0500, Vivek Goyal wrote: unsigned long determine_dirtyable_memory(void) { - unsigned long x; - - x = global_page_state(NR_FREE_PAGES) + global_reclaimable_pages(); - + unsigned

[Devel] Re: [PATCH 2/2] memcg: dirty pages instrumentation

2010-02-23 Thread Vivek Goyal
On Sun, Feb 21, 2010 at 04:18:45PM +0100, Andrea Righi wrote: [..] diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 0b19943..c9ff1cd 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -137,10 +137,11 @@ static struct prop_descriptor vm_dirties; */ static int

[Devel] Re: [PATCH 2/2] memcg: dirty pages instrumentation

2010-02-23 Thread David Rientjes
On Tue, 23 Feb 2010, Vivek Goyal wrote: Because you have modified dirtyable_memory() and made it per cgroup, I think it automatically takes care of the cases of per cgroup dirty ratio, I mentioned in my previous mail. So we will use system wide dirty ratio to calculate the allowed

[Devel] Re: [PATCH 2/2] memcg: dirty pages instrumentation

2010-02-22 Thread Vivek Goyal
On Sun, Feb 21, 2010 at 04:18:45PM +0100, Andrea Righi wrote: Apply the cgroup dirty pages accounting and limiting infrastructure to the opportune kernel functions. Signed-off-by: Andrea Righi ari...@develer.com --- fs/fuse/file.c |3 ++ fs/nfs/write.c |3 ++

[Devel] Re: [PATCH 2/2] memcg: dirty pages instrumentation

2010-02-22 Thread Peter Zijlstra
On Sun, 2010-02-21 at 16:18 +0100, Andrea Righi wrote: @@ -137,10 +137,11 @@ static struct prop_descriptor vm_dirties; */ static int calc_period_shift(void) { - unsigned long dirty_total; + unsigned long dirty_total, dirty_bytes; - if (vm_dirty_bytes) -

[Devel] Re: [PATCH 2/2] memcg: dirty pages instrumentation

2010-02-21 Thread David Rientjes
On Sun, 21 Feb 2010, Andrea Righi wrote: diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 0b19943..c9ff1cd 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -137,10 +137,11 @@ static struct prop_descriptor vm_dirties; */ static int calc_period_shift(void) { -

[Devel] Re: [PATCH 2/2] memcg: dirty pages instrumentation

2010-02-21 Thread KAMEZAWA Hiroyuki
On Sun, 21 Feb 2010 16:18:45 +0100 Andrea Righi ari...@develer.com wrote: Apply the cgroup dirty pages accounting and limiting infrastructure to the opportune kernel functions. Signed-off-by: Andrea Righi ari...@develer.com I think there are design confusion with 1st patch. ---