Re: [PATCH 6/8] memcg: make mem_cgroup_reparent_charges non failing

2012-11-02 Thread Kamezawa Hiroyuki
re_destroy doesn't have to take a reference to memcg's css > because all css' are marked dead already. > > tj: Remove now unused local variable @cgrp from > mem_cgroup_reparent_charges(). > > Signed-off-by: Michal Hocko > Reviewed-by: Glauber Costa > Signed-off-b

Re: [PATCH 5/8] cgroup: remove CGRP_WAIT_ON_RMDIR, cgroup_exclude_rmdir() and cgroup_release_and_wakeup_rmdir()

2012-11-02 Thread Kamezawa Hiroyuki
GRP_WAIT_ON_RMDIR is > unnecessary. Remove it and all the mechanisms supporting it. Note > that memcontrol.c changes are essentially revert of 887032670d > ("cgroup avoid permanent sleep at rmdir"). > > Signed-off-by: Tejun Heo > Reviewed-by: Michal Hocko >

Re: [PATCH 4/8] cgroup: deactivate CSS's and mark cgroup dead before invoking ->pre_destroy()

2012-11-02 Thread Kamezawa Hiroyuki
2: cgroup_call_pre_destroy() removal moved to this patch per Michal. > Commit message updated per Glauber. > > Signed-off-by: Tejun Heo > Reviewed-by: Michal Hocko > Cc: Glauber Costa Reviewed-by: KAMEZAWA Hiroyuki -- To unsubscribe from this list: send the line "un

Re: [PATCH 3/8] cgroup: use cgroup_lock_live_group(parent) in cgroup_create()

2012-11-02 Thread Kamezawa Hiroyuki
ecessary. > > Do it anyway such that locking is contained inside cgroup proper and > we don't get nasty surprises if we ever grow another caller of > cgroup_create(). > > Signed-off-by: Tejun Heo > Reviewed-by: Michal Hocko Reviewed-by: KAMEZAWA Hiroyuki -- To unsubscribe

Re: [PATCH 2/8] cgroup: kill CSS_REMOVED

2012-11-02 Thread Kamezawa Hiroyuki
t; added per Michal Hocko. > > Signed-off-by: Tejun Heo > Reviewed-by: Michal Hocko > Cc: Johannes Weiner > Cc: Balbir Singh > Cc: KAMEZAWA Hiroyuki Thank you. Reviewed-by: KAMEZAWA Hiroyuki -- To unsubscribe from this list: send the line "unsubscribe linux-kerne

Re: [PATCH 1/8] cgroup: kill cgroup_subsys->__DEPRECATED_clear_css_refs

2012-11-02 Thread Kamezawa Hiroyuki
isable/enable() conversion. Signed-off-by: Tejun Heo Reviewed-by: Michal Hocko I should see this v2 thread 1st... Reviewed-by: KAMEZAWA Hiroyuki -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More

Re: [PATCH 8/8] cgroup: make ->pre_destroy() return void

2012-11-02 Thread Kamezawa Hiroyuki
(2012/10/31 13:22), Tejun Heo wrote: > All ->pre_destory() implementations return 0 now, which is the only > allowed return value. Make it return void. > > Signed-off-by: Tejun Heo > Cc: Michal Hocko > Cc: Balbir Singh > Cc: KAMEZAWA Hiroyuki > Cc: Vivek Goyal

Re: [PATCH 7/8] hugetlb: do not fail in hugetlb_cgroup_pre_destroy

2012-11-02 Thread Kamezawa Hiroyuki
-off-by: Michal Hocko > Reviewed-by: Tejun Heo > Reviewed-by: Glauber Costa > Signed-off-by: Tejun Heo Acked-by: KAMEZAWA Hiroyuki -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo i

Re: [PATCH 6/8] memcg: make mem_cgroup_reparent_charges non failing

2012-11-02 Thread Kamezawa Hiroyuki
re_destroy doesn't have to take a reference to memcg's css > because all css' are marked dead already. > > tj: Remove now unused local variable @cgrp from > mem_cgroup_reparent_charges(). > > Signed-off-by: Michal Hocko > Reviewed-by: Glauber Costa > Signed-off-by:

Re: [PATCH 5/8] cgroup: remove CGRP_WAIT_ON_RMDIR, cgroup_exclude_rmdir() and cgroup_release_and_wakeup_rmdir()

2012-11-02 Thread Kamezawa Hiroyuki
GRP_WAIT_ON_RMDIR is > unnecessary. Remove it and all the mechanisms supporting it. Note > that memcontrol.c changes are essentially revert of 887032670d > ("cgroup avoid permanent sleep at rmdir"). > > Signed-off-by: Tejun Heo > Cc: Michal Hocko > Cc: Balbir Singh

Re: [PATCH 4/8] cgroup: deactivate CSS's and mark cgroup dead before invoking ->pre_destroy()

2012-11-02 Thread Kamezawa Hiroyuki
;3. Release cgroup_mutex and call ->pre_destroy(). > >4. Re-grab cgroup_mutex and continue destroying. > > After this change, controllers can safely assume that ->pre_destroy() > will only be called only once for a given cgroup and, once > ->pre_destroy() is ca

Re: [PATCH 3/8] cgroup: use cgroup_lock_live_group(parent) in cgroup_create()

2012-11-02 Thread Kamezawa Hiroyuki
ecessary. > > Do it anyway such that locking is contained inside cgroup proper and > we don't get nasty surprises if we ever grow another caller of > cgroup_create(). > > Signed-off-by: Tejun Heo I welcome this change. Reviewed-by: KAMEZAWA Hiroyuki > --- > kernel/cg

