Re: [PATCH V3 4/8] memcg: add per cgroup dirty pages accounting

2013-05-03 Thread Sha Zhengju
On Fri, May 3, 2013 at 5:11 PM, Michal Hocko wrote: > On Wed 02-01-13 11:44:21, Michal Hocko wrote: >> On Wed 26-12-12 01:26:07, Sha Zhengju wrote: >> > From: Sha Zhengju >> > >> > This patch adds memcg routines to count dirty pages, which allows memory >> > controller >> > to maintain an accura

Re: [PATCH V3 4/8] memcg: add per cgroup dirty pages accounting

2013-05-03 Thread Michal Hocko
On Wed 02-01-13 11:44:21, Michal Hocko wrote: > On Wed 26-12-12 01:26:07, Sha Zhengju wrote: > > From: Sha Zhengju > > > > This patch adds memcg routines to count dirty pages, which allows memory > > controller > > to maintain an accurate view of the amount of its dirty memory and can > > provi

Re: [PATCH V3 4/8] memcg: add per cgroup dirty pages accounting

2013-01-10 Thread Sha Zhengju
On Thu, Jan 10, 2013 at 1:03 PM, Kamezawa Hiroyuki wrote: > (2013/01/10 13:26), Sha Zhengju wrote: > >> But this method also has its pros and cons(e.g. need lock nesting). So >> I doubt whether the following is able to deal with these issues all >> together: >> (CPU-A does "page stat accounting" a

Re: [PATCH V3 4/8] memcg: add per cgroup dirty pages accounting

2013-01-09 Thread Kamezawa Hiroyuki
(2013/01/10 13:26), Sha Zhengju wrote: But this method also has its pros and cons(e.g. need lock nesting). So I doubt whether the following is able to deal with these issues all together: (CPU-A does "page stat accounting" and CPU-B does "move") CPU-ACP

Re: [PATCH V3 4/8] memcg: add per cgroup dirty pages accounting

2013-01-09 Thread Sha Zhengju
On Thu, Jan 10, 2013 at 10:16 AM, Kamezawa Hiroyuki wrote: > (2013/01/10 0:02), Sha Zhengju wrote: >> >> On Mon, Jan 7, 2013 at 3:25 PM, Kamezawa Hiroyuki >> wrote: >>> >>> (2013/01/05 13:48), Sha Zhengju wrote: On Wed, Jan 2, 2013 at 6:44 PM, Michal Hocko wrote: > > >

Re: [PATCH V3 4/8] memcg: add per cgroup dirty pages accounting

2013-01-09 Thread Kamezawa Hiroyuki
(2013/01/10 0:02), Sha Zhengju wrote: On Mon, Jan 7, 2013 at 3:25 PM, Kamezawa Hiroyuki wrote: (2013/01/05 13:48), Sha Zhengju wrote: On Wed, Jan 2, 2013 at 6:44 PM, Michal Hocko wrote: On Wed 26-12-12 01:26:07, Sha Zhengju wrote: From: Sha Zhengju This patch adds memcg routines to cou

Re: [PATCH V3 4/8] memcg: add per cgroup dirty pages accounting

2013-01-09 Thread Sha Zhengju
On Mon, Jan 7, 2013 at 3:25 PM, Kamezawa Hiroyuki wrote: > (2013/01/05 13:48), Sha Zhengju wrote: >> >> On Wed, Jan 2, 2013 at 6:44 PM, Michal Hocko wrote: >>> >>> On Wed 26-12-12 01:26:07, Sha Zhengju wrote: From: Sha Zhengju This patch adds memcg routines to count dirty pag

Re: [PATCH V3 4/8] memcg: add per cgroup dirty pages accounting

2013-01-09 Thread Michal Hocko
On Wed 09-01-13 22:35:12, Sha Zhengju wrote: [...] > To my knowledge, each task is forked in root memcg, and there's a > moving while attaching it to a cgroup. So move_account is also a > frequent behavior to some extent. Not really. Every fork/exec is copies the current group (see cgroup_fork) so

Re: [PATCH V3 4/8] memcg: add per cgroup dirty pages accounting

2013-01-09 Thread Sha Zhengju
Hi Hugh, On Mon, Jan 7, 2013 at 4:02 AM, Hugh Dickins wrote: > On Sat, 5 Jan 2013, Sha Zhengju wrote: >> On Wed, Jan 2, 2013 at 6:44 PM, Michal Hocko wrote: >> > >> > Maybe I have missed some other locking which would prevent this from >> > happening but the locking relations are really complica

Re: [PATCH V3 4/8] memcg: add per cgroup dirty pages accounting

2013-01-09 Thread Sha Zhengju
On Mon, Jan 7, 2013 at 4:07 AM, Greg Thelen wrote: > On Tue, Dec 25 2012, Sha Zhengju wrote: > >> From: Sha Zhengju >> >> This patch adds memcg routines to count dirty pages, which allows memory >> controller >> to maintain an accurate view of the amount of its dirty memory and can >> provide s

Re: [PATCH V3 4/8] memcg: add per cgroup dirty pages accounting

2013-01-08 Thread Kamezawa Hiroyuki
(2013/01/09 14:15), Hugh Dickins wrote: On Mon, 7 Jan 2013, Kamezawa Hiroyuki wrote: (2013/01/07 5:02), Hugh Dickins wrote: Forgive me, I must confess I'm no more than skimming this thread, and don't like dumping unsigned-off patches on people; but thought that on balance it might be more help

Re: [PATCH V3 4/8] memcg: add per cgroup dirty pages accounting

2013-01-08 Thread Hugh Dickins
On Mon, 7 Jan 2013, Kamezawa Hiroyuki wrote: > (2013/01/07 5:02), Hugh Dickins wrote: > > > > Forgive me, I must confess I'm no more than skimming this thread, > > and don't like dumping unsigned-off patches on people; but thought > > that on balance it might be more helpful than not if I offer yo

Re: [PATCH V3 4/8] memcg: add per cgroup dirty pages accounting

2013-01-06 Thread Kamezawa Hiroyuki
(2013/01/07 5:02), Hugh Dickins wrote: On Sat, 5 Jan 2013, Sha Zhengju wrote: On Wed, Jan 2, 2013 at 6:44 PM, Michal Hocko wrote: Maybe I have missed some other locking which would prevent this from happening but the locking relations are really complicated in this area so if mem_cgroup_{begi

Re: [PATCH V3 4/8] memcg: add per cgroup dirty pages accounting

2013-01-06 Thread Kamezawa Hiroyuki
(2013/01/05 13:48), Sha Zhengju wrote: On Wed, Jan 2, 2013 at 6:44 PM, Michal Hocko wrote: On Wed 26-12-12 01:26:07, Sha Zhengju wrote: From: Sha Zhengju This patch adds memcg routines to count dirty pages, which allows memory controller to maintain an accurate view of the amount of its dir

Re: [PATCH V3 4/8] memcg: add per cgroup dirty pages accounting

2013-01-06 Thread Greg Thelen
On Tue, Dec 25 2012, Sha Zhengju wrote: > From: Sha Zhengju > > This patch adds memcg routines to count dirty pages, which allows memory > controller > to maintain an accurate view of the amount of its dirty memory and can > provide some > info for users while cgroup's direct reclaim is working

Re: [PATCH V3 4/8] memcg: add per cgroup dirty pages accounting

2013-01-06 Thread Hugh Dickins
On Sat, 5 Jan 2013, Sha Zhengju wrote: > On Wed, Jan 2, 2013 at 6:44 PM, Michal Hocko wrote: > > > > Maybe I have missed some other locking which would prevent this from > > happening but the locking relations are really complicated in this area > > so if mem_cgroup_{begin,end}_update_page_stat mi

Re: [PATCH V3 4/8] memcg: add per cgroup dirty pages accounting

2013-01-04 Thread Sha Zhengju
On Wed, Jan 2, 2013 at 6:44 PM, Michal Hocko wrote: > On Wed 26-12-12 01:26:07, Sha Zhengju wrote: >> From: Sha Zhengju >> >> This patch adds memcg routines to count dirty pages, which allows memory >> controller >> to maintain an accurate view of the amount of its dirty memory and can >> provi

Re: [PATCH V3 4/8] memcg: add per cgroup dirty pages accounting

2013-01-02 Thread Michal Hocko
On Wed 26-12-12 01:26:07, Sha Zhengju wrote: > From: Sha Zhengju > > This patch adds memcg routines to count dirty pages, which allows memory > controller > to maintain an accurate view of the amount of its dirty memory and can > provide some > info for users while cgroup's direct reclaim is wo

[PATCH V3 4/8] memcg: add per cgroup dirty pages accounting

2012-12-25 Thread Sha Zhengju
From: Sha Zhengju This patch adds memcg routines to count dirty pages, which allows memory controller to maintain an accurate view of the amount of its dirty memory and can provide some info for users while cgroup's direct reclaim is working. After Kame's commit 89c06bd5(memcg: use new logic f