From: Glauber Costa <glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
To: KAMEZAWA Hiroyuki
<kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org,
ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org,
davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org,
gthelen-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org,
kirill-oKw7cIdHH8eLwutG50LtGA@public.gmane.org,
avagin-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org,
devel-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org,
eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org,
mhocko-AlSwsSmVLrQ@public.gmane.org,
Paul Menage <paul-inf54ven1CmVyaH7bEyXVA@public.gmane.org>
Subject: Re: [PATCH v8 1/9] Basic kernel memory functionality for the Memory Controller
Date: Fri, 9 Dec 2011 10:40:00 -0200 [thread overview]
Message-ID: <4EE201A0.9040601@parallels.com> (raw)
In-Reply-To: <20111209102113.cdb85da8.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
On 12/08/2011 11:21 PM, KAMEZAWA Hiroyuki wrote:
> On Mon, 5 Dec 2011 19:34:55 -0200
> Glauber Costa<glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org> wrote:
>
>> This patch lays down the foundation for the kernel memory component
>> of the Memory Controller.
>>
>> As of today, I am only laying down the following files:
>>
>> * memory.independent_kmem_limit
>> * memory.kmem.limit_in_bytes (currently ignored)
>> * memory.kmem.usage_in_bytes (always zero)
>>
>> Signed-off-by: Glauber Costa<glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
>> Reviewed-by: Kirill A. Shutemov<kirill-oKw7cIdHH8eLwutG50LtGA@public.gmane.org>
>> CC: Paul Menage<paul-inf54ven1CmVyaH7bEyXVA@public.gmane.org>
>> CC: Greg Thelen<gthelen-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
>
> As I wrote, please CC Johannes and Michal Hocko for memcg related parts.
I forgot to add them to the patch itself, but they are in the CC list of
the messages.
So they did get the mail.
> A few questions.
> ==
>> + val = !!val;
>> +
>> + if (parent&& parent->use_hierarchy&&
>> + (val != parent->kmem_independent_accounting))
>> + return -EINVAL;
> ==
> Hm, why you check val != parent->kmem_independent_accounting ?
>
> if (parent&& parent->use_hierarchy)
> return -EINVAL;
> ?
Because I thought that making sure that everybody in the chain is
consistent, it will make things simpler for us. But I am happy to change
that if you prefer.
> BTW, you didn't check this cgroup has children or not.
> I think
>
> if (this_cgroup->use_hierarchy&&
> !list_empty(this_cgroup->childlen))
> return -EINVAL;
>
Noted.
> ==
>> + /*
>> + * TODO: We need to handle the case in which we are doing
>> + * independent kmem accounting as authorized by our parent,
>> + * but then our parent changes its parameter.
>> + */
>> + cgroup_lock();
>> + memcg->kmem_independent_accounting = val;
>> + cgroup_unlock();
>
> Do we need cgroup_lock() here ?
Well, I removed almost all instances of it from previous patches, so I
guess this one can go as well.
--
To unsubscribe from this list: send the line "unsubscribe cgroups" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Glauber Costa <glommer@parallels.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, lizf@cn.fujitsu.com,
ebiederm@xmission.com, davem@davemloft.net, gthelen@google.com,
netdev@vger.kernel.org, linux-mm@kvack.org, kirill@shutemov.name,
avagin@parallels.com, devel@openvz.org, eric.dumazet@gmail.com,
cgroups@vger.kernel.org, hannes@cmpxchg.org, mhocko@suse.cz,
Paul Menage <paul@paulmenage.org>
Subject: Re: [PATCH v8 1/9] Basic kernel memory functionality for the Memory Controller
Date: Fri, 9 Dec 2011 10:40:00 -0200 [thread overview]
Message-ID: <4EE201A0.9040601@parallels.com> (raw)
In-Reply-To: <20111209102113.cdb85da8.kamezawa.hiroyu@jp.fujitsu.com>
On 12/08/2011 11:21 PM, KAMEZAWA Hiroyuki wrote:
> On Mon, 5 Dec 2011 19:34:55 -0200
> Glauber Costa<glommer@parallels.com> wrote:
>
>> This patch lays down the foundation for the kernel memory component
>> of the Memory Controller.
>>
>> As of today, I am only laying down the following files:
>>
>> * memory.independent_kmem_limit
>> * memory.kmem.limit_in_bytes (currently ignored)
>> * memory.kmem.usage_in_bytes (always zero)
>>
>> Signed-off-by: Glauber Costa<glommer@parallels.com>
>> Reviewed-by: Kirill A. Shutemov<kirill@shutemov.name>
>> CC: Paul Menage<paul@paulmenage.org>
>> CC: Greg Thelen<gthelen@google.com>
>
> As I wrote, please CC Johannes and Michal Hocko for memcg related parts.
I forgot to add them to the patch itself, but they are in the CC list of
the messages.
So they did get the mail.
> A few questions.
> ==
>> + val = !!val;
>> +
>> + if (parent&& parent->use_hierarchy&&
>> + (val != parent->kmem_independent_accounting))
>> + return -EINVAL;
> ==
> Hm, why you check val != parent->kmem_independent_accounting ?
>
> if (parent&& parent->use_hierarchy)
> return -EINVAL;
> ?
Because I thought that making sure that everybody in the chain is
consistent, it will make things simpler for us. But I am happy to change
that if you prefer.
> BTW, you didn't check this cgroup has children or not.
> I think
>
> if (this_cgroup->use_hierarchy&&
> !list_empty(this_cgroup->childlen))
> return -EINVAL;
>
Noted.
> ==
>> + /*
>> + * TODO: We need to handle the case in which we are doing
>> + * independent kmem accounting as authorized by our parent,
>> + * but then our parent changes its parameter.
>> + */
>> + cgroup_lock();
>> + memcg->kmem_independent_accounting = val;
>> + cgroup_unlock();
>
> Do we need cgroup_lock() here ?
Well, I removed almost all instances of it from previous patches, so I
guess this one can go as well.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Glauber Costa <glommer@parallels.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: <linux-kernel@vger.kernel.org>, <lizf@cn.fujitsu.com>,
<ebiederm@xmission.com>, <davem@davemloft.net>,
<gthelen@google.com>, <netdev@vger.kernel.org>,
<linux-mm@kvack.org>, <kirill@shutemov.name>,
<avagin@parallels.com>, <devel@openvz.org>,
<eric.dumazet@gmail.com>, <cgroups@vger.kernel.org>,
<hannes@cmpxchg.org>, <mhocko@suse.cz>,
Paul Menage <paul@paulmenage.org>
Subject: Re: [PATCH v8 1/9] Basic kernel memory functionality for the Memory Controller
Date: Fri, 9 Dec 2011 10:40:00 -0200 [thread overview]
Message-ID: <4EE201A0.9040601@parallels.com> (raw)
In-Reply-To: <20111209102113.cdb85da8.kamezawa.hiroyu@jp.fujitsu.com>
On 12/08/2011 11:21 PM, KAMEZAWA Hiroyuki wrote:
> On Mon, 5 Dec 2011 19:34:55 -0200
> Glauber Costa<glommer@parallels.com> wrote:
>
>> This patch lays down the foundation for the kernel memory component
>> of the Memory Controller.
>>
>> As of today, I am only laying down the following files:
>>
>> * memory.independent_kmem_limit
>> * memory.kmem.limit_in_bytes (currently ignored)
>> * memory.kmem.usage_in_bytes (always zero)
>>
>> Signed-off-by: Glauber Costa<glommer@parallels.com>
>> Reviewed-by: Kirill A. Shutemov<kirill@shutemov.name>
>> CC: Paul Menage<paul@paulmenage.org>
>> CC: Greg Thelen<gthelen@google.com>
>
> As I wrote, please CC Johannes and Michal Hocko for memcg related parts.
I forgot to add them to the patch itself, but they are in the CC list of
the messages.
So they did get the mail.
> A few questions.
> ==
>> + val = !!val;
>> +
>> + if (parent&& parent->use_hierarchy&&
>> + (val != parent->kmem_independent_accounting))
>> + return -EINVAL;
> ==
> Hm, why you check val != parent->kmem_independent_accounting ?
>
> if (parent&& parent->use_hierarchy)
> return -EINVAL;
> ?
Because I thought that making sure that everybody in the chain is
consistent, it will make things simpler for us. But I am happy to change
that if you prefer.
> BTW, you didn't check this cgroup has children or not.
> I think
>
> if (this_cgroup->use_hierarchy&&
> !list_empty(this_cgroup->childlen))
> return -EINVAL;
>
Noted.
> ==
>> + /*
>> + * TODO: We need to handle the case in which we are doing
>> + * independent kmem accounting as authorized by our parent,
>> + * but then our parent changes its parameter.
>> + */
>> + cgroup_lock();
>> + memcg->kmem_independent_accounting = val;
>> + cgroup_unlock();
>
> Do we need cgroup_lock() here ?
Well, I removed almost all instances of it from previous patches, so I
guess this one can go as well.
WARNING: multiple messages have this Message-ID (diff)
From: Glauber Costa <glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
To: KAMEZAWA Hiroyuki
<kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
Cc: <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
<lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>,
<ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>,
<davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
<gthelen-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
<linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org>,
<kirill-oKw7cIdHH8eLwutG50LtGA@public.gmane.org>,
<avagin-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>,
<devel-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>,
<eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
<cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
<hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>,
<mhocko-AlSwsSmVLrQ@public.gmane.org>,
Paul Menage <paul-inf54ven1CmVyaH7bEyXVA@public.gmane.org>
Subject: Re: [PATCH v8 1/9] Basic kernel memory functionality for the Memory Controller
Date: Fri, 9 Dec 2011 10:40:00 -0200 [thread overview]
Message-ID: <4EE201A0.9040601@parallels.com> (raw)
In-Reply-To: <20111209102113.cdb85da8.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
On 12/08/2011 11:21 PM, KAMEZAWA Hiroyuki wrote:
> On Mon, 5 Dec 2011 19:34:55 -0200
> Glauber Costa<glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org> wrote:
>
>> This patch lays down the foundation for the kernel memory component
>> of the Memory Controller.
>>
>> As of today, I am only laying down the following files:
>>
>> * memory.independent_kmem_limit
>> * memory.kmem.limit_in_bytes (currently ignored)
>> * memory.kmem.usage_in_bytes (always zero)
>>
>> Signed-off-by: Glauber Costa<glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
>> Reviewed-by: Kirill A. Shutemov<kirill-oKw7cIdHH8eLwutG50LtGA@public.gmane.org>
>> CC: Paul Menage<paul-inf54ven1CmVyaH7bEyXVA@public.gmane.org>
>> CC: Greg Thelen<gthelen-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
>
> As I wrote, please CC Johannes and Michal Hocko for memcg related parts.
I forgot to add them to the patch itself, but they are in the CC list of
the messages.
So they did get the mail.
> A few questions.
> ==
>> + val = !!val;
>> +
>> + if (parent&& parent->use_hierarchy&&
>> + (val != parent->kmem_independent_accounting))
>> + return -EINVAL;
> ==
> Hm, why you check val != parent->kmem_independent_accounting ?
>
> if (parent&& parent->use_hierarchy)
> return -EINVAL;
> ?
Because I thought that making sure that everybody in the chain is
consistent, it will make things simpler for us. But I am happy to change
that if you prefer.
> BTW, you didn't check this cgroup has children or not.
> I think
>
> if (this_cgroup->use_hierarchy&&
> !list_empty(this_cgroup->childlen))
> return -EINVAL;
>
Noted.
> ==
>> + /*
>> + * TODO: We need to handle the case in which we are doing
>> + * independent kmem accounting as authorized by our parent,
>> + * but then our parent changes its parameter.
>> + */
>> + cgroup_lock();
>> + memcg->kmem_independent_accounting = val;
>> + cgroup_unlock();
>
> Do we need cgroup_lock() here ?
Well, I removed almost all instances of it from previous patches, so I
guess this one can go as well.
--
To unsubscribe from this list: send the line "unsubscribe cgroups" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-12-09 12:40 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-05 21:34 [PATCH v8 0/9] per-cgroup tcp memory pressure controls Glauber Costa
2011-12-05 21:34 ` Glauber Costa
2011-12-05 21:34 ` [PATCH v8 1/9] Basic kernel memory functionality for the Memory Controller Glauber Costa
2011-12-05 21:34 ` Glauber Costa
2011-12-09 1:21 ` KAMEZAWA Hiroyuki
2011-12-09 1:21 ` KAMEZAWA Hiroyuki
[not found] ` <20111209102113.cdb85da8.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2011-12-09 12:40 ` Glauber Costa [this message]
2011-12-09 12:40 ` Glauber Costa
2011-12-09 12:40 ` Glauber Costa
2011-12-09 12:40 ` Glauber Costa
2011-12-09 14:37 ` Glauber Costa
2011-12-09 14:37 ` Glauber Costa
2011-12-09 14:37 ` Glauber Costa
2011-12-09 14:37 ` Glauber Costa
2011-12-09 14:44 ` David Laight
2011-12-09 14:44 ` David Laight
2011-12-09 14:44 ` David Laight
2011-12-09 14:48 ` Glauber Costa
2011-12-09 14:48 ` Glauber Costa
2011-12-09 14:48 ` Glauber Costa
2011-12-12 0:34 ` KAMEZAWA Hiroyuki
2011-12-12 0:34 ` KAMEZAWA Hiroyuki
2011-12-12 0:34 ` KAMEZAWA Hiroyuki
2011-12-05 21:34 ` [PATCH v8 2/9] foundations of per-cgroup memory pressure controlling Glauber Costa
2011-12-05 21:34 ` Glauber Costa
[not found] ` <1323120903-2831-3-git-send-email-glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-12-09 1:24 ` KAMEZAWA Hiroyuki
2011-12-09 1:24 ` KAMEZAWA Hiroyuki
2011-12-09 1:24 ` KAMEZAWA Hiroyuki
2011-12-09 12:41 ` Glauber Costa
2011-12-09 12:41 ` Glauber Costa
2011-12-09 12:41 ` Glauber Costa
2011-12-05 21:34 ` [PATCH v8 3/9] socket: initial cgroup code Glauber Costa
2011-12-05 21:34 ` Glauber Costa
[not found] ` <1323120903-2831-4-git-send-email-glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-12-09 1:49 ` KAMEZAWA Hiroyuki
2011-12-09 1:49 ` KAMEZAWA Hiroyuki
2011-12-09 1:49 ` KAMEZAWA Hiroyuki
2011-12-09 2:05 ` KAMEZAWA Hiroyuki
2011-12-09 2:05 ` KAMEZAWA Hiroyuki
2011-12-09 2:05 ` KAMEZAWA Hiroyuki
2011-12-09 12:43 ` Glauber Costa
2011-12-09 12:43 ` Glauber Costa
2011-12-09 12:43 ` Glauber Costa
[not found] ` <4EE20254.6000308-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-12-12 0:33 ` KAMEZAWA Hiroyuki
2011-12-12 0:33 ` KAMEZAWA Hiroyuki
2011-12-12 0:33 ` KAMEZAWA Hiroyuki
2011-12-12 0:33 ` KAMEZAWA Hiroyuki
2011-12-05 21:34 ` [PATCH v8 4/9] tcp memory pressure controls Glauber Costa
2011-12-05 21:34 ` Glauber Costa
2011-12-09 1:51 ` KAMEZAWA Hiroyuki
2011-12-09 1:51 ` KAMEZAWA Hiroyuki
2011-12-05 21:34 ` [PATCH v8 5/9] per-netns ipv4 sysctl_tcp_mem Glauber Costa
2011-12-05 21:34 ` Glauber Costa
[not found] ` <1323120903-2831-6-git-send-email-glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-12-09 1:54 ` KAMEZAWA Hiroyuki
2011-12-09 1:54 ` KAMEZAWA Hiroyuki
2011-12-09 1:54 ` KAMEZAWA Hiroyuki
2011-12-05 21:35 ` [PATCH v8 6/9] tcp buffer limitation: per-cgroup limit Glauber Costa
2011-12-05 21:35 ` Glauber Costa
2011-12-09 1:55 ` KAMEZAWA Hiroyuki
2011-12-09 1:55 ` KAMEZAWA Hiroyuki
2011-12-05 21:35 ` [PATCH v8 7/9] Display current tcp memory allocation in kmem cgroup Glauber Costa
2011-12-05 21:35 ` Glauber Costa
2011-12-09 1:56 ` KAMEZAWA Hiroyuki
2011-12-09 1:56 ` KAMEZAWA Hiroyuki
2011-12-05 21:35 ` [PATCH v8 8/9] Display current tcp failcnt " Glauber Costa
2011-12-05 21:35 ` Glauber Costa
2011-12-05 21:35 ` [PATCH v8 9/9] Display maximum tcp memory allocation " Glauber Costa
2011-12-05 21:35 ` Glauber Costa
[not found] ` <1323120903-2831-10-git-send-email-glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-12-09 1:57 ` KAMEZAWA Hiroyuki
2011-12-09 1:57 ` KAMEZAWA Hiroyuki
2011-12-09 1:57 ` KAMEZAWA Hiroyuki
[not found] ` <1323120903-2831-1-git-send-email-glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-12-07 11:06 ` [PATCH v8 0/9] per-cgroup tcp memory pressure controls Glauber Costa
2011-12-07 11:06 ` Glauber Costa
2011-12-07 11:06 ` Glauber Costa
2011-12-07 11:06 ` Glauber Costa
2011-12-09 1:04 ` KAMEZAWA Hiroyuki
2011-12-09 1:04 ` KAMEZAWA Hiroyuki
2011-12-09 1:04 ` KAMEZAWA Hiroyuki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EE201A0.9040601@parallels.com \
--to=glommer-bzqdu9zft3wakbo8gow8eq@public.gmane.org \
--cc=avagin-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=devel-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
--cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
--cc=eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=gthelen-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
--cc=kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org \
--cc=kirill-oKw7cIdHH8eLwutG50LtGA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
--cc=lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org \
--cc=mhocko-AlSwsSmVLrQ@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=paul-inf54ven1CmVyaH7bEyXVA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.