Re: [PATCH 2/8] cgroup: kill CSS_REMOVED

2012-11-02 Thread Kamezawa Hiroyuki
unexport it. > > Signed-off-by: Tejun Heo > Cc: Johannes Weiner > Cc: Michal Hocko > Cc: Balbir Singh > Cc: KAMEZAWA Hiroyuki Reviewed-by: KAMEZAWA Hiroyuki -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to

Re: [PATCH 1/8] cgroup: kill cgroup_subsys->__DEPRECATED_clear_css_refs

2012-11-02 Thread Kamezawa Hiroyuki
t cgroup_rmdir() will see more cleanup soon. > > Signed-off-by: Tejun Heo I thank you and Michal for this work. Reviewed-by: KAMEZAWA Hiroyuki -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PART6 Patch] mempolicy: fix is_valid_nodemask()

2012-11-02 Thread Kamezawa Hiroyuki
(2012/11/01 3:21), David Rientjes wrote: On Wed, 31 Oct 2012, Wen Congyang wrote: From: Lai Jiangshan is_valid_nodemask() is introduced by 19770b32. but it does not match its comments, because it does not check the zone which > policy_zone. Also in b377fd, this commits told us, if highest

Re: [PART6 Patch] mempolicy: fix is_valid_nodemask()

2012-11-02 Thread Kamezawa Hiroyuki
(2012/11/01 3:21), David Rientjes wrote: On Wed, 31 Oct 2012, Wen Congyang wrote: From: Lai Jiangshan la...@cn.fujitsu.com is_valid_nodemask() is introduced by 19770b32. but it does not match its comments, because it does not check the zone which policy_zone. Also in b377fd, this commits

Re: [PATCH 1/8] cgroup: kill cgroup_subsys-__DEPRECATED_clear_css_refs

2012-11-02 Thread Kamezawa Hiroyuki
for this work. Reviewed-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujisu.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http

Re: [PATCH 2/8] cgroup: kill CSS_REMOVED

2012-11-02 Thread Kamezawa Hiroyuki
...@cmpxchg.org Cc: Michal Hocko mho...@suse.cz Cc: Balbir Singh bsinghar...@gmail.com Cc: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Reviewed-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message

Re: [PATCH 3/8] cgroup: use cgroup_lock_live_group(parent) in cgroup_create()

2012-11-02 Thread Kamezawa Hiroyuki
such that locking is contained inside cgroup proper and we don't get nasty surprises if we ever grow another caller of cgroup_create(). Signed-off-by: Tejun Heo t...@kernel.org I welcome this change. Reviewed-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com --- kernel/cgroup.c | 16

Re: [PATCH 4/8] cgroup: deactivate CSS's and mark cgroup dead before invoking -pre_destroy()

2012-11-02 Thread Kamezawa Hiroyuki
, controllers can safely assume that -pre_destroy() will only be called only once for a given cgroup and, once -pre_destroy() is called, the cgroup will stay dormant till it's destroyed. Signed-off-by: Tejun Heo t...@kernel.org Reviewed-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Ok

Re: [PATCH 5/8] cgroup: remove CGRP_WAIT_ON_RMDIR, cgroup_exclude_rmdir() and cgroup_release_and_wakeup_rmdir()

2012-11-02 Thread Kamezawa Hiroyuki
the mechanisms supporting it. Note that memcontrol.c changes are essentially revert of 887032670d (cgroup avoid permanent sleep at rmdir). Signed-off-by: Tejun Heo t...@kernel.org Cc: Michal Hocko mho...@suse.cz Cc: Balbir Singh bsinghar...@gmail.com Cc: KAMEZAWA Hiroyuki kamezawa.hir

Re: [PATCH 6/8] memcg: make mem_cgroup_reparent_charges non failing

2012-11-02 Thread Kamezawa Hiroyuki
Heo t...@kernel.org +1 Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com --- mm/memcontrol.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 1033b2b..47c4680 100644 --- a/mm/memcontrol.c +++ b/mm

Re: [PATCH 7/8] hugetlb: do not fail in hugetlb_cgroup_pre_destroy

2012-11-02 Thread Kamezawa Hiroyuki
Hocko mho...@suse.cz Reviewed-by: Tejun Heo t...@kernel.org Reviewed-by: Glauber Costa glom...@parallels.com Signed-off-by: Tejun Heo t...@kernel.org Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body

Re: [PATCH 8/8] cgroup: make -pre_destroy() return void

2012-11-02 Thread Kamezawa Hiroyuki
(2012/10/31 13:22), Tejun Heo wrote: All -pre_destory() implementations return 0 now, which is the only allowed return value. Make it return void. Signed-off-by: Tejun Heo t...@kernel.org Cc: Michal Hocko mho...@suse.cz Cc: Balbir Singh bsinghar...@gmail.com Cc: KAMEZAWA Hiroyuki

Re: [PATCH 1/8] cgroup: kill cgroup_subsys-__DEPRECATED_clear_css_refs

2012-11-02 Thread Kamezawa Hiroyuki
local_irq_disable/enable() conversion. Signed-off-by: Tejun Heo t...@kernel.org Reviewed-by: Michal Hocko mho...@suse.cz I should see this v2 thread 1st... Reviewed-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body

Re: [PATCH 2/8] cgroup: kill CSS_REMOVED

2012-11-02 Thread Kamezawa Hiroyuki
: Johannes Weiner han...@cmpxchg.org Cc: Balbir Singh bsinghar...@gmail.com Cc: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Thank you. Reviewed-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body

