[Devel] Re: + memcg-fix-deadlock-between-cpuset-and-memcg.patch added to -mm tree

2011-01-05 Thread Daisuke Nishimura
(resend with adding Cc: containers and linux-mm) Hi, Andrew. Thank you for picking up this patch. But this version has a small race problem. This is a fix-up patch. === From: Daisuke Nishimura nishim...@mxp.nes.nec.co.jp We must clear mc.moving_task before waking up all waiters at the end

[Devel] [RFC][BUGFIX] memcg: fix dead lock between cpuset and memcg (Re: [PATCH v5 3/3] cgroups: make procs file writable)

2010-12-27 Thread Daisuke Nishimura
b1dd693e introduces, and deadlock which the commit fixed). I'll test and resend this after new year holidays in Japan. === From: Daisuke Nishimura nishim...@mxp.nes.nec.co.jp The commit b1dd693e(memcg: avoid deadlock between move charge and try_charge()) can cause another deadlock about mmap_sem

[Devel] Re: [PATCH v5 3/3] cgroups: make procs file writable

2010-12-26 Thread Daisuke Nishimura
, Daisuke Nishimura. ___ Containers mailing list contain...@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers ___ Devel mailing list Devel@openvz.org https://openvz.org/mailman

[Devel] Re: [PATCH v2][memcg+dirtylimit] Fix overwriting global vm dirty limit setting by memcg (Re: [PATCH v3 00/11] memcg: per cgroup dirty page accounting

2010-10-24 Thread Daisuke Nishimura
. Can you take it into account too ? Thanks, Daisuke Nishimura. ___ Containers mailing list contain...@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers ___ Devel mailing

[Devel] Re: [PATCH v2][memcg+dirtylimit] Fix overwriting global vm dirty limit setting by memcg (Re: [PATCH v3 00/11] memcg: per cgroup dirty page accounting

2010-10-20 Thread Daisuke Nishimura
. This patch limits the return value of vm_dirty_param() considring global settings. Changelog: - fixed an argument mem int to u64 - fixed to use global available memory to cap memcg's value. Signed-off-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Acked-by: Daisuke Nishimura

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

2010-10-19 Thread Daisuke Nishimura
memory that is dirty. Signed-off-by: Greg Thelen gthe...@google.com Signed-off-by: Andrea Righi ari...@develer.com Reviewed-by: Daisuke Nishimura nishim...@mxp.nes.nec.co.jp ___ Containers mailing list contain...@lists.linux-foundation.org https

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

2010-10-19 Thread Daisuke Nishimura
accounting. -- 1.7.1 Can you clarify whether we can limit the total dirty pages under hierarchy in use_hierarchy==1 case ? If we can, I think it would be better to note it in this documentation. Thanks, Daisuke Nishimura. ___ Containers mailing list

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

2010-10-19 Thread Daisuke Nishimura
usage_in_bytes never exceeds limit_in_bytes. Thanks, Daisuke Nishimura. ___ Containers mailing list contain...@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers ___ Devel

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

2010-10-19 Thread Daisuke Nishimura
+static unsigned long long +memcg_hierarchical_free_pages(struct mem_cgroup *mem) +{ + struct cgroup *cgroup; + unsigned long long min_free, free; + + min_free = res_counter_read_u64(mem-res, RES_LIMIT) - + res_counter_read_u64(mem-res, RES_USAGE); + cgroup =

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

2010-10-19 Thread Daisuke Nishimura
Thelen gthe...@google.com Signed-off-by: Andrea Righi ari...@develer.com Acked-by: Daisuke Nishimura nishim...@mxp.nes.nec.co.jp ___ Containers mailing list contain...@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers

[Devel] Re: [PATCH v3 09/11] memcg: add cgroupfs interface to memcg dirty limits

2010-10-19 Thread Daisuke Nishimura
...@develer.com Signed-off-by: Balbir Singh bal...@linux.vnet.ibm.com Signed-off-by: Greg Thelen gthe...@google.com Acked-by: Daisuke Nishimura nishim...@mxp.nes.nec.co.jp One question: shouldn't we return -EINVAL when writing to dirty(_background)_limit_bytes a bigger value than that of global

[Devel] Re: [PATCH v3 09/11] memcg: add cgroupfs interface to memcg dirty limits

2010-10-19 Thread Daisuke Nishimura
On Wed, 20 Oct 2010 12:31:10 +0900 Daisuke Nishimura nishim...@mxp.nes.nec.co.jp wrote: On Mon, 18 Oct 2010 17:39:42 -0700 Greg Thelen gthe...@google.com wrote: Add cgroupfs interface to memcg dirty page limits: Direct write-out is controlled with: - memory.dirty_ratio

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

2010-10-19 Thread Daisuke Nishimura
On Wed, 20 Oct 2010 11:24:31 +0900 KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: On Wed, 20 Oct 2010 10:14:21 +0900 KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: On Wed, 20 Oct 2010 09:48:21 +0900 Daisuke Nishimura nishim...@mxp.nes.nec.co.jp wrote: On Wed, 20

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

2010-10-19 Thread Daisuke Nishimura
into global_dirty_limits(). Signed-off-by: Andrea Righi ari...@develer.com Signed-off-by: Greg Thelen gthe...@google.com Reviewed-by: Daisuke Nishimura nishim...@mxp.nes.nec.co.jp ___ Containers mailing list contain...@lists.linux-foundation.org https

[Devel] Re: [PATCH v3 08/11] memcg: CPU hotplug lockdep warning fix

2010-10-19 Thread Daisuke Nishimura
-by: Greg Thelen gthe...@google.com Signed-off-by: Balbir Singh bal...@linux.vnet.ibm.com Acked-by: Daisuke Nishimura nishim...@mxp.nes.nec.co.jp ___ Containers mailing list contain...@lists.linux-foundation.org https://lists.linux-foundation.org/mailman

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

2010-10-19 Thread Daisuke Nishimura
On Wed, 20 Oct 2010 13:18:57 +0900 KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: On Tue, 19 Oct 2010 10:00:15 +0900 KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: On Mon, 18 Oct 2010 17:39:44 -0700 Greg Thelen gthe...@google.com wrote: If the current process is in

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

2010-10-19 Thread Daisuke Nishimura
at different levels. Signed-off-by: Andrea Righi ari...@develer.com Signed-off-by: Greg Thelen gthe...@google.com Reviewed-by: Daisuke Nishimura nishim...@mxp.nes.nec.co.jp ___ Containers mailing list contain...@lists.linux-foundation.org https

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

2010-10-18 Thread Daisuke Nishimura
gthe...@google.com Acked-by: Daisuke Nishimura nishim...@mxp.nes.nec.co.jp ___ Containers mailing list contain...@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers

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

2010-10-18 Thread Daisuke Nishimura
. However, these more general interfaces allow for new statistics to be more easily added. New statistics are added with memcg dirty page accounting. Signed-off-by: Greg Thelen gthe...@google.com Signed-off-by: Andrea Righi ari...@develer.com Acked-by: Daisuke Nishimura nishim

[Devel] Re: [PATCH v3 04/11] memcg: add lock to synchronize page accounting and migration

2010-10-18 Thread Daisuke Nishimura
-off-by: Greg Thelen gthe...@google.com This approach is more straightforward and easy to understand. Acked-by: Daisuke Nishimura nishim...@mxp.nes.nec.co.jp ___ Containers mailing list contain...@lists.linux-foundation.org https://lists.linux

[Devel] Re: [PATCH v4] memcg: reduce lock time at move charge

2010-10-12 Thread Daisuke Nishimura
On Tue, 12 Oct 2010 14:48:01 +0900 KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: On Tue, 12 Oct 2010 12:56:13 +0900 Daisuke Nishimura nishim...@mxp.nes.nec.co.jp wrote: +err_out: + for (; mt info + num; mt++) + if (mt-type == MC_TARGET_PAGE

[Devel] Re: [PATCH v2] memcg: reduce lock time at move charge (Was Re: [PATCH 04/10] memcg: disable local interrupts in lock_page_cgroup()

2010-10-11 Thread Daisuke Nishimura
+err_out: + for (; mt info + num; mt++) + if (mt-type == MC_TARGET_PAGE) { + putback_lru_page(mt-val.page); Is this putback_lru_page() necessary ? is_target_pte_for_mc() doesn't isolate the page. Thanks, Daisuke Nishimura. + put_page

[Devel] Re: [PATCH v2] memcg: reduce lock time at move charge (Was Re: [PATCH 04/10] memcg: disable local interrupts in lock_page_cgroup()

2010-10-07 Thread Daisuke Nishimura
, but I agree we should describe it. Thanks, Daisuke Nishimura. ___ Containers mailing list contain...@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers ___ Devel mailing

[Devel] Re: [RFC] Restrict size of page_cgroup-flags

2010-10-06 Thread Daisuke Nishimura
it be better to remove -page, if possible ? Thanks, Daisuke Nishimura. Signed-off-by: Balbir Singh bal...@linux.vnet.ibm.com --- include/linux/page_cgroup.h |3 +++ mm/page_cgroup.c|1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/include/linux

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

2010-10-06 Thread Daisuke Nishimura
? Or, we need re-organize current move-charge implementation. Thanks, Daisuke Nishimura. ___ Containers mailing list contain...@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers

[Devel] Re: [RFC] Restrict size of page_cgroup-flags

2010-10-06 Thread Daisuke Nishimura
for reclaim? We store page_cgroups in arrays now, so I suppose we can implement pc_to_pfn() using the similar calculation as page_to_pfn() does. IIRC, KAMEZAWA-san talked about it in another thread. Thanks, Daisuke Nishimura. ___ Containers mailing list

[Devel] Re: [RFC] Restrict size of page_cgroup-flags

2010-10-06 Thread Daisuke Nishimura
, Daisuke Nishimura. ___ Containers mailing list contain...@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers ___ Devel mailing list Devel@openvz.org https://openvz.org

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

2010-10-05 Thread Daisuke Nishimura
gthe...@google.com Acked-by: Daisuke Nishimura nishim...@mxp.nes.nec.co.jp Thanks, Daisuke Nishimura. --- include/linux/page_cgroup.h | 23 +++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h

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

2010-10-05 Thread Daisuke Nishimura
-by: Daisuke Nishimura nishim...@mxp.nes.nec.co.jp Thanks Daisuke Nishimura. --- Documentation/cgroups/memory.txt | 37 + 1 files changed, 37 insertions(+), 0 deletions(-) diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt

[Devel] Re: Cgroup OOM bug

2010-05-09 Thread Daisuke Nishimura
. Thanks, Daisuke Nishimura. ___ Containers mailing list contain...@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers ___ Devel mailing list Devel@openvz.org https://openvz.org

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

2010-04-15 Thread Daisuke Nishimura
On Wed, 14 Apr 2010 21:48:25 -0700, Greg Thelen gthe...@google.com wrote: On Wed, Apr 14, 2010 at 7:40 PM, Daisuke Nishimura nishim...@mxp.nes.nec.co.jp wrote: On Wed, 14 Apr 2010 13:14:07 -0700, Greg Thelen gthe...@google.com wrote: Vivek Goyal vgo...@redhat.com writes: On Tue, Apr 13

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

2010-04-14 Thread Daisuke Nishimura
. __remove_from_page_cache(), which will update DIRTY, is called with irq disabled(iow, under mapping-tree_lock) but not in interrupt context. Anyway, I tend to agree with KAMEZAWA-san: use trylock always(except for FILE_MAPPED), or add some new interfaces(e.g. mem_cgroup_update_stat_locked/safe...). Thanks, Daisuke

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

2010-03-17 Thread Daisuke Nishimura
account we don't have move-account-mapped-file, yet. FILE_MAPPED is updated under pte lock. OTOH, move account is also done under pte lock. page cgroup lock is held under pte lock in both cases, so move account is not so problem as for FILE_MAPPED. Thanks, Daisuke Nishimura

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

2010-03-16 Thread Daisuke Nishimura
speaking, it's not true because global values can change. We need a hook in mem_cgroup_dirty_read()?). Thanks, Daisuke Nishimura. 6. Hierarchy support -- 1.6.3.3 ___ Containers mailing list contain...@lists.linux-foundation.org https://lists.linux

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

2010-03-16 Thread Daisuke Nishimura
On Tue, 16 Mar 2010 10:11:50 -0400 Vivek Goyal vgo...@redhat.com 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

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

2010-03-15 Thread Daisuke Nishimura
)) + continue; cb-fill(cb, memcg_stat_strings[i].local_name, mystat.stat[i]); } not to show file stat in root cgroup ? It's meaningless value anyway. Of course, you'd better mention it in [2/5] too. Thanks, Daisuke Nishimura. /* per zone stat */ val

[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-11 Thread Daisuke Nishimura
On Thu, 11 Mar 2010 15:15:11 +0900, KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: On Thu, 11 Mar 2010 14:13:00 +0900 KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: On Thu, 11 Mar 2010 13:58:47 +0900 Daisuke Nishimura nishim...@mxp.nes.nec.co.jp wrote: I'll consider

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

2010-03-11 Thread Daisuke Nishimura
. Signed-off-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Looks good overall. Thanks, Daisuke Nishimura. --- include/linux/memcontrol.h |7 ++- include/linux/page_cgroup.h | 15 +++ mm/memcontrol.c | 92 +--- mm/rmap.c

[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-10 Thread Daisuke Nishimura
/restore version to mixed version ? Thanks, Daisuke Nishimura. === include/linux/page_cgroup.h | 28 ++-- mm/memcontrol.c | 36 ++-- 2 files changed, 44 insertions(+), 20 deletions(-) diff --git a/include/linux/page_cgroup.h b

[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-10 Thread Daisuke Nishimura
On Thu, 11 Mar 2010 13:49:08 +0900, KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: On Thu, 11 Mar 2010 13:31:23 +0900 Daisuke Nishimura nishim...@mxp.nes.nec.co.jp wrote: On Wed, 10 Mar 2010 09:26:24 +0530, Balbir Singh bal...@linux.vnet.ibm.com wrote: * nishim

[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-09 Thread Daisuke Nishimura
slower as I add additional codes. Using local_irq_disable()/enable() except in mem_cgroup_update_file_mapped(it can be the only candidate to be called with irq disabled in future) might be the choice. Thanks, Daisuke Nishimura. On Tue, 9 Mar 2010 10:20:58 +0530, Balbir Singh bal

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

2010-03-08 Thread Daisuke Nishimura
On Mon, 8 Mar 2010 11:37:11 +0900, KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: On Mon, 8 Mar 2010 11:17:24 +0900 Daisuke Nishimura nishim...@mxp.nes.nec.co.jp wrote: But IIRC, clear_writeback is done under treelock No ? The place where NR_WRITEBACK is updated is out

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

2010-03-08 Thread Daisuke Nishimura
On Mon, 8 Mar 2010 17:31:00 +0900, KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: On Mon, 8 Mar 2010 17:07:11 +0900 Daisuke Nishimura nishim...@mxp.nes.nec.co.jp wrote: On Mon, 8 Mar 2010 11:37:11 +0900, KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: On Mon, 8 Mar

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

2010-03-08 Thread Daisuke Nishimura
On Tue, 9 Mar 2010 09:20:54 +0900, KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: On Tue, 9 Mar 2010 09:18:45 +0900 Daisuke Nishimura nishim...@mxp.nes.nec.co.jp wrote: On Mon, 8 Mar 2010 17:31:00 +0900, KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: On Mon, 8 Mar

[Devel] [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-08 Thread Daisuke Nishimura
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 Hiroyuki wrote: On Mon, 8 Mar 2010 17:07:11 +0900 Daisuke Nishimura

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

2010-03-07 Thread Daisuke Nishimura
interrupt context. This means lock_page_cgroup() is called under interrupt context, that is, the case b) above can happen. hmm... I don't have any good idea for now except disabling irq around page cgroup lock to avoid all of these mess things. Thanks, Daisuke Nishimura

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

2010-03-07 Thread Daisuke Nishimura
On Mon, 8 Mar 2010 10:56:41 +0900, KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: On Mon, 8 Mar 2010 10:44:47 +0900 Daisuke Nishimura nishim...@mxp.nes.nec.co.jp wrote: +/* + * mem_cgroup_update_page_stat_locked() - update memcg file cache's accounting + * @page

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

2010-03-04 Thread Daisuke Nishimura
/unlock_page_cgroup_migrate() can be called under irq context (e.g. end_page_writeback()), so I think we must local_irq_disable()/enable() here. Thanks, Daisuke Nishimura. /* * We charges against to which may not have any tasks. Then, to * can be under rmdir(). But in current

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

2010-03-03 Thread Daisuke Nishimura
at rmdir, so I think it would be better to handle file pages anyway. Thanks, Daisuke Nishimura. ___ Containers mailing list contain...@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers

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

2010-03-02 Thread Daisuke Nishimura
?). FYI, I'm planning to add file-cache and shmem/tmpfs support for move_charge feature for 2.6.35. But, hmm, it would be complicated if we try to move dirty account too. Thanks, Daisuke Nishimura. ___ Containers mailing list contain...@lists.linux

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

2010-03-02 Thread Daisuke Nishimura
PCG_FILE_MAPPED flag too ? I think this flag can be handled in the same way as other flags you're trying to add, and we can change if (page_mapped(page) !PageAnon(page)) to if (PageCgroupFileMapped(pc) in __mem_cgroup_move_account(). It would be cleaner than current code, IMHO. Thanks, Daisuke

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

2010-03-02 Thread Daisuke Nishimura
mapping-tree_lock. hmm, we should call those mem_cgroup_update_state() outside mapping-tree_lock, or add local_irq_save/restore() around lock/unlock_page_cgroup() to avoid dead-lock. Thanks, Daisuke Nishimura. On Mon, 1 Mar 2010 22:23:40 +0100, Andrea Righi ari...@develer.com wrote: Apply

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

2010-03-02 Thread Daisuke Nishimura
On Wed, 3 Mar 2010 12:29:06 +0900, KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: On Wed, 3 Mar 2010 11:12:38 +0900 Daisuke Nishimura nishim...@mxp.nes.nec.co.jp wrote: diff --git a/mm/filemap.c b/mm/filemap.c index fe09e51..f85acae 100644 --- a/mm/filemap.c +++ b/mm

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

2010-03-01 Thread Daisuke Nishimura
*/ - __this_cpu_add(mem-stat-count[MEM_CGROUP_STAT_FILE_MAPPED], val); + VM_BUG_ON(idx = MEM_CGROUP_STAT_NSTATS); + __this_cpu_add(mem-stat-count[idx], val); done: unlock_page_cgroup(pc); Thanks, Daisuke Nishimura

[Devel] Re: [PATCH v4 3/4] memcg: rework usage of stats by soft limit

2009-12-27 Thread Daisuke Nishimura
be better to name it __mem_cgroup_stat_set_safe. And could you remove the definition of __mem_cgroup_stat_reset ? Thanks, Daisuke Nishimura. static inline s64 __mem_cgroup_stat_read_local(struct mem_cgroup_stat_cpu *stat, enum mem_cgroup_stat_index idx

[Devel] Re: [PATCH v4 4/4] memcg: implement memory thresholds

2009-12-27 Thread Daisuke Nishimura
); + } +unlock: + rcu_read_unlock(); +} + Thanks, Daisuke Nishimura. ___ Containers mailing list contain...@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers

[Devel] Re: [PATCH RFC v2 3/4] memcg: rework usage of stats by soft limit

2009-12-12 Thread Daisuke Nishimura
On Sat, 12 Dec 2009 15:06:52 +0200 Kirill A. Shutemov kir...@shutemov.name wrote: On Sat, Dec 12, 2009 at 5:50 AM, Daisuke Nishimura d-nishim...@mtf.biglobe.ne.jp wrote: Sorry, I disagree this change. mem_cgroup_soft_limit_check() is used for checking how much current usage exceeds

[Devel] Re: [PATCH RFC v2 3/4] memcg: rework usage of stats by soft limit

2009-12-12 Thread Daisuke Nishimura
On Sat, 12 Dec 2009 21:46:08 +0200 Kirill A. Shutemov kir...@shutemov.name wrote: On Sat, Dec 12, 2009 at 4:34 PM, Daisuke Nishimura d-nishim...@mtf.biglobe.ne.jp wrote: On Sat, 12 Dec 2009 15:06:52 +0200 Kirill A. Shutemov kir...@shutemov.name wrote: On Sat, Dec 12, 2009 at 5:50 AM

[Devel] Re: [PATCH RFC v2 4/4] memcg: implement memory thresholds

2009-12-11 Thread Daisuke Nishimura
to record to swap */ if (ctype != MEM_CGROUP_CHARGE_TYPE_SWAPOUT) css_put(mem-css); Can if (do_swap_account) check be moved into mem_cgroup_threshold ? Thanks, Daisuke Nishimura. ___ Containers mailing list contain...@lists.linux

[Devel] Re: [PATCH RFC v2 3/4] memcg: rework usage of stats by soft limit

2009-12-11 Thread Daisuke Nishimura
in http://marc.info/?l=linux-mmm=126021128400687w=2. I think you can change there as you want, I can change my patch (http://marc.info/?l=linux-mmm=126023467303178w=2, it has not yet sent to Andrew anyway) to check mem_cgroup_is_root() in mem_cgroup_update_tree(). Thanks, Daisuke Nishimura. On Sat, 12

[Devel] Re: [PATCH RFC v0 2/3] res_counter: implement thresholds

2009-11-26 Thread Daisuke Nishimura
on performance impact of these patches(w/o setting any threshold)? IMHO, it might be small enough to be ignored because KAMEZAWA-san's coalesce charge/uncharge patches have decreased charge/uncharge for res_counter itself, but I want to know just to make sure. Regards, Daisuke Nishimura

[Devel] Re: No limitation in physical memory in cgroups

2009-05-20 Thread Daisuke Nishimura
to memory.limit_in_bytes. max_usage_in_bytes means the max of the usage so far(you can reset it by writing to it). See Documentation/cgroups/memory.txt(it might be a bit old). Thanks, Daisuke Nishimura. c) In Shell #1, run a memory consumer (in which, malloc() is called to allocate memory

[Devel] Re: memrlimit controller merge to mainline

2008-07-29 Thread Daisuke Nishimura
- under mem+swap controller, program works with no swap. Only global LRU may make pages swapped-out. - If swap-accounting-mode is off, swap can be used unlimitedly. Hmm, sounds a bit differenct from what I want. How about others ? Thanks, Daisuke Nishimura

[Devel] Re: [RFC] Transactional CGroup task attachment

2008-07-14 Thread Daisuke Nishimura
implement prepare_attach_nosleep() which holds swap_lock. Anyway, if unwinding is supported officially, I think we can find a way to go. I think so too. Thanks, Daisuke Nishimura. ___ Containers mailing list [EMAIL PROTECTED] https://lists.linux

[Devel] Re: [RFC] Transactional CGroup task attachment

2008-07-14 Thread Daisuke Nishimura
On Mon, 14 Jul 2008 16:54:44 +0900, KAMEZAWA Hiroyuki [EMAIL PROTECTED] wrote: On Mon, 14 Jul 2008 15:28:22 +0900 Daisuke Nishimura [EMAIL PROTECTED] wrote: On Fri, 11 Jul 2008 09:20:58 +0900, KAMEZAWA Hiroyuki [EMAIL PROTECTED] wrote: Thank you for your effort. On Wed, 9 Jul

[Devel] Re: [PATCH -mm 1/5] swapcgroup (v3): add cgroup files

2008-07-11 Thread Daisuke Nishimura
Hi, Dave-san. On Thu, 10 Jul 2008 13:35:36 -0700, Dave Hansen [EMAIL PROTECTED] wrote: On Fri, 2008-07-04 at 15:17 +0900, Daisuke Nishimura wrote: +config CGROUP_SWAP_RES_CTLR + bool Swap Resource Controller for Control Groups + depends on CGROUP_MEM_RES_CTLR SWAP

[Devel] Re: [PATCH -mm 5/5] swapcgroup (v3): implement force_empty

2008-07-07 Thread Daisuke Nishimura
On Sat, 5 Jul 2008 13:29:44 +0900, KAMEZAWA Hiroyuki [EMAIL PROTECTED] wrote: On Fri, 4 Jul 2008 21:33:01 +0900 Daisuke Nishimura [EMAIL PROTECTED] wrote: On Fri, 4 Jul 2008 19:16:38 +0900, KAMEZAWA Hiroyuki [EMAIL PROTECTED] wrote: On Fri, 4 Jul 2008 15:24:23 +0900 Daisuke

[Devel] Re: [PATCH -mm 0/5] swapcgroup (v3)

2008-07-07 Thread Daisuke Nishimura
Hi, Balbir-san. On Sat, 05 Jul 2008 12:22:25 +0530, Balbir Singh [EMAIL PROTECTED] wrote: Daisuke Nishimura wrote: Hi. This is new version of swapcgroup. Major changes from previous version - Rebased on 2.6.26-rc5-mm3. The new -mm has been released, but these patches can

[Devel] [PATCH -mm 0/5] swapcgroup (v3)

2008-07-04 Thread Daisuke Nishimura
where memory should be accounted but swap should not? - hierarchy support - move charges along with task Both of them need more discussion. Thanks, Daisuke Nishimura. ___ Containers mailing list [EMAIL PROTECTED] https://lists.linux-foundation.org

[Devel] [PATCH -mm 1/5] swapcgroup (v3): add cgroup files

2008-07-04 Thread Daisuke Nishimura
of those files are the same as memory cgroup. Change log v2-v3 - Rebased on 2.6.26-rc5-mm3. v1-v2 - Rebased on 2.6.26-rc2-mm1. - Implemented as a add-on to memory cgroup. Signed-off-by: Daisuke Nishimura [EMAIL PROTECTED] --- init/Kconfig|7 + mm/memcontrol.c | 67

[Devel] [PATCH -mm 2/5] swapcgroup (v3): add a member to swap_info_struct

2008-07-04 Thread Daisuke Nishimura
-mm3 - add helper functions and removed #ifdef from sys_swapon()/sys_swapoff(). - add check on mem_cgroup_subsys.disabled v1-v2 - Rebased on 2.6.26-rc2-mm1 - Implemented as a add-on to memory cgroup. Signed-off-by: Daisuke Nishimura [EMAIL PROTECTED] --- include/linux/memcontrol.h | 20

[Devel] [PATCH -mm 3/5] swapcgroup (v3): implement charge and uncharge

2008-07-04 Thread Daisuke Nishimura
on 2.6.26-rc2-mm1 - Implemented as a add-on to memory cgroup. Signed-off-by: Daisuke Nishimura [EMAIL PROTECTED] --- include/linux/memcontrol.h | 17 ++ include/linux/swap.h |4 +- mm/memcontrol.c| 53 mm/shmem.c

[Devel] [PATCH -mm 4/5] swapcgroup (v3): modify vm_swap_full()

2008-07-04 Thread Daisuke Nishimura
-mm3 - take into account global swap usage. - change arg of vm_swap_full from page to memcg. - add check on mem_cgroup_subsys.disabled v1-v2 - new patch Signed-off-by: Daisuke Nishimura [EMAIL PROTECTED] --- include/linux/memcontrol.h | 12 include/linux/swap.h |4

[Devel] [PATCH -mm 5/5] swapcgroup (v3): implement force_empty

2008-07-04 Thread Daisuke Nishimura
before implementing this way, hierarchy and move charges support are needed. So I think this is enough for the first step. Change log v2-v3 - new patch Signed-off-by: Daisuke Nishimura [EMAIL PROTECTED] --- include/linux/memcontrol.h |5 mm/memcontrol.c| 47

[Devel] Re: [PATCH -mm 5/5] swapcgroup (v3): implement force_empty

2008-07-04 Thread Daisuke Nishimura
be added !p-swap_map to check the device has not been swapoff'ed. Thanks, Daisuke Nishimura. + swap_cgroup_uncharge(p, i); + spin_unlock(swap_lock); + } + spin_lock(swap_lock

[Devel] Re: [PATCH -mm 5/5] swapcgroup (v3): implement force_empty

2008-07-04 Thread Daisuke Nishimura
. find_next_to_unuse seems to have fragile assumptions and can dereference p-swap_map as well. You're right. Thank you for pointing it out! I'll consider more. Thanks, Daisuke Nishimura. ___ Containers mailing list [EMAIL PROTECTED] https://lists.linux

[Devel] Re: [PATCH -mm 4/5] swapcgroup (v3): modify vm_swap_full()

2008-07-04 Thread Daisuke Nishimura
Hi, Kamezawa-san. On Fri, 4 Jul 2008 18:58:45 +0900, KAMEZAWA Hiroyuki [EMAIL PROTECTED] wrote: On Fri, 4 Jul 2008 15:22:44 +0900 Daisuke Nishimura [EMAIL PROTECTED] wrote: /* Swap 50% full? Release swapcache more aggressively.. */ -#define vm_swap_full() (nr_swap_pages*2

[Devel] Re: [PATCH -mm 0/5] swapcgroup (v3)

2008-07-04 Thread Daisuke Nishimura
On Fri, 4 Jul 2008 18:40:33 +0900, KAMEZAWA Hiroyuki [EMAIL PROTECTED] wrote: On Fri, 4 Jul 2008 15:15:36 +0900 Daisuke Nishimura [EMAIL PROTECTED] wrote: Hi. This is new version of swapcgroup. Major changes from previous version - Rebased on 2.6.26-rc5-mm3. The new -mm has

[Devel] Re: [PATCH -mm 5/5] swapcgroup (v3): implement force_empty

2008-07-04 Thread Daisuke Nishimura
On Fri, 4 Jul 2008 19:16:38 +0900, KAMEZAWA Hiroyuki [EMAIL PROTECTED] wrote: On Fri, 4 Jul 2008 15:24:23 +0900 Daisuke Nishimura [EMAIL PROTECTED] wrote: This patch implements force_empty of swapcgroup. Currently, it simply uncharges all the charges from the group. I think

[Devel] Re: [RFD][PATCH] memcg: Move Usage at Task Move

2008-06-20 Thread Daisuke Nishimura
the usage as accurate as possible, that is the size of memory used by processes in the group at the moment. I agree that statistics is not the purpose of memcg(and swap), but, IMHO, it's useful feature of memcg. Administrators can know how busy or idle each groups are by it. Thanks, Daisuke

[Devel] Re: [PATCH] cgroup: support checking of subsystem dependencies

2008-06-18 Thread Daisuke Nishimura
? Currently no, but people who are developing or wants to develop new subsystems may find this useful, for example Daisuke Nishimura-san's swap controller. My current version is implemented as addon to memory controller, so it can be used by just mounting memory controller :) But anyway, this feature

[Devel] Re: [RFD][PATCH] memcg: Move Usage at Task Move

2008-06-10 Thread Daisuke Nishimura
-res.limit necessary) + rc = -ENOMEM; I think it should be (newcg-res.limit necessary). Thanks, Daisuke Nishimura. ___ Containers mailing list [EMAIL PROTECTED] https://lists.linux-foundation.org/mailman/listinfo/containers

[Devel] Re: [RFD][PATCH] memcg: Move Usage at Task Move

2008-06-10 Thread Daisuke Nishimura
. Thanks, Daisuke Nishimura. ___ Containers mailing list [EMAIL PROTECTED] https://lists.linux-foundation.org/mailman/listinfo/containers ___ Devel mailing list Devel@openvz.org https://openvz.org/mailman/listinfo

[Devel] Re: [RFD][PATCH] memcg: Move Usage at Task Move

2008-06-10 Thread Daisuke Nishimura
mm-sem while move. I preffer the latter. Though it's expencive, I think moving a task would not happen so offen. Thanks, Daisuke Nishimura. ___ Containers mailing list [EMAIL PROTECTED] https://lists.linux-foundation.org/mailman/listinfo/containers

[Devel] Re: [PATCH 0/4] swapcgroup(v2)

2008-05-27 Thread Daisuke Nishimura
, Daisuke Nishimura. while nishimura-san's one still seems to have a lot of todo, it seems good enough as a start point to me. so i'd like to withdraw mine. nishimura-san, is it ok for you? Of cource. I'll work hard to make it better. I would suggest that me merge the good parts from both

[Devel] Re: [PATCH 0/4] swapcgroup(v2)

2008-05-27 Thread Daisuke Nishimura
On 2008/05/27 22:18 +0900, Balbir Singh wrote: Daisuke Nishimura wrote: On 2008/05/27 16:42 +0900, Balbir Singh wrote: YAMAMOTO Takashi wrote: hi, Thanks for looking into this. Yamamoto-San is also looking into a swap controller. Is there a consensus on the approach? Not yet, but I think

[Devel] Re: [PATCH 0/4] swapcgroup(v2)

2008-05-27 Thread Daisuke Nishimura
On 2008/05/27 22:46 +0900, Balbir Singh wrote: Daisuke Nishimura wrote: On 2008/05/27 22:18 +0900, Balbir Singh wrote: Daisuke Nishimura wrote: On 2008/05/27 16:42 +0900, Balbir Singh wrote: YAMAMOTO Takashi wrote: hi, Thanks for looking into this. Yamamoto-San is also looking into a swap

[Devel] Re: [PATCH 3/4] swapcgroup: implement charge/uncharge

2008-05-23 Thread Daisuke Nishimura
On 2008/05/22 16:37 +0900, KAMEZAWA Hiroyuki wrote: On Thu, 22 May 2008 15:20:05 +0900 Daisuke Nishimura [EMAIL PROTECTED] wrote: +#ifdef CONFIG_CGROUP_SWAP_RES_CTLR +int swap_cgroup_charge(struct page *page, +struct swap_info_struct *si, +unsigned

[Devel] Re: [PATCH 4/4] swapcgroup: modify vm_swap_full for cgroup

2008-05-23 Thread Daisuke Nishimura
On 2008/05/22 21:32 +0900, KOSAKI Motohiro wrote: perhaps, I don't understand your intention exactly. Why can't you make wrapper function? e.g. vm_swap_full(page_to_memcg(page)) OK. I'll try it. ___ Containers mailing list [EMAIL PROTECTED]

[Devel] [PATCH 0/4] swapcgroup(v2)

2008-05-22 Thread Daisuke Nishimura
this feature or not, and avoid overhead for users not using this feature. - move charges along with task move between cgroups. *1 https://lists.linux-foundation.org/pipermail/containers/2008-March/010216.html Thanks, Daisuke Nishimura. ___ Containers mailing

[Devel] [PATCH 1/4] swapcgroup: add cgroup files

2008-05-22 Thread Daisuke Nishimura
-by: Daisuke Nishimura [EMAIL PROTECTED] --- init/Kconfig|7 + mm/memcontrol.c | 67 +++ 2 files changed, 74 insertions(+), 0 deletions(-) diff --git a/init/Kconfig b/init/Kconfig index 6135d07..aabbb83 100644 --- a/init/Kconfig +++ b

[Devel] [PATCH 2/4] swapcgroup: add member to swap_info_struct for cgroup

2008-05-22 Thread Daisuke Nishimura
This patch add a member to swap_info_struct for cgroup. This member, array of pointers to mem_cgroup, is used to remember to which cgroup each swap entries are charged. The memory for this array of pointers is allocated on swapon, and freed on swapoff. Signed-off-by: Daisuke Nishimura [EMAIL

[Devel] [PATCH 3/4] swapcgroup: implement charge/uncharge

2008-05-22 Thread Daisuke Nishimura
? I added to swap_info_struct a member 'struct swap_cgroup **', array of pointer to which swap_cgroup the swap entry is charged. Signed-off-by: Daisuke Nishimura [EMAIL PROTECTED] --- include/linux/memcontrol.h | 21 +++ include/linux/swap.h |4 +- mm

[Devel] [PATCH 4/4] swapcgroup: modify vm_swap_full for cgroup

2008-05-22 Thread Daisuke Nishimura
of Rik's splitlru patchset: [patch 04/14] free swap space on swap-in/activation but, I should verify whether this change to vm_swap_full() is valid. Signed-off-by: Daisuke Nishimura [EMAIL PROTECTED] --- include/linux/memcontrol.h |3 +++ include/linux/swap.h |6 +- mm

[Devel] Re: [PATCH 2/4] swapcgroup: add member to swap_info_struct for cgroup

2008-05-22 Thread Daisuke Nishimura
Hi. On 2008/05/22 16:23 +0900, KAMEZAWA Hiroyuki wrote: On Thu, 22 May 2008 15:18:51 +0900 Daisuke Nishimura [EMAIL PROTECTED] wrote: This patch add a member to swap_info_struct for cgroup. This member, array of pointers to mem_cgroup, is used to remember to which cgroup each swap entries

[Devel] Re: [PATCH 4/4] swapcgroup: modify vm_swap_full for cgroup

2008-05-22 Thread Daisuke Nishimura
. this is memory(or swap) cgroup operation. this argument is slightly odd. But what callers of vm_swap_full() know is page, not mem_cgroup. I don't want to add to callers something like: pc = get_page_cgroup(page); mem = pc-mem_cgroup; vm_swap_full(mem); Thanks, Daisuke Nishimura

[Devel] Re: [PATCH 4/4] swapcgroup: modify vm_swap_full for cgroup

2008-05-22 Thread Daisuke Nishimura
to number of page ret = (usage * 2 limit) || (nr_swap_pages * 2 total_swap_pages) : Thanks, Daisuke Nishimura. ___ Containers mailing list [EMAIL PROTECTED] https://lists.linux-foundation.org/mailman/listinfo/containers

[Devel] Re: [PATCH 0/4] swapcgroup(v2)

2008-05-22 Thread Daisuke Nishimura
On 2008/05/22 16:44 +0900, KAMEZAWA Hiroyuki wrote: On Thu, 22 May 2008 15:13:41 +0900 Daisuke Nishimura [EMAIL PROTECTED] wrote: Hi. I updated my swapcgroup patch. seems good in general. Thanks :-) ToDo: - handle force_empty. Without this, we can do rmdir() against cgroup

[Devel] Re: [PATCH 0/4] swapcgroup(v2)

2008-05-22 Thread Daisuke Nishimura
(sorry, I sent the previous mail before completing it) On 2008/05/23 11:10 +0900, Daisuke Nishimura wrote: On 2008/05/22 16:44 +0900, KAMEZAWA Hiroyuki wrote: (snip) - make it possible for users to select if they use this feature or not, and avoid overhead for users not using this feature

[Devel] Re: [PATCH 0/4] swapcgroup(v2)

2008-05-22 Thread Daisuke Nishimura
Hi. On 2008/05/23 6:27 +0900, Balbir Singh wrote: Daisuke Nishimura wrote: Hi. I updated my swapcgroup patch. Major changes from previous version(*1): - Rebased on 2.6.26-rc2-mm1 + KAMEZAWA-san's performance improvement patchset v4. - Implemented as a add-on to memory cgroup. So

  1   2   >