[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <492C1345.9090201@linux.vnet.ibm.com>
Date: Tue, 25 Nov 2008 20:31:25 +0530
From: Balbir Singh <balbir@...ux.vnet.ibm.com>
To: Daisuke Nishimura <nishimura@....nes.nec.co.jp>
CC: linux-mm@...ck.org, YAMAMOTO Takashi <yamamoto@...inux.co.jp>,
Paul Menage <menage@...gle.com>, lizf@...fujitsu.com,
linux-kernel@...r.kernel.org,
Nick Piggin <nickpiggin@...oo.com.au>,
David Rientjes <rientjes@...gle.com>,
Pavel Emelianov <xemul@...nvz.org>,
Dhaval Giani <dhaval@...ux.vnet.ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Subject: Re: [mm] [PATCH 3/4] Memory cgroup hierarchical reclaim (v4)
Daisuke Nishimura wrote:
> Hi.
>
> Unfortunately, trying to hold cgroup_mutex at reclaim causes dead lock.
>
> For example, when attaching a task to some cpuset directory(memory_migrate=on),
>
> cgroup_tasks_write (hold cgroup_mutex)
> attach_task_by_pid
> cgroup_attach_task
> cpuset_attach
> cpuset_migrate_mm
> :
> unmap_and_move
> mem_cgroup_prepare_migration
> mem_cgroup_try_charge
> mem_cgroup_hierarchical_reclaim
>
Did lockdep complain about it?
1. We could probably move away from cgroup_mutex to a memory controller specific
mutex.
2. We could give up cgroup_mutex before migrate_mm, since it seems like we'll
hold the cgroup lock for long and holding it during reclaim will definitely be
visible to users trying to create/delete nodes.
I prefer to do (2), I'll look at the code more closely
> I think similar problem can also happen when removing memcg's directory.
>
Why removing a directory? memcg (now) marks the directory as obsolete and we
check for obsolete directories and get/put references.
Thanks for the bug report!
--
Balbir
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists