[Devel] Re: containers and cgroups mini-summit @ Linux Plumbers

2012-07-30 Thread Andrea Righi
On Wed, Jul 25, 2012 at 02:00:41PM +0400, Glauber Costa wrote: On 07/25/2012 02:00 PM, Eric W. Biederman wrote: Glauber Costa glom...@parallels.com writes: On 07/12/2012 01:41 AM, Kir Kolyshkin wrote: Gentlemen, We are organizing containers mini-summit during next Linux Plumbers (San

[Devel] Re: [PATCH 0/5] blk-throttle: writeback and swap IO control

2011-02-23 Thread Andrea Righi
On Tue, Feb 22, 2011 at 07:03:58PM -0500, Vivek Goyal wrote: I think we should accept to have an inode granularity. We could redesign the writeback code to work per-cgroup / per-page, etc. but that would add a huge overhead. The limit of inode granularity could be an acceptable tradeoff,

[Devel] Re: [PATCH 4/5] blk-throttle: track buffered and anonymous pages

2011-02-23 Thread Andrea Righi
On Tue, Feb 22, 2011 at 07:07:19PM -0500, Vivek Goyal wrote: On Wed, Feb 23, 2011 at 12:05:34AM +0100, Andrea Righi wrote: On Tue, Feb 22, 2011 at 04:00:30PM -0500, Vivek Goyal wrote: On Tue, Feb 22, 2011 at 06:12:55PM +0100, Andrea Righi wrote: Add the tracking of buffered (writeback

[Devel] Re: [PATCH 3/5] page_cgroup: make page tracking available for blkio

2011-02-23 Thread Andrea Righi
On Wed, Feb 23, 2011 at 01:49:10PM +0900, KAMEZAWA Hiroyuki wrote: On Wed, 23 Feb 2011 00:37:18 +0100 Andrea Righi ari...@develer.com wrote: On Tue, Feb 22, 2011 at 06:06:30PM -0500, Vivek Goyal wrote: On Wed, Feb 23, 2011 at 12:01:47AM +0100, Andrea Righi wrote: On Tue, Feb 22, 2011

[Devel] Re: [PATCH 0/5] blk-throttle: writeback and swap IO control

2011-02-23 Thread Andrea Righi
On Wed, Feb 23, 2011 at 10:23:54AM -0500, Vivek Goyal wrote: Agreed. Granularity of per inode level might be accetable in many cases. Again, I am worried faster group getting stuck behind slower group. I am wondering if we are trying to solve the problem of ASYNC write

[Devel] [PATCH 0/5] blk-throttle: writeback and swap IO control

2011-02-22 Thread Andrea Righi
Currently the blkio.throttle controller only support synchronous IO requests. This means that we always look at the current task to identify the owner of each IO request. However dirty pages in the page cache can be wrote to disk asynchronously by the per-bdi flusher kernel threads or by any

[Devel] [PATCH 1/5] blk-cgroup: move blk-cgroup.h in include/linux/blk-cgroup.h

2011-02-22 Thread Andrea Righi
Move blk-cgroup.h in include/linux for generic usage. Signed-off-by: Andrea Righi ari...@develer.com --- block/blk-cgroup.c |2 +- block/blk-cgroup.h | 335 --- block/blk-throttle.c |2 +- block/cfq.h|2

[Devel] [PATCH 2/5] blk-cgroup: introduce task_to_blkio_cgroup()

2011-02-22 Thread Andrea Righi
Introduce a helper function to retrieve a blkio cgroup from a task. Signed-off-by: Andrea Righi ari...@develer.com --- block/blk-cgroup.c |7 +++ include/linux/blk-cgroup.h |4 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/block/blk-cgroup.c b/block/blk

[Devel] [PATCH 4/5] blk-throttle: track buffered and anonymous pages

2011-02-22 Thread Andrea Righi
layer, it is possible to retrieve the throttle group looking at the bio_page(bio). If the page was not explicitly associated to any cgroup the IO operation is charged to the current task/cgroup, as it was done by the previous implementation. Signed-off-by: Andrea Righi ari...@develer.com

[Devel] Re: [PATCH 4/5] blk-throttle: track buffered and anonymous pages

2011-02-22 Thread Andrea Righi
On Tue, Feb 22, 2011 at 10:42:41AM -0800, Chad Talbott wrote: On Tue, Feb 22, 2011 at 9:12 AM, Andrea Righi ari...@develer.com wrote: Add the tracking of buffered (writeback) and anonymous pages. ... ---  block/blk-throttle.c   |   87

[Devel] Re: [PATCH 0/5] blk-throttle: writeback and swap IO control

2011-02-22 Thread Andrea Righi
On Tue, Feb 22, 2011 at 02:34:03PM -0500, Vivek Goyal wrote: On Tue, Feb 22, 2011 at 06:12:51PM +0100, Andrea Righi wrote: Currently the blkio.throttle controller only support synchronous IO requests. This means that we always look at the current task to identify the owner of each IO

[Devel] Re: [PATCH 3/5] page_cgroup: make page tracking available for blkio

2011-02-22 Thread Andrea Righi
On Tue, Feb 22, 2011 at 01:01:45PM -0700, Jonathan Corbet wrote: On Tue, 22 Feb 2011 18:12:54 +0100 Andrea Righi ari...@develer.com wrote: The page_cgroup infrastructure, currently available only for the memory cgroup controller, can be used to store the owner of each page

[Devel] Re: [PATCH 4/5] blk-throttle: track buffered and anonymous pages

2011-02-22 Thread Andrea Righi
On Tue, Feb 22, 2011 at 03:49:28PM -0500, Vivek Goyal wrote: On Tue, Feb 22, 2011 at 10:42:41AM -0800, Chad Talbott wrote: On Tue, Feb 22, 2011 at 9:12 AM, Andrea Righi ari...@develer.com wrote: Add the tracking of buffered (writeback) and anonymous pages. ... ---  block/blk

[Devel] Re: [PATCH 3/5] page_cgroup: make page tracking available for blkio

2011-02-22 Thread Andrea Righi
On Tue, Feb 22, 2011 at 04:22:53PM -0500, Vivek Goyal wrote: On Tue, Feb 22, 2011 at 06:12:54PM +0100, Andrea Righi wrote: The page_cgroup infrastructure, currently available only for the memory cgroup controller, can be used to store the owner of each page and opportunely track

[Devel] Re: [PATCH 4/5] blk-throttle: track buffered and anonymous pages

2011-02-22 Thread Andrea Righi
On Tue, Feb 22, 2011 at 04:00:30PM -0500, Vivek Goyal wrote: On Tue, Feb 22, 2011 at 06:12:55PM +0100, Andrea Righi wrote: Add the tracking of buffered (writeback) and anonymous pages. Dirty pages in the page cache can be processed asynchronously by the per-bdi flusher kernel threads

[Devel] Re: [PATCH 3/5] page_cgroup: make page tracking available for blkio

2011-02-22 Thread Andrea Righi
On Tue, Feb 22, 2011 at 04:27:29PM -0700, Jonathan Corbet wrote: On Wed, 23 Feb 2011 00:01:47 +0100 Andrea Righi ari...@develer.com wrote: My immediate observation is that you're not really tracking the owner here - you're tracking an opaque 16-bit token known only to the block

[Devel] Re: [PATCH 3/5] page_cgroup: make page tracking available for blkio

2011-02-22 Thread Andrea Righi
On Tue, Feb 22, 2011 at 06:06:30PM -0500, Vivek Goyal wrote: On Wed, Feb 23, 2011 at 12:01:47AM +0100, Andrea Righi wrote: On Tue, Feb 22, 2011 at 01:01:45PM -0700, Jonathan Corbet wrote: On Tue, 22 Feb 2011 18:12:54 +0100 Andrea Righi ari...@develer.com wrote: The page_cgroup

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

2010-10-06 Thread Andrea Righi
On Wed, Oct 06, 2010 at 11:34:16AM -0700, Greg Thelen wrote: Andrea Righi ari...@develer.com writes: 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

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

2010-10-05 Thread Andrea Righi
with: - memory.dirty_ratio - memory.dirty_bytes Background write-out is controlled with: - memory.dirty_background_ratio - memory.dirty_background_bytes Signed-off-by: Andrea Righi ari...@develer.com Signed-off-by: Greg Thelen gthe...@google.com Acked-by: KAMEZAWA Hiroyuki

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

2010-10-05 Thread Andrea Righi
these new routines. A small note below. Signed-off-by: Greg Thelen gthe...@google.com Signed-off-by: Andrea Righi ari...@develer.com --- include/linux/memcontrol.h | 44 +++ mm/memcontrol.c| 180 +++- 2 files changed, 223 insertions

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

2010-10-05 Thread Andrea Righi
writers, they will not be able to consume more than their designated share of dirty pages and will be forced to perform write-out if they cross that limit. These patches were developed and tested on mmotm 2010-09-28-16-13. The patches are based on a series proposed by Andrea Righi

[Devel] [RFC] [PATCH 0/2] memcg: per cgroup dirty limit

2010-03-30 Thread Andrea Righi
Control the maximum amount of dirty pages a cgroup can have at any given time. Per cgroup dirty limit is like fixing the max amount of dirty (hard to reclaim) page cache used by any cgroup. So, in case of multiple cgroup writers, they will not be able to consume more than their designated share

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

2010-03-30 Thread Andrea Righi
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 ++ fs/nilfs2/segment.c |8 - mm/filemap.c|1 + mm/page

[Devel] [PATCH 1/2] memcg: dirty pages accounting and limiting infrastructure

2010-03-30 Thread Andrea Righi
Infrastructure to account dirty pages per cgroup + add memory.dirty_bytes limit in cgroupfs. Signed-off-by: Andrea Righi ari...@develer.com --- include/linux/memcontrol.h | 31 ++ mm/memcontrol.c| 218 +++- 2 files changed, 248

[Devel] Re: [PATCH 1/2] memcg: dirty pages accounting and limiting infrastructure

2010-03-30 Thread Andrea Righi
On Sun, Feb 21, 2010 at 01:28:35PM -0800, David Rientjes wrote: [snip] +static struct mem_cgroup *get_mem_cgroup_from_page(struct page *page) +{ + struct page_cgroup *pc; + struct mem_cgroup *mem = NULL; + + pc = lookup_page_cgroup(page); + if (unlikely(!pc)) +

[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 1/2] memcg: dirty pages accounting and limiting infrastructure

2010-03-30 Thread Andrea Righi
On Mon, Feb 22, 2010 at 09:44:42PM +0530, Balbir Singh wrote: [snip] +void mem_cgroup_charge_dirty(struct page *page, + enum zone_stat_item idx, int charge) +{ + struct mem_cgroup *mem; + struct mem_cgroup_stat_cpu *cpustat; + unsigned long flags; + int cpu;

[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: [RFC] [PATCH 0/2] memcg: per cgroup dirty limit

2010-03-30 Thread Andrea Righi
On Mon, Feb 22, 2010 at 01:29:34PM -0500, Vivek Goyal wrote: I would't like to add many different interfaces to do the same thing. I'd prefer to choose just one interface and always use it. We just have to define which is the best one. IMHO dirty_bytes is more generic. If we want to define

[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 a/mm/page

[Devel] [PATCH -mmotm 0/2] memcg: per cgroup dirty limit (v2)

2010-03-30 Thread Andrea Righi
Control the maximum amount of dirty pages a cgroup can have at any given time. Per cgroup dirty limit is like fixing the max amount of dirty (hard to reclaim) page cache used by any cgroup. So, in case of multiple cgroup writers, they will not be able to consume more than their designated share

[Devel] [PATCH -mmotm 1/2] memcg: dirty pages accounting and limiting infrastructure

2010-03-30 Thread Andrea Righi
Infrastructure to account dirty pages per cgroup and add dirty limit interfaces in the cgroupfs: - Active write-out: memory.dirty_ratio, memory.dirty_bytes - Background write-out: memory.dirty_background_ratio, memory.dirty_background_bytes Signed-off-by: Andrea Righi ari...@develer.com

[Devel] [PATCH -mmotm 2/2] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
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 |5 +++ fs/nfs/write.c |4 ++ fs/nilfs2/segment.c | 10 +- mm/filemap.c|1 + mm/page

[Devel] [PATCH -mmotm 0/3] memcg: per cgroup dirty limit (v3)

2010-03-30 Thread Andrea Righi
Control the maximum amount of dirty pages a cgroup can have at any given time. Per cgroup dirty limit is like fixing the max amount of dirty (hard to reclaim) page cache used by any cgroup. So, in case of multiple cgroup writers, they will not be able to consume more than their designated share

[Devel] [PATCH -mmotm 1/3] memcg: dirty memory documentation

2010-03-30 Thread Andrea Righi
Document cgroup dirty memory interfaces and statistics. Signed-off-by: Andrea Righi ari...@develer.com --- Documentation/cgroups/memory.txt | 36 1 files changed, 36 insertions(+), 0 deletions(-) diff --git a/Documentation/cgroups/memory.txt b

[Devel] Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
returned from mem_cgroup_page_stat() can be negative, i.e. when memory cgroup is disabled. We could simply use a long for dirty, the unit is in # of pages so s64 should be enough. Or cast dirty to long only for the check (see below). Thanks! -Andrea Signed-off-by: Andrea Righi ari...@develer.com

[Devel] Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
On Tue, Mar 02, 2010 at 09:23:09AM +0900, KAMEZAWA Hiroyuki wrote: On Mon, 1 Mar 2010 22:23:40 +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

[Devel] Re: [PATCH -mmotm 2/3] memcg: dirty pages accounting and limiting infrastructure

2010-03-30 Thread Andrea Righi
On Tue, Mar 02, 2010 at 12:04:53PM +0200, Kirill A. Shutemov wrote: [snip] +static inline s64 mem_cgroup_page_stat(enum mem_cgroup_page_stat_item item) +{ +       return -ENOMEM; Why ENOMEM? Probably, EINVAL or ENOSYS? OK, ENOSYS is more appropriate IMHO. +static s64

[Devel] Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
On Tue, Mar 02, 2010 at 12:11:10PM +0200, Kirill A. Shutemov wrote: On Mon, Mar 1, 2010 at 11:23 PM, 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

[Devel] Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
On Tue, Mar 02, 2010 at 01:09:24PM +0200, Kirill A. Shutemov wrote: On Tue, Mar 2, 2010 at 1:02 PM, Andrea Righi ari...@develer.com wrote: On Tue, Mar 02, 2010 at 12:11:10PM +0200, Kirill A. Shutemov wrote: On Mon, Mar 1, 2010 at 11:23 PM, Andrea Righi ari...@develer.com wrote: Apply

[Devel] Re: [PATCH -mmotm 2/3] memcg: dirty pages accounting and limiting infrastructure

2010-03-30 Thread Andrea Righi
On Tue, Mar 02, 2010 at 06:32:24PM +0530, Balbir Singh wrote: [snip] +extern long mem_cgroup_dirty_ratio(void); +extern unsigned long mem_cgroup_dirty_bytes(void); +extern long mem_cgroup_dirty_background_ratio(void); +extern unsigned long mem_cgroup_dirty_background_bytes(void); +

[Devel] Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
On Tue, Mar 02, 2010 at 02:48:56PM +0100, Peter Zijlstra wrote: On Mon, 2010-03-01 at 22:23 +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 --- diff

[Devel] Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
On Tue, Mar 02, 2010 at 07:20:26PM +0530, Balbir Singh wrote: * KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com [2010-03-02 17:23:16]: On Tue, 2 Mar 2010 09:01:58 +0100 Andrea Righi ari...@develer.com wrote: On Tue, Mar 02, 2010 at 09:23:09AM +0900, KAMEZAWA Hiroyuki wrote

[Devel] Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
On Tue, Mar 02, 2010 at 10:05:29AM -0500, Vivek Goyal wrote: On Mon, Mar 01, 2010 at 11:18:31PM +0100, Andrea Righi wrote: On Mon, Mar 01, 2010 at 05:02:08PM -0500, Vivek Goyal wrote: @@ -686,10 +699,14 @@ void throttle_vm_writeout(gfp_t gfp_mask

[Devel] Re: [PATCH -mmotm 2/3] memcg: dirty pages accounting and limiting infrastructure

2010-03-30 Thread Andrea Righi
On Tue, Mar 02, 2010 at 10:08:17AM -0800, Greg Thelen wrote: Comments below. Yet to be tested on my end, but I will test it. On Mon, Mar 1, 2010 at 1:23 PM, Andrea Righi ari...@develer.com wrote: Infrastructure to account dirty pages per cgroup and add dirty limit interfaces

[Devel] Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
On Tue, Mar 02, 2010 at 06:59:32PM -0500, Vivek Goyal wrote: On Tue, Mar 02, 2010 at 11:22:48PM +0100, Andrea Righi wrote: On Tue, Mar 02, 2010 at 10:05:29AM -0500, Vivek Goyal wrote: On Mon, Mar 01, 2010 at 11:18:31PM +0100, Andrea Righi wrote: On Mon, Mar 01, 2010 at 05:02:08PM -0500

[Devel] Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
On Wed, Mar 03, 2010 at 08:21:07AM +0900, Daisuke Nishimura wrote: On Tue, 2 Mar 2010 23:18:23 +0100, Andrea Righi ari...@develer.com wrote: On Tue, Mar 02, 2010 at 07:20:26PM +0530, Balbir Singh wrote: * KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com [2010-03-02 17:23:16

[Devel] Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
On Wed, Mar 03, 2010 at 05:21:32PM +0900, KAMEZAWA Hiroyuki wrote: On Wed, 3 Mar 2010 15:15:49 +0900 KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: Agreed. Let's try how we can write a code in clean way. (we have time ;) For now, to me, IRQ disabling while lock_page_cgroup()

[Devel] Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
On Wed, Mar 03, 2010 at 12:47:03PM +0100, Andrea Righi wrote: On Tue, Mar 02, 2010 at 06:59:32PM -0500, Vivek Goyal wrote: On Tue, Mar 02, 2010 at 11:22:48PM +0100, Andrea Righi wrote: On Tue, Mar 02, 2010 at 10:05:29AM -0500, Vivek Goyal wrote: On Mon, Mar 01, 2010 at 11:18:31PM +0100

[Devel] Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
On Wed, Mar 03, 2010 at 11:07:35AM +0100, Peter Zijlstra wrote: On Tue, 2010-03-02 at 23:14 +0100, Andrea Righi wrote: I agree mem_cgroup_has_dirty_limit() is nicer. But we must do that under RCU, so something like: rcu_read_lock(); if (mem_cgroup_has_dirty_limit

[Devel] Re: [PATCH -mmotm 3/3] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
On Wed, Mar 03, 2010 at 05:21:32PM +0900, KAMEZAWA Hiroyuki wrote: On Wed, 3 Mar 2010 15:15:49 +0900 KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: Agreed. Let's try how we can write a code in clean way. (we have time ;) For now, to me, IRQ disabling while lock_page_cgroup()

[Devel] [PATCH -mmotm 0/4] memcg: per cgroup dirty limit (v4)

2010-03-30 Thread Andrea Righi
Control the maximum amount of dirty pages a cgroup can have at any given time. Per cgroup dirty limit is like fixing the max amount of dirty (hard to reclaim) page cache used by any cgroup. So, in case of multiple cgroup writers, they will not be able to consume more than their designated share

[Devel] [PATCH -mmotm 1/4] memcg: dirty memory documentation

2010-03-30 Thread Andrea Righi
Document cgroup dirty memory interfaces and statistics. Signed-off-by: Andrea Righi ari...@develer.com --- Documentation/cgroups/memory.txt | 36 1 files changed, 36 insertions(+), 0 deletions(-) diff --git a/Documentation/cgroups/memory.txt b

[Devel] [PATCH -mmotm 2/4] page_cgroup: introduce file cache flags

2010-03-30 Thread Andrea Righi
Introduce page_cgroup flags to keep track of file cache pages. Signed-off-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Signed-off-by: Andrea Righi ari...@develer.com --- include/linux/page_cgroup.h | 49 +++ 1 files changed, 49 insertions(+), 0

[Devel] [PATCH -mmotm 3/4] memcg: dirty pages accounting and limiting infrastructure

2010-03-30 Thread Andrea Righi
Infrastructure to account dirty pages per cgroup and add dirty limit interfaces in the cgroupfs: - Direct write-out: memory.dirty_ratio, memory.dirty_bytes - Background write-out: memory.dirty_background_ratio, memory.dirty_background_bytes Signed-off-by: Andrea Righi ari...@develer.com

[Devel] [PATCH -mmotm 4/4] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
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 |5 +++ fs/nfs/write.c |4 ++ fs/nilfs2/segment.c | 11 +- mm/filemap.c|1 + mm/page

[Devel] Re: [PATCH -mmotm 4/4] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
On Thu, Mar 04, 2010 at 11:18:28AM -0500, Vivek Goyal wrote: On Thu, Mar 04, 2010 at 11:40:15AM +0100, Andrea Righi wrote: [..] diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 5a0f8f3..c5d14ea 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -137,13 +137,16

[Devel] Re: [PATCH -mmotm 0/4] memcg: per cgroup dirty limit (v4)

2010-03-30 Thread Andrea Righi
On Thu, Mar 04, 2010 at 10:41:43PM +0530, Balbir Singh wrote: * Andrea Righi ari...@develer.com [2010-03-04 11:40:11]: Control the maximum amount of dirty pages a cgroup can have at any given time. Per cgroup dirty limit is like fixing the max amount of dirty (hard to reclaim

[Devel] Re: [PATCH -mmotm 4/4] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
On Thu, Mar 04, 2010 at 02:41:44PM -0500, Vivek Goyal wrote: On Thu, Mar 04, 2010 at 11:40:15AM +0100, Andrea Righi wrote: [..] diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 5a0f8f3..c5d14ea 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -137,13 +137,16

[Devel] Re: [PATCH -mmotm 3/4] memcg: dirty pages accounting and limiting infrastructure

2010-03-30 Thread Andrea Righi
On Fri, Mar 05, 2010 at 10:12:34AM +0900, Daisuke Nishimura wrote: On Thu, 4 Mar 2010 11:40:14 +0100, Andrea Righi ari...@develer.com wrote: Infrastructure to account dirty pages per cgroup and add dirty limit interfaces in the cgroupfs: - Direct write-out: memory.dirty_ratio

[Devel] Re: [PATCH -mmotm 3/4] memcg: dirty pages accounting and limiting infrastructure

2010-03-30 Thread Andrea Righi
On Fri, Mar 05, 2010 at 10:58:55AM +0900, KAMEZAWA Hiroyuki wrote: On Fri, 5 Mar 2010 10:12:34 +0900 Daisuke Nishimura nishim...@mxp.nes.nec.co.jp wrote: On Thu, 4 Mar 2010 11:40:14 +0100, Andrea Righi ari...@develer.com wrote: Infrastructure to account dirty pages per cgroup and add

[Devel] Re: [PATCH -mmotm 2/4] page_cgroup: introduce file cache flags

2010-03-30 Thread Andrea Righi
On Fri, Mar 05, 2010 at 12:02:49PM +0530, Balbir Singh wrote: * Andrea Righi ari...@develer.com [2010-03-04 11:40:13]: Introduce page_cgroup flags to keep track of file cache pages. Signed-off-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Signed-off-by: Andrea Righi ari

[Devel] Re: [PATCH -mmotm 4/4] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
On Fri, Mar 05, 2010 at 12:08:43PM +0530, Balbir Singh wrote: * Andrea Righi ari...@develer.com [2010-03-04 11:40:15]: Apply the cgroup dirty pages accounting and limiting infrastructure to the opportune kernel functions. Signed-off-by: Andrea Righi ari...@develer.com --- fs/fuse

[Devel] [PATCH -mmotm 0/4] memcg: per cgroup dirty limit (v5)

2010-03-30 Thread Andrea Righi
Control the maximum amount of dirty pages a cgroup can have at any given time. Per cgroup dirty limit is like fixing the max amount of dirty (hard to reclaim) page cache used by any cgroup. So, in case of multiple cgroup writers, they will not be able to consume more than their designated share

[Devel] [PATCH -mmotm 1/4] memcg: dirty memory documentation

2010-03-30 Thread Andrea Righi
Document cgroup dirty memory interfaces and statistics. Signed-off-by: Andrea Righi ari...@develer.com --- Documentation/cgroups/memory.txt | 36 1 files changed, 36 insertions(+), 0 deletions(-) diff --git a/Documentation/cgroups/memory.txt b

[Devel] [PATCH -mmotm 3/4] memcg: dirty pages accounting and limiting infrastructure

2010-03-30 Thread Andrea Righi
Infrastructure to account dirty pages per cgroup and to add dirty limit interface to the cgroupfs: - Direct write-out: memory.dirty_ratio, memory.dirty_bytes - Background write-out: memory.dirty_background_ratio, memory.dirty_background_bytes Signed-off-by: Andrea Righi ari...@develer.com

[Devel] [PATCH -mmotm 2/4] page_cgroup: introduce file cache flags

2010-03-30 Thread Andrea Righi
Introduce page_cgroup flags to keep track of file cache pages. Signed-off-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Signed-off-by: Andrea Righi ari...@develer.com --- include/linux/page_cgroup.h | 45 +++ 1 files changed, 45 insertions(+), 0

[Devel] Re: [PATCH mmotm 2.5/4] memcg: disable irq at page cgroup lock (Re: [PATCH -mmotm 3/4] memcg: dirty pages accounting and limiting infrastructure)

2010-03-30 Thread Andrea Righi
On Tue, Mar 09, 2010 at 10:29:28AM +0900, Daisuke Nishimura wrote: On Tue, 9 Mar 2010 09:19:14 +0900, KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: On Tue, 9 Mar 2010 01:12:52 +0100 Andrea Righi ari...@develer.com wrote: On Mon, Mar 08, 2010 at 05:31:00PM +0900, KAMEZAWA

[Devel] [PATCH -mmotm 5/5] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
again: this function isn't used anymore outside page writeback. Signed-off-by: Andrea Righi ari...@develer.com --- fs/nfs/write.c|4 + include/linux/writeback.h |2 - mm/filemap.c |1 + mm/page-writeback.c | 215

[Devel] [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock

2010-03-30 Thread Andrea Righi
From: Daisuke Nishimura nishim...@mxp.nes.nec.co.jp In current implementation, we don't have to disable irq at lock_page_cgroup() because the lock is never acquired in interrupt context. But we are going to call it in later patch in an interrupt context or with irq disabled, so this patch

[Devel] [PATCH -mmotm 0/5] memcg: per cgroup dirty limit (v6)

2010-03-30 Thread Andrea Righi
Control the maximum amount of dirty pages a cgroup can have at any given time. Per cgroup dirty limit is like fixing the max amount of dirty (hard to reclaim) page cache used by any cgroup. So, in case of multiple cgroup writers, they will not be able to consume more than their designated share

[Devel] [PATCH -mmotm 4/5] memcg: dirty pages accounting and limiting infrastructure

2010-03-30 Thread Andrea Righi
Infrastructure to account dirty pages per cgroup and add dirty limit interfaces in the cgroupfs: - Direct write-out: memory.dirty_ratio, memory.dirty_bytes - Background write-out: memory.dirty_background_ratio, memory.dirty_background_bytes Signed-off-by: Andrea Righi ari...@develer.com

[Devel] [PATCH -mmotm 3/5] page_cgroup: introduce file cache flags

2010-03-30 Thread Andrea Righi
Introduce page_cgroup flags to keep track of file cache pages. Signed-off-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Signed-off-by: Andrea Righi ari...@develer.com --- include/linux/page_cgroup.h | 26 ++ 1 files changed, 26 insertions(+), 0 deletions(-) diff

[Devel] [PATCH -mmotm 2/5] memcg: dirty memory documentation

2010-03-30 Thread Andrea Righi
Document cgroup dirty memory interfaces and statistics. Signed-off-by: Andrea Righi ari...@develer.com --- Documentation/cgroups/memory.txt | 36 1 files changed, 36 insertions(+), 0 deletions(-) diff --git a/Documentation/cgroups/memory.txt b

[Devel] Re: [PATCH -mmotm 0/5] memcg: per cgroup dirty limit (v6)

2010-03-30 Thread Andrea Righi
On Thu, Mar 11, 2010 at 09:39:13AM +0900, KAMEZAWA Hiroyuki wrote: On Wed, 10 Mar 2010 00:00:31 +0100 Andrea Righi ari...@develer.com wrote: Control the maximum amount of dirty pages a cgroup can have at any given time. Per cgroup dirty limit is like fixing the max amount of dirty

[Devel] Re: [PATCH -mmotm 0/5] memcg: per cgroup dirty limit (v6)

2010-03-30 Thread Andrea Righi
On Thu, Mar 11, 2010 at 06:42:44PM +0900, KAMEZAWA Hiroyuki wrote: On Thu, 11 Mar 2010 18:25:00 +0900 KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: Then, it's not problem that check pc-mem_cgroup is root cgroup or not without spinlock. == void mem_cgroup_update_stat(struct page

[Devel] Re: [PATCH -mmotm 4/5] memcg: dirty pages accounting and limiting infrastructure

2010-03-30 Thread Andrea Righi
On Wed, Mar 10, 2010 at 05:23:39PM -0500, Vivek Goyal wrote: On Wed, Mar 10, 2010 at 12:00:35AM +0100, Andrea Righi wrote: [..] - * Currently used to update mapped file statistics, but the routine can be - * generalized to update other statistics as well

[Devel] Re: [PATCH -mmotm 0/5] memcg: per cgroup dirty limit (v6)

2010-03-30 Thread Andrea Righi
On Fri, Mar 12, 2010 at 08:42:30AM +0900, KAMEZAWA Hiroyuki wrote: On Thu, 11 Mar 2010 10:03:07 -0500 Vivek Goyal vgo...@redhat.com wrote: On Thu, Mar 11, 2010 at 06:25:00PM +0900, KAMEZAWA Hiroyuki wrote: On Thu, 11 Mar 2010 10:14:25 +0100 Peter Zijlstra pet...@infradead.org wrote:

[Devel] Re: [PATCH -mmotm 0/5] memcg: per cgroup dirty limit (v6)

2010-03-30 Thread Andrea Righi
On Fri, Mar 12, 2010 at 09:03:26AM +0900, KAMEZAWA Hiroyuki wrote: On Fri, 12 Mar 2010 00:59:22 +0100 Andrea Righi ari...@develer.com wrote: On Thu, Mar 11, 2010 at 01:07:53PM -0500, Vivek Goyal wrote: On Wed, Mar 10, 2010 at 12:00:31AM +0100, Andrea Righi wrote: mmmh.. strange, on my

[Devel] Re: [PATCH -mmotm 0/5] memcg: per cgroup dirty limit (v6)

2010-03-30 Thread Andrea Righi
On Fri, Mar 12, 2010 at 08:52:44AM +0900, KAMEZAWA Hiroyuki wrote: On Fri, 12 Mar 2010 00:27:09 +0100 Andrea Righi ari...@develer.com wrote: On Thu, Mar 11, 2010 at 10:03:07AM -0500, Vivek Goyal wrote: I am still setting up the system to test whether we see any speedup in writeout

[Devel] Re: [PATCH -mmotm 0/5] memcg: per cgroup dirty limit (v6)

2010-03-30 Thread Andrea Righi
On Fri, Mar 12, 2010 at 10:14:11AM +0900, Daisuke Nishimura wrote: On Thu, 11 Mar 2010 18:42:44 +0900, KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: On Thu, 11 Mar 2010 18:25:00 +0900 KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: Then, it's not problem that check

[Devel] [PATCH -mmotm 3/5] page_cgroup: introduce file cache flags

2010-03-30 Thread Andrea Righi
Introduce page_cgroup flags to keep track of file cache pages. Signed-off-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Signed-off-by: Andrea Righi ari...@develer.com --- include/linux/page_cgroup.h | 22 +- 1 files changed, 21 insertions(+), 1 deletions(-) diff

[Devel] [PATCH -mmotm 0/5] memcg: per cgroup dirty limit (v7)

2010-03-30 Thread Andrea Righi
Control the maximum amount of dirty pages a cgroup can have at any given time. Per cgroup dirty limit is like fixing the max amount of dirty (hard to reclaim) page cache used by any cgroup. So, in case of multiple cgroup writers, they will not be able to consume more than their designated share

[Devel] [PATCH -mmotm 4/5] memcg: dirty pages accounting and limiting infrastructure

2010-03-30 Thread Andrea Righi
Infrastructure to account dirty pages per cgroup and add dirty limit interfaces in the cgroupfs: - Direct write-out: memory.dirty_ratio, memory.dirty_bytes - Background write-out: memory.dirty_background_ratio, memory.dirty_background_bytes Signed-off-by: Andrea Righi ari...@develer.com

[Devel] [PATCH -mmotm 5/5] memcg: dirty pages instrumentation

2010-03-30 Thread Andrea Righi
again: this function isn't used anymore outside page writeback. Signed-off-by: Andrea Righi ari...@develer.com --- fs/nfs/write.c|4 + include/linux/writeback.h |2 - mm/filemap.c |1 + mm/page-writeback.c | 215

[Devel] Re: [PATCH -mmotm 1/5] memcg: disable irq at page cgroup lock

2010-03-30 Thread Andrea Righi
On Mon, Mar 15, 2010 at 09:06:38AM +0900, KAMEZAWA Hiroyuki wrote: On Mon, 15 Mar 2010 00:26:38 +0100 Andrea Righi ari...@develer.com wrote: From: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Now, file-mapped is maintaiend. But more generic update function will be needed for dirty

[Devel] Re: [PATCH -mmotm 0/5] memcg: per cgroup dirty limit (v7)

2010-03-30 Thread Andrea Righi
On Mon, Mar 15, 2010 at 11:36:12AM +0900, KAMEZAWA Hiroyuki wrote: On Mon, 15 Mar 2010 00:26:37 +0100 Andrea Righi ari...@develer.com wrote: Control the maximum amount of dirty pages a cgroup can have at any given time. Per cgroup dirty limit is like fixing the max amount of dirty

[Devel] Re: [PATCH -mmotm 0/5] memcg: per cgroup dirty limit (v6)

2010-03-30 Thread Andrea Righi
On Mon, Mar 15, 2010 at 10:38:41AM -0400, Vivek Goyal wrote: bdi_thres ~= per_memory_cgroup_dirty * bdi_fraction But bdi_nr_reclaimable and bdi_nr_writeback stats are still global. Why bdi_thresh of ROOT cgroup doesn't depend on global number ? I think in current

[Devel] Re: [PATCH -mmotm 4/5] memcg: dirty pages accounting and limiting infrastructure

2010-03-30 Thread Andrea Righi
On Tue, Mar 16, 2010 at 10:11:50AM -0400, Vivek Goyal wrote: On Tue, Mar 16, 2010 at 11:32:38AM +0900, Daisuke Nishimura wrote: [..] + * mem_cgroup_page_stat() - get memory cgroup file cache statistics + * @item:memory statistic item exported to the kernel + * + * Return

[Devel] Re: [PATCH -mmotm 2/5] memcg: dirty memory documentation

2010-03-30 Thread Andrea Righi
On Tue, Mar 16, 2010 at 04:41:21PM +0900, Daisuke Nishimura wrote: On Mon, 15 Mar 2010 00:26:39 +0100, Andrea Righi ari...@develer.com wrote: Document cgroup dirty memory interfaces and statistics. Signed-off-by: Andrea Righi ari...@develer.com --- Documentation/cgroups/memory.txt

[Devel] Re: [PATCH -mmotm 4/5] memcg: dirty pages accounting and limiting infrastructure

2010-03-30 Thread Andrea Righi
On Tue, Mar 16, 2010 at 11:32:38AM +0900, Daisuke Nishimura wrote: [snip] @@ -3190,10 +3512,14 @@ struct { } memcg_stat_strings[NR_MCS_STAT] = { {cache, total_cache}, {rss, total_rss}, - {mapped_file, total_mapped_file}, {pgpgin, total_pgpgin}, {pgpgout,

[Devel] Re: Performance numbers with IO throttling patches (Was: Re: IO scheduler based IO controller V10)

2009-10-17 Thread Andrea Righi
On Mon, Oct 12, 2009 at 05:11:20PM -0400, Vivek Goyal wrote: [snip] I modified my report scripts to also output aggreagate iops numbers and remove max-bandwidth and min-bandwidth numbers. So for same tests and same results I am now reporting iops numbers also. ( I have not re-run the tests.)

[Devel] Re: Performance numbers with IO throttling patches (Was: Re: IO scheduler based IO controller V10)

2009-10-10 Thread Andrea Righi
of processes with-in group. I have run the tests of these in the past and reported it here in the past. https://lists.linux-foundation.org/pipermail/containers/2009-May/017588.html Thanks Vivek -- Andrea Righi - Develer s.r.l http://www.develer.com

[Devel] Re: More performance numbers (Was: Re: IO scheduler based IO controller V10)

2009-10-08 Thread Andrea Righi
On Thu, Oct 08, 2009 at 12:42:51AM -0400, Vivek Goyal wrote: Apart from IO scheduler controller number, I also got a chance to run same tests with dm-ioband controller. I am posting these too. I am also planning to run similar numbers on Andrea's max bw controller also. Should be able to post

[Devel] Re: [PATCH] io-controller: Add io group reference handling for request

2009-05-27 Thread Andrea Righi
On Wed, May 27, 2009 at 03:56:31PM +0900, Ryo Tsuruta wrote: I think that only putting the hook in try_to_unmap() doesn't work correctly, because IOs will be charged to reclaiming processes or kswapd. These IOs should be charged to processes which cause memory pressure. Consider the

[Devel] Re: [PATCH] io-controller: Add io group reference handling for request

2009-05-18 Thread Andrea Righi
On Mon, May 18, 2009 at 10:01:14AM -0400, Vivek Goyal wrote: On Sun, May 17, 2009 at 12:26:06PM +0200, Andrea Righi wrote: On Fri, May 15, 2009 at 10:06:43AM -0400, Vivek Goyal wrote: On Fri, May 15, 2009 at 09:48:40AM +0200, Andrea Righi wrote: On Fri, May 15, 2009 at 01:15:24PM +0800

  1   2   3   4   >