Re: [PATCH 3/8] cgroup: use cgroup_lock_live_group(parent) in cgroup_create()

2012-11-02 Thread Kamezawa Hiroyuki
is contained inside cgroup proper and we don't get nasty surprises if we ever grow another caller of cgroup_create(). Signed-off-by: Tejun Heo t...@kernel.org Reviewed-by: Michal Hocko mho...@suse.cz Reviewed-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com -- To unsubscribe from

Re: [PATCH 4/8] cgroup: deactivate CSS's and mark cgroup dead before invoking -pre_destroy()

2012-11-02 Thread Kamezawa Hiroyuki
Costa glom...@parallels.com Reviewed-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read

Re: [PATCH 5/8] cgroup: remove CGRP_WAIT_ON_RMDIR, cgroup_exclude_rmdir() and cgroup_release_and_wakeup_rmdir()

2012-11-02 Thread Kamezawa Hiroyuki
the mechanisms supporting it. Note that memcontrol.c changes are essentially revert of 887032670d (cgroup avoid permanent sleep at rmdir). Signed-off-by: Tejun Heo t...@kernel.org Reviewed-by: Michal Hocko mho...@suse.cz Cc: Balbir Singh bsinghar...@gmail.com Cc: KAMEZAWA Hiroyuki kamezawa.hir

Re: [PATCH 6/8] memcg: make mem_cgroup_reparent_charges non failing

2012-11-02 Thread Kamezawa Hiroyuki
t...@kernel.org Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ

Re: [PATCH 7/8] hugetlb: do not fail in hugetlb_cgroup_pre_destroy

2012-11-02 Thread Kamezawa Hiroyuki
Hocko mho...@suse.cz Reviewed-by: Tejun Heo t...@kernel.org Reviewed-by: Glauber Costa glom...@parallels.com Signed-off-by: Tejun Heo t...@kernel.org Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body

Re: [PATCH 8/8] cgroup: make -pre_destroy() return void

2012-11-02 Thread Kamezawa Hiroyuki
(2012/11/01 4:44), Tejun Heo wrote: All -pre_destory() implementations return 0 now, which is the only allowed return value. Make it return void. Signed-off-by: Tejun Heo t...@kernel.org Cc: Michal Hocko mho...@suse.cz Cc: Balbir Singh bsinghar...@gmail.com Cc: KAMEZAWA Hiroyuki

Re: [patch for-3.7 v3] mm, mempolicy: hold task->mempolicy refcount while reading numa_maps.

2012-10-21 Thread Kamezawa Hiroyuki
anning. This patch tries to take reference count of task->mempolicy at reading numa_maps before calling get_vma_policy(). By this, task->mempolicy will not be freed until numa_maps reaches its end. Acked-by: David Rientjes Acked-by: KOSAKI Motohiro Signed-off-by: KAMEZAWA Hiroyuki V2->

Re: [patch for-3.7 v3] mm, mempolicy: hold task-mempolicy refcount while reading numa_maps.

2012-10-21 Thread Kamezawa Hiroyuki
From: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Date: Fri, 19 Oct 2012 17:00:55 +0900 Subject: [PATCH] hold task-mempolicy while numa_maps scans. /proc/pid/numa_maps scans vma and show mempolicy under mmap_sem. It sometimes accesses task-mempolicy which can be freed without mmap_sem

[patch for-3.7 v3] mm, mempolicy: hold task->mempolicy refcount while reading numa_maps.

2012-10-19 Thread Kamezawa Hiroyuki
(2012/10/19 5:03), David Rientjes wrote: On Thu, 18 Oct 2012, Kamezawa Hiroyuki wrote: @@ -132,7 +162,7 @@ static void *m_start(struct seq_file *m, loff_t *pos) tail_vma = get_gate_vma(priv->task->mm); priv->tail_vma = tail_vma; - + hold_task_mempo

[patch for-3.7 v3] mm, mempolicy: hold task-mempolicy refcount while reading numa_maps.

2012-10-19 Thread Kamezawa Hiroyuki
(2012/10/19 5:03), David Rientjes wrote: On Thu, 18 Oct 2012, Kamezawa Hiroyuki wrote: @@ -132,7 +162,7 @@ static void *m_start(struct seq_file *m, loff_t *pos) tail_vma = get_gate_vma(priv-task-mm); priv-tail_vma = tail_vma; - + hold_task_mempolicy(priv); /* Start

Re: [patch for-3.7 v2] mm, mempolicy: avoid taking mutex inside spinlock when reading numa_maps

2012-10-17 Thread Kamezawa Hiroyuki
(2012/10/18 13:14), Linus Torvalds wrote: On Wed, Oct 17, 2012 at 9:06 PM, Kamezawa Hiroyuki wrote: if (vma && vma != priv->tail_vma) { struct mm_struct *mm = vma->vm_mm; +#ifdef CONFIG_NUMA + task_lock(priv->task); + __mp

Re: [patch for-3.7 v2] mm, mempolicy: avoid taking mutex inside spinlock when reading numa_maps

2012-10-17 Thread Kamezawa Hiroyuki
(2012/10/18 13:06), Kamezawa Hiroyuki wrote: (2012/10/18 6:31), David Rientjes wrote: As a result of commit 32f8516a8c73 ("mm, mempolicy: fix printing stack contents in numa_maps"), the mutex protecting a shared policy can be inadvertently taken while holding task_lock(task). Recent

Re: [patch for-3.7 v2] mm, mempolicy: avoid taking mutex inside spinlock when reading numa_maps

2012-10-17 Thread Kamezawa Hiroyuki
we have another way to fix ? like this ? too ugly ? Again, I'm sorry if I misunderstand the points. == From bfe7e2ab1c1375b134ec12efce6517149318f75d Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki Date: Thu, 18 Oct 2012 13:17:25 +0900 Subject: [PATCH] hold task->mempolicy while numa_maps scans.

Re: [RFC] memcg/cgroup: do not fail fail on pre_destroy callbacks

2012-10-17 Thread Kamezawa Hiroyuki
(2012/10/17 22:30), Michal Hocko wrote: > Hi, > memcg is the only controller which might fail in its pre_destroy > callback which makes the cgroup core more complicated for no good > reason. This is an attempt to change this unfortunate state. > > I am sending this a RFC because I would like to

Re: [PATCH v4 14/14] Add documentation about the kmem controller

2012-10-17 Thread Kamezawa Hiroyuki
(2012/10/08 19:06), Glauber Costa wrote: > Signed-off-by: Glauber Costa > --- > Documentation/cgroups/memory.txt | 55 > +++- > 1 file changed, 54 insertions(+), 1 deletion(-) > Acked-by: KAMEZAWA Hiroyuki -- To unsubscribe from this l

Re: [PATCH v5 12/14] execute the whole memcg freeing in free_worker

2012-10-17 Thread Kamezawa Hiroyuki
ly need moved away are: > >* free_css_id(), and >* mem_cgroup_remove_from_trees(). > > But because the later accesses per-zone info, > free_mem_cgroup_per_zone_info() needs to be moved as well. With that, we > are left with the per_cpu stats only. Better move it al

Re: [PATCH v5 06/14] memcg: kmem controller infrastructure

2012-10-17 Thread Kamezawa Hiroyuki
ls ] > > Signed-off-by: Glauber Costa > Acked-by: Michal Hocko > CC: Christoph Lameter > CC: Pekka Enberg > CC: Kamezawa Hiroyuki > CC: Johannes Weiner > CC: Tejun Heo Acked-by: KAMEZAWA Hiroyuki -- To unsubscribe from this list: send the line &quo

Re: [PATCH v5 06/14] memcg: kmem controller infrastructure

2012-10-17 Thread Kamezawa Hiroyuki
: Christoph Lameter c...@linux.com CC: Pekka Enberg penb...@cs.helsinki.fi CC: Kamezawa Hiroyuki kamezawa.hir...@jp.fujitsu.com CC: Johannes Weiner han...@cmpxchg.org CC: Tejun Heo t...@kernel.org Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com -- To unsubscribe from this list: send

Re: [PATCH v5 12/14] execute the whole memcg freeing in free_worker

2012-10-17 Thread Kamezawa Hiroyuki
...@parallels.com Tested-by: Greg Thelen gthe...@google.com Acked-by: Michal Hocko mho...@suse.cz CC: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com CC: Johannes Weiner han...@cmpxchg.org CC: Tejun Heo t...@kernel.org Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com -- To unsubscribe

Re: [PATCH v4 14/14] Add documentation about the kmem controller

2012-10-17 Thread Kamezawa Hiroyuki
(2012/10/08 19:06), Glauber Costa wrote: Signed-off-by: Glauber Costa glom...@parallels.com --- Documentation/cgroups/memory.txt | 55 +++- 1 file changed, 54 insertions(+), 1 deletion(-) Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com

Re: [RFC] memcg/cgroup: do not fail fail on pre_destroy callbacks

2012-10-17 Thread Kamezawa Hiroyuki
(2012/10/17 22:30), Michal Hocko wrote: Hi, memcg is the only controller which might fail in its pre_destroy callback which makes the cgroup core more complicated for no good reason. This is an attempt to change this unfortunate state. I am sending this a RFC because I would like to hear

Re: [patch for-3.7 v2] mm, mempolicy: avoid taking mutex inside spinlock when reading numa_maps

2012-10-17 Thread Kamezawa Hiroyuki
this ? too ugly ? Again, I'm sorry if I misunderstand the points. == From bfe7e2ab1c1375b134ec12efce6517149318f75d Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Date: Thu, 18 Oct 2012 13:17:25 +0900 Subject: [PATCH] hold task-mempolicy while numa_maps scans

Re: [patch for-3.7 v2] mm, mempolicy: avoid taking mutex inside spinlock when reading numa_maps

2012-10-17 Thread Kamezawa Hiroyuki
(2012/10/18 13:06), Kamezawa Hiroyuki wrote: (2012/10/18 6:31), David Rientjes wrote: As a result of commit 32f8516a8c73 (mm, mempolicy: fix printing stack contents in numa_maps), the mutex protecting a shared policy can be inadvertently taken while holding task_lock(task). Recently, commit

Re: [patch for-3.7 v2] mm, mempolicy: avoid taking mutex inside spinlock when reading numa_maps

2012-10-17 Thread Kamezawa Hiroyuki
(2012/10/18 13:14), Linus Torvalds wrote: On Wed, Oct 17, 2012 at 9:06 PM, Kamezawa Hiroyuki kamezawa.hir...@jp.fujitsu.com wrote: if (vma vma != priv-tail_vma) { struct mm_struct *mm = vma-vm_mm; +#ifdef CONFIG_NUMA + task_lock(priv-task

Re: [patch for-3.7] mm, mempolicy: fix printing stack contents in numa_maps

2012-10-16 Thread Kamezawa Hiroyuki
(2012/10/17 14:24), David Rientjes wrote: On Wed, 17 Oct 2012, Dave Jones wrote: BUG: sleeping function called from invalid context at kernel/mutex.c:269 in_atomic(): 1, irqs_disabled(): 0, pid: 8558, name: trinity-child2 3 locks on stack by trinity-child2/8558: #0: held:

Re: [RFC PATCH v1 1/3] mm: teach mm by current context info to not do I/O during memory allocation

2012-10-16 Thread Kamezawa Hiroyuki
d by block subsystem or block > drivers too, for example, set the PF_MEMALLOC_NOIO flag before doing > actual I/O transfer. > > Cc: Alan Stern > Cc: Oliver Neukum > Cc: Jiri Kosina > Cc: Andrew Morton > Cc: Mel Gorman > Cc: KAMEZAWA Hiroyuki > Cc: Michal Ho

Re: [PATCH v4 10/14] memcg: use static branches when code not in use

2012-10-16 Thread Kamezawa Hiroyuki
. It is a lot simpler just to do static_key_slow_inc() on every child that is accounted. [ v4: adapted this patch to the changes in kmem_accounted ] Signed-off-by: Glauber Costa CC: Kamezawa Hiroyuki CC: Christoph Lameter CC: Pekka Enberg CC: Michal Hocko CC: Johannes Weiner CC: Suleiman

Re: [PATCH v4 09/14] memcg: kmem accounting lifecycle management

2012-10-16 Thread Kamezawa Hiroyuki
] Signed-off-by: Glauber Costa CC: Kamezawa Hiroyuki CC: Christoph Lameter CC: Pekka Enberg CC: Michal Hocko CC: Johannes Weiner CC: Suleiman Souhlal OK, I like the optimization. I have just one comment to the memcg_kmem_dead naming but other than that Acked-by: Michal Hocko [...] +static

Re: [PATCH v4 08/14] res_counter: return amount of charges after res_counter_uncharge

2012-10-16 Thread Kamezawa Hiroyuki
nly > users appearing from now on will be checking this value. > > Signed-off-by: Glauber Costa > CC: Michal Hocko > CC: Johannes Weiner > CC: Suleiman Souhlal > CC: Kamezawa Hiroyuki > --- > Documentation/cgroups/resource_counter.txt | 7 --- > include/lin

Re: [PATCH v4 06/14] memcg: kmem controller infrastructure

2012-10-16 Thread Kamezawa Hiroyuki
(2012/10/12 18:13), Glauber Costa wrote: On 10/12/2012 12:57 PM, Michal Hocko wrote: On Fri 12-10-12 12:44:57, Glauber Costa wrote: On 10/12/2012 12:39 PM, Michal Hocko wrote: On Fri 12-10-12 11:45:46, Glauber Costa wrote: On 10/11/2012 04:42 PM, Michal Hocko wrote: On Mon 08-10-12

Re: [PATCH] memory cgroup: update root memory cgroup when node is onlined

2012-10-16 Thread Kamezawa Hiroyuki
ways that you're now fixing up? Reported-by: Tang Chen Signed-off-by: Hugh Dickins Acked-by: KAMEZAWA Hiroyuki -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.o

Re: [PATCH] memory cgroup: update root memory cgroup when node is onlined

2012-10-16 Thread Kamezawa Hiroyuki
-by: Tang Chen tangc...@cn.fujitsu.com Signed-off-by: Hugh Dickins hu...@google.com Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [PATCH v4 06/14] memcg: kmem controller infrastructure

2012-10-16 Thread Kamezawa Hiroyuki
(2012/10/12 18:13), Glauber Costa wrote: On 10/12/2012 12:57 PM, Michal Hocko wrote: On Fri 12-10-12 12:44:57, Glauber Costa wrote: On 10/12/2012 12:39 PM, Michal Hocko wrote: On Fri 12-10-12 11:45:46, Glauber Costa wrote: On 10/11/2012 04:42 PM, Michal Hocko wrote: On Mon 08-10-12

Re: [PATCH v4 08/14] res_counter: return amount of charges after res_counter_uncharge

2012-10-16 Thread Kamezawa Hiroyuki
this value. Signed-off-by: Glauber Costa glom...@parallels.com CC: Michal Hocko mho...@suse.cz CC: Johannes Weiner han...@cmpxchg.org CC: Suleiman Souhlal sulei...@google.com CC: Kamezawa Hiroyuki kamezawa.hir...@jp.fujitsu.com --- Documentation/cgroups/resource_counter.txt | 7

Re: [PATCH v4 09/14] memcg: kmem accounting lifecycle management

2012-10-16 Thread Kamezawa Hiroyuki
] Signed-off-by: Glauber Costa glom...@parallels.com CC: Kamezawa Hiroyuki kamezawa.hir...@jp.fujitsu.com CC: Christoph Lameter c...@linux.com CC: Pekka Enberg penb...@cs.helsinki.fi CC: Michal Hocko mho...@suse.cz CC: Johannes Weiner han...@cmpxchg.org CC: Suleiman Souhlal sulei...@google.com OK, I

Re: [PATCH v4 10/14] memcg: use static branches when code not in use

2012-10-16 Thread Kamezawa Hiroyuki
. It is a lot simpler just to do static_key_slow_inc() on every child that is accounted. [ v4: adapted this patch to the changes in kmem_accounted ] Signed-off-by: Glauber Costa glom...@parallels.com CC: Kamezawa Hiroyuki kamezawa.hir...@jp.fujitsu.com CC: Christoph Lameter c...@linux.com CC

Re: [RFC PATCH v1 1/3] mm: teach mm by current context info to not do I/O during memory allocation

2012-10-16 Thread Kamezawa Hiroyuki
transfer. Cc: Alan Stern st...@rowland.harvard.edu Cc: Oliver Neukum oneu...@suse.de Cc: Jiri Kosina jiri.kos...@suse.com Cc: Andrew Morton a...@linux-foundation.org Cc: Mel Gorman m...@csn.ul.ie Cc: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Cc: Michal Hocko mho...@suse.cz Cc: Ingo Molnar

Re: [patch for-3.7] mm, mempolicy: fix printing stack contents in numa_maps

2012-10-16 Thread Kamezawa Hiroyuki
(2012/10/17 14:24), David Rientjes wrote: On Wed, 17 Oct 2012, Dave Jones wrote: BUG: sleeping function called from invalid context at kernel/mutex.c:269 in_atomic(): 1, irqs_disabled(): 0, pid: 8558, name: trinity-child2 3 locks on stack by trinity-child2/8558: #0: held:

Re: [PATCH v4 02/14] memcg: Reclaim when more than one page needed.

2012-10-15 Thread Kamezawa Hiroyuki
o > COSTLY_ORDER (as page_alloc.c does) and make sure not to do it if > __GFP_NORETRY. > > [v4: fixed nr pages calculation pointed out by Christoph Lameter ] > > Signed-off-by: Suleiman Souhlal > Signed-off-by: Glauber Costa > Reviewed-by: Kamezawa Hiroyuki > A

Re: [PATCH] doc: describe memcg swappiness more precisely memory.swappiness==0

2012-10-15 Thread Kamezawa Hiroyuki
to be explicit about the effect. Moreover global reclaim swapps out even when swappiness is 0 to prevent from OOM killer. Signed-off-by: Michal Hocko Nice :) Acked-by: KAMEZAWA Hiroyuki --- Documentation/cgroups/memory.txt |4 1 file changed, 4 insertions(+) diff --git

Re: [RFC PATCH] memcg: oom: fix totalpages calculation for swappiness==0

2012-10-15 Thread Kamezawa Hiroyuki
swap at all. Signed-off-by: Michal Hocko @jp.fujitsu.com> Hm...where should we describe this behavior Documentation/cgroup/memory.txt "5.3 swappiness" ? Anyway, the patch itself seems good. Acked-by: KAMEZAWA Hiroyuki -- To unsubscribe from this list: send the line "

Re: [PATCH] add some drop_caches documentation and info messsge

2012-10-15 Thread Kamezawa Hiroyuki
-mm tree] Signed-off-by: Dave Hansen Reviewed-by: KAMEZAWA Hiroyuki Acked-by: Michal Hocko Acked-by: KAMEZAWA Hiroyuki -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vg

Re: [PATCH] add some drop_caches documentation and info messsge

2012-10-15 Thread Kamezawa Hiroyuki
] Signed-off-by: Dave Hansen d...@linux.vnet.ibm.com Reviewed-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com Acked-by: Michal Hocko mho...@suse.cz Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body

Re: [RFC PATCH] memcg: oom: fix totalpages calculation for swappiness==0

2012-10-15 Thread Kamezawa Hiroyuki
and not considering swap at all. Signed-off-by: Michal Hocko mho...@suse.cz@jp.fujitsu.com Hm...where should we describe this behavior Documentation/cgroup/memory.txt 5.3 swappiness ? Anyway, the patch itself seems good. Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com

Re: [PATCH] doc: describe memcg swappiness more precisely memory.swappiness==0

2012-10-15 Thread Kamezawa Hiroyuki
it is probably better to be explicit about the effect. Moreover global reclaim swapps out even when swappiness is 0 to prevent from OOM killer. Signed-off-by: Michal Hocko mho...@suse.cz Nice :) Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com --- Documentation/cgroups/memory.txt |4

Re: [PATCH v4 02/14] memcg: Reclaim when more than one page needed.

2012-10-15 Thread Kamezawa Hiroyuki
sure not to do it if __GFP_NORETRY. [v4: fixed nr pages calculation pointed out by Christoph Lameter ] Signed-off-by: Suleiman Souhlal sulei...@google.com Signed-off-by: Glauber Costa glom...@parallels.com Reviewed-by: Kamezawa Hiroyuki kamezawa.hir...@jp.fujitsu.com Acked-by: Michal Hocko

Re: [PATCH] memory cgroup: update root memory cgroup when node is onlined

2012-09-13 Thread Kamezawa Hiroyuki
(2012/09/13 16:14), Wen Congyang wrote: root_mem_cgroup->info.nodeinfo is initialized when the system boots. But NODE_DATA(nid) is null if the node is not onlined, so root_mem_cgroup->info.nodeinfo[nid]->zoneinfo[zone].lruvec.zone contains an invalid pointer. If we use numactl to bind a program

Re: [PATCH] memory cgroup: update root memory cgroup when node is onlined

2012-09-13 Thread Kamezawa Hiroyuki
(2012/09/13 16:14), Wen Congyang wrote: root_mem_cgroup-info.nodeinfo is initialized when the system boots. But NODE_DATA(nid) is null if the node is not onlined, so root_mem_cgroup-info.nodeinfo[nid]-zoneinfo[zone].lruvec.zone contains an invalid pointer. If we use numactl to bind a program to

Re: [PATCH v3 4/4] memory-hotplug: fix pages missed by race rather than failng

2012-09-06 Thread Kamezawa Hiroyuki
s detected. > It could enhance memory-hotremove operation success ratio although > the race is really rare. > > Suggested-by: Mel Gorman > Signed-off-by: Minchan Kim Sounds reasonable. Thank you very much ! Acked-by: KAMEZAWA Hiroyuki -- To unsubscribe from this list: send th

Re: [PATCH v2 3/3] memory-hotplug: bug fix race between isolation and allocation

2012-09-06 Thread Kamezawa Hiroyuki
> */ > BUG_ON(!PageBuddy(page A)); > > This patch checks page's migratetype in freelist in > __test_page_isolated_in_pageblock. > So now __test_page_isolated_in_pageblock can check the page caused by above > race and > can fail of memory offlining. > > Signed-off-by: Mi

Re: [PATCH v2 2/3] mm: remain migratetype in freed page

2012-09-06 Thread Kamezawa Hiroyuki
t hurt. > > * from v1 >* Fix move_freepages's migratetype - Mel >* Add more kind explanation in description - Mel > > Signed-off-by: Minchan Kim Hmm, page->index is valid only when the page is the head of buddy chunk ? Anyway, Acked-by: KAMEZAWA Hiroyuki > --- >

Re: [PATCH v2 1/3] use get_page_migratetype instead of page_private

2012-09-06 Thread Kamezawa Hiroyuki
t_page_migratetype with set_freepage_migratetype >* Add comment on set_freepage_migratetype > > Signed-off-by: Minchan Kim seems good to me. Acked-by: KAMEZAWA Hiroyuki -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.ke

Re: [PATCH v2 1/3] use get_page_migratetype instead of page_private

2012-09-06 Thread Kamezawa Hiroyuki
* Add comment on set_freepage_migratetype Signed-off-by: Minchan Kim minc...@kernel.org seems good to me. Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord

Re: [PATCH v2 2/3] mm: remain migratetype in freed page

2012-09-06 Thread Kamezawa Hiroyuki
- Mel * Add more kind explanation in description - Mel Signed-off-by: Minchan Kim minc...@kernel.org Hmm, page-index is valid only when the page is the head of buddy chunk ? Anyway, Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com --- include/linux/mm.h |4 ++-- mm

Re: [PATCH v2 3/3] memory-hotplug: bug fix race between isolation and allocation

2012-09-06 Thread Kamezawa Hiroyuki
by above race and can fail of memory offlining. Signed-off-by: Minchan Kim minc...@kernel.org I agree this fix. Maybe we (fujitsu) should revisit these logics around and make it cleaner Anyway, thank you! Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com --- mm

Re: [PATCH v3 4/4] memory-hotplug: fix pages missed by race rather than failng

2012-09-06 Thread Kamezawa Hiroyuki
-hotremove operation success ratio although the race is really rare. Suggested-by: Mel Gorman mgor...@suse.de Signed-off-by: Minchan Kim minc...@kernel.org Sounds reasonable. Thank you very much ! Acked-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com -- To unsubscribe from this list: send

Re: [PATCH 1/3] mm: use get_page_migratetype instead of page_private

2012-09-05 Thread Kamezawa Hiroyuki
(2012/09/05 16:26), Minchan Kim wrote: > page allocator uses set_page_private and page_private for handling > migratetype when it frees page. Let's replace them with [set|get] > _page_migratetype to make it more clear. > > Signed-off-by: Minchan Kim Hmm. one request from me. > --- >

Re: [PATCH 1/3] mm: use get_page_migratetype instead of page_private

2012-09-05 Thread Kamezawa Hiroyuki
(2012/09/05 16:26), Minchan Kim wrote: page allocator uses set_page_private and page_private for handling migratetype when it frees page. Let's replace them with [set|get] _page_migratetype to make it more clear. Signed-off-by: Minchan Kim minc...@kernel.org Hmm. one request from me. ---

Re: [PATCH v2 06/11] memcg: kmem controller infrastructure

2012-08-20 Thread Kamezawa Hiroyuki
(2012/08/16 2:00), Glauber Costa wrote: On 08/15/2012 08:38 PM, Greg Thelen wrote: On Wed, Aug 15 2012, Glauber Costa wrote: On 08/14/2012 10:58 PM, Greg Thelen wrote: On Mon, Aug 13 2012, Glauber Costa wrote: + WARN_ON(mem_cgroup_is_root(memcg)); + size = (1 << order) <<

Re: [PATCH v2 06/11] memcg: kmem controller infrastructure

2012-08-20 Thread Kamezawa Hiroyuki
(2012/08/16 2:00), Glauber Costa wrote: On 08/15/2012 08:38 PM, Greg Thelen wrote: On Wed, Aug 15 2012, Glauber Costa wrote: On 08/14/2012 10:58 PM, Greg Thelen wrote: On Mon, Aug 13 2012, Glauber Costa wrote: + WARN_ON(mem_cgroup_is_root(memcg)); + size = (1 order)

Re: [PATCH v2 04/11] kmem accounting basic infrastructure

2012-08-16 Thread Kamezawa Hiroyuki
(2012/08/13 17:36), Glauber Costa wrote: > On 08/10/2012 09:02 PM, Kamezawa Hiroyuki wrote: >> (2012/08/09 22:01), Glauber Costa wrote: >>> This patch adds the basic infrastructure for the accounting of the slab >>> caches. To control that, the

Re: [PATCH v2 06/11] memcg: kmem controller infrastructure

2012-08-16 Thread Kamezawa Hiroyuki
(2012/08/13 17:28), Glauber Costa wrote: + * Needs to be called after memcg_kmem_new_page, regardless of success or + * failure of the allocation. if @page is NULL, this function will revert the + * charges. Otherwise, it will commit the memcg given by @handle to the + *

Re: [PATCH v2 06/11] memcg: kmem controller infrastructure

2012-08-16 Thread Kamezawa Hiroyuki
(2012/08/13 17:28), Glauber Costa wrote: + * Needs to be called after memcg_kmem_new_page, regardless of success or + * failure of the allocation. if @page is NULL, this function will revert the + * charges. Otherwise, it will commit the memcg given by @handle to the + * corresponding

Re: [PATCH v2 04/11] kmem accounting basic infrastructure

2012-08-16 Thread Kamezawa Hiroyuki
(2012/08/13 17:36), Glauber Costa wrote: On 08/10/2012 09:02 PM, Kamezawa Hiroyuki wrote: (2012/08/09 22:01), Glauber Costa wrote: This patch adds the basic infrastructure for the accounting of the slab caches. To control that, the following files are created: * memory.kmem.usage_in_bytes

Re: [PATCH v2 02/11] memcg: Reclaim when more than one page needed.

2012-08-10 Thread Kamezawa Hiroyuki
(2012/08/11 2:28), Michal Hocko wrote: On Sat 11-08-12 01:49:25, KAMEZAWA Hiroyuki wrote: (2012/08/11 0:42), Michal Hocko wrote: On Thu 09-08-12 17:01:10, Glauber Costa wrote: [...] @@ -2317,18 +2318,18 @@ static int mem_cgroup_do_charge(struct mem_cgroup *memcg, gfp_t gfp_mask

Re: [PATCH v2 11/11] protect architectures where THREAD_SIZE >= PAGE_SIZE against fork bombs

2012-08-10 Thread Kamezawa Hiroyuki
t flag. > > Tested to successfully protect against :(){ :|:& };: > > Signed-off-by: Glauber Costa > Acked-by: Frederic Weisbecker > CC: Christoph Lameter > CC: Pekka Enberg > CC: Michal Hocko > CC: Kamezawa Hiroyuki > CC: Johannes Weiner > CC: Suleiman Souhlal Acked

Re: [PATCH v2 09/11] memcg: propagate kmem limiting information to children

2012-08-10 Thread Kamezawa Hiroyuki
ed. > > Signed-off-by: Glauber Costa > CC: Christoph Lameter > CC: Pekka Enberg > CC: Michal Hocko > CC: Kamezawa Hiroyuki > CC: Johannes Weiner > CC: Suleiman Souhlal > --- > mm/memcontrol.c | 88 > +++---

Re: [PATCH v2 07/11] mm: Allocate kernel pages to the right memcg

2012-08-10 Thread Kamezawa Hiroyuki
s is done by the invocation of > __free_accounted_pages() and free_accounted_pages(). > > Signed-off-by: Glauber Costa > CC: Christoph Lameter > CC: Pekka Enberg > CC: Michal Hocko > CC: Kamezawa Hiroyuki > CC: Johannes Weiner > CC: Suleiman Souhlal Ah, ok. free_account

Re: [PATCH v2 06/11] memcg: kmem controller infrastructure

2012-08-10 Thread Kamezawa Hiroyuki
y: Glauber Costa > CC: Christoph Lameter > CC: Pekka Enberg > CC: Michal Hocko > CC: Kamezawa Hiroyuki > CC: Johannes Weiner > --- > include/linux/memcontrol.h | 79 +++ > mm/memcontrol.c| 185 >

Re: [PATCH v2 05/11] Add a __GFP_KMEMCG flag

2012-08-10 Thread Kamezawa Hiroyuki
; > Signed-off-by: Glauber Costa > CC: Christoph Lameter > CC: Pekka Enberg > CC: Michal Hocko > CC: Kamezawa Hiroyuki > CC: Johannes Weiner > CC: Suleiman Souhlal > CC: Rik van Riel > CC: Mel Gorman Okay, so, only memcg-aware allocations are accounted. It seems a sa

Re: [PATCH v2 04/11] kmem accounting basic infrastructure

2012-08-10 Thread Kamezawa Hiroyuki
URCE_MAX - 1page - that no one > will ever hit, or equal to the user memory) > > Signed-off-by: Glauber Costa > CC: Michal Hocko > CC: Johannes Weiner > Reviewed-by: Kamezawa Hiroyuki Could you add a patch for documentation of this new interface and a text explaining the behav

Re: [PATCH v2 02/11] memcg: Reclaim when more than one page needed.

2012-08-10 Thread Kamezawa Hiroyuki
(2012/08/11 0:42), Michal Hocko wrote: On Thu 09-08-12 17:01:10, Glauber Costa wrote: [...] @@ -2317,18 +2318,18 @@ static int mem_cgroup_do_charge(struct mem_cgroup *memcg, gfp_t gfp_mask, } else mem_over_limit = mem_cgroup_from_res_counter(fail_res, res); /* -

Re: [PATCH v2 02/11] memcg: Reclaim when more than one page needed.

2012-08-10 Thread Kamezawa Hiroyuki
(2012/08/11 0:42), Michal Hocko wrote: On Thu 09-08-12 17:01:10, Glauber Costa wrote: [...] @@ -2317,18 +2318,18 @@ static int mem_cgroup_do_charge(struct mem_cgroup *memcg, gfp_t gfp_mask, } else mem_over_limit = mem_cgroup_from_res_counter(fail_res, res); /* -

Re: [PATCH v2 04/11] kmem accounting basic infrastructure

2012-08-10 Thread Kamezawa Hiroyuki
...@parallels.com CC: Michal Hocko mho...@suse.cz CC: Johannes Weiner han...@cmpxchg.org Reviewed-by: Kamezawa Hiroyuki kamezawa.hir...@jp.fujitsu.com Could you add a patch for documentation of this new interface and a text explaining the behavior of kmem_accounting ? Hm, my concern is the difference

<    1   2   3   4   5   6   7   8   9   10   >