[Devel] [PATCH v5 1/8] Basic kernel memory functionality for the Memory Controller

2011-10-04 Thread Glauber Costa
-by: Glauber Costa glom...@parallels.com Reviewed-by: Kirill A. Shutemov kir...@shutemov.name CC: Paul Menage p...@paulmenage.org CC: Greg Thelen gthe...@google.com --- Documentation/cgroups/memory.txt | 36 ++- init/Kconfig | 14 ++ mm/memcontrol.c

[Devel] [PATCH v5 0/8] per-cgroup tcp buffer pressure settings

2011-10-04 Thread Glauber Costa
bytesbytes secs.per sec 16384 87380 11 10.0035304.35 16384 87380 Glauber Costa (8): Basic kernel memory functionality for the Memory Controller socket: initial cgroup code. foundations of per-cgroup memory pressure controlling. per-cgroup tcp buffers

[Devel] [PATCH v5 2/8] socket: initial cgroup code.

2011-10-04 Thread Glauber Costa
We aim to control the amount of kernel memory pinned at any time by tcp sockets. To lay the foundations for this work, this patch adds a pointer to the kmem_cgroup to the socket structure. Signed-off-by: Glauber Costa glom...@parallels.com Acked-by: Kirill A. Shutemovkir...@shutemov.name Reviewed

[Devel] [PATCH v5 6/8] tcp buffer limitation: per-cgroup limit

2011-10-04 Thread Glauber Costa
This patch uses the tcp_max_mem field of the kmem_cgroup to effectively control the amount of kernel memory pinned by a cgroup. We have to make sure that none of the memory pressure thresholds specified in the namespace are bigger than the current cgroup. Signed-off-by: Glauber Costa glom

[Devel] [PATCH v5 3/8] foundations of per-cgroup memory pressure controlling.

2011-10-04 Thread Glauber Costa
-by: Glauber Costa glom...@parallels.com CC: David S. Miller da...@davemloft.net CC: Hiroyouki Kamezawa kamezawa.hir...@jp.fujitsu.com CC: Eric W. Biederman ebied...@xmission.com --- crypto/af_alg.c |7 ++- include/linux/memcontrol.h | 29 +++- include/net/sock.h

[Devel] [PATCH v5 7/8] Display current tcp memory allocation in kmem cgroup

2011-10-04 Thread Glauber Costa
This patch introduces kmem.tcp_current_memory file, living in the kmem_cgroup filesystem. It is a simple read-only file that displays the amount of kernel memory currently consumed by the cgroup. Signed-off-by: Glauber Costa glom...@parallels.com CC: David S. Miller da...@davemloft.net CC

[Devel] [PATCH v5 5/8] per-netns ipv4 sysctl_tcp_mem

2011-10-04 Thread Glauber Costa
This patch allows each namespace to independently set up its levels for tcp memory pressure thresholds. This patch alone does not buy much: we need to make this values per group of process somehow. This is achieved in the patches that follows in this patchset. Signed-off-by: Glauber Costa glom

[Devel] [PATCH v5 8/8] Disable task moving when using kernel memory accounting

2011-10-04 Thread Glauber Costa
Since this code is still experimental, we are leaving the exact details of how to move tasks between cgroups when kernel memory accounting is used as future work. For now, we simply disallow movement if there are any pending accounted memory. Signed-off-by: Glauber Costa glom...@parallels.com CC

[Devel] Re: [PATCH v5 0/8] per-cgroup tcp buffer pressure settings

2011-10-05 Thread Glauber Costa
On 10/05/2011 04:29 AM, KAMEZAWA Hiroyuki wrote: On Tue, 4 Oct 2011 16:17:52 +0400 Glauber Costaglom...@parallels.com wrote: [[ v3: merge Kirill's suggestions, + a destroy-related bugfix ]] [[ v4: Fix a bug with non-mounted cgroups + disallow task movement ]] [[ v5: Compile bug with modular

[Devel] Re: [PATCH v5 6/8] tcp buffer limitation: per-cgroup limit

2011-10-05 Thread Glauber Costa
On 10/04/2011 04:48 PM, Eric Dumazet wrote: Le mardi 04 octobre 2011 à 16:17 +0400, Glauber Costa a écrit : This patch uses the tcp_max_mem field of the kmem_cgroup to effectively control the amount of kernel memory pinned by a cgroup. We have to make sure that none of the memory pressure

[Devel] Re: [PATCH v5 6/8] tcp buffer limitation: per-cgroup limit

2011-10-06 Thread Glauber Costa
On 10/05/2011 12:58 PM, Eric Dumazet wrote: Le mercredi 05 octobre 2011 à 12:08 +0400, Glauber Costa a écrit : On 10/04/2011 04:48 PM, Eric Dumazet wrote: 2) Could you add const qualifiers when possible to your pointers ? Well, I'll go over the patches again and see where I can add them

[Devel] Re: [PATCH v5 0/8] per-cgroup tcp buffer pressure settings

2011-10-07 Thread Glauber Costa
On 10/07/2011 12:05 PM, KAMEZAWA Hiroyuki wrote: Sorry for lazy answer. Hi Kame, Now matter how hard you try, you'll never be as lazy as I am. So that's okay. On Wed, 5 Oct 2011 11:25:50 +0400 Glauber Costaglom...@parallels.com wrote: On 10/05/2011 04:29 AM, KAMEZAWA Hiroyuki wrote:

[Devel] [PATCH v6 0/8] per-cgroup tcp memory pressure handling

2011-10-10 Thread Glauber Costa
with re-use of the files) * softlimit and failcnt are not shown, but I intend to introduce them in a followup series (failcnt is easy, but softlimit may need some more network-side work, at least testing) I will be happy to address any comments you may have. Glauber Costa (8): Basic kernel

[Devel] [PATCH v6 2/8] socket: initial cgroup code.

2011-10-10 Thread Glauber Costa
We aim to control the amount of kernel memory pinned at any time by tcp sockets. To lay the foundations for this work, this patch adds a pointer to the kmem_cgroup to the socket structure. Signed-off-by: Glauber Costa glom...@parallels.com Acked-by: Kirill A. Shutemovkir...@shutemov.name Reviewed

[Devel] [PATCH v6 5/8] per-netns ipv4 sysctl_tcp_mem

2011-10-10 Thread Glauber Costa
This patch allows each namespace to independently set up its levels for tcp memory pressure thresholds. This patch alone does not buy much: we need to make this values per group of process somehow. This is achieved in the patches that follows in this patchset. Signed-off-by: Glauber Costa glom

[Devel] [PATCH v6 1/8] Basic kernel memory functionality for the Memory Controller

2011-10-10 Thread Glauber Costa
-by: Glauber Costa glom...@parallels.com Reviewed-by: Kirill A. Shutemov kir...@shutemov.name CC: Paul Menage p...@paulmenage.org CC: Greg Thelen gthe...@google.com --- Documentation/cgroups/memory.txt | 36 ++- init/Kconfig | 14 ++ mm/memcontrol.c

[Devel] [PATCH v6 7/8] Display current tcp memory allocation in kmem cgroup

2011-10-10 Thread Glauber Costa
This patch introduces kmem.tcp_current_memory file, living in the kmem_cgroup filesystem. It is a simple read-only file that displays the amount of kernel memory currently consumed by the cgroup. Signed-off-by: Glauber Costa glom...@parallels.com CC: David S. Miller da...@davemloft.net CC

[Devel] [PATCH v6 3/8] foundations of per-cgroup memory pressure controlling.

2011-10-10 Thread Glauber Costa
-by: Glauber Costa glom...@parallels.com CC: David S. Miller da...@davemloft.net CC: Hiroyouki Kamezawa kamezawa.hir...@jp.fujitsu.com CC: Eric W. Biederman ebied...@xmission.com --- crypto/af_alg.c |8 +++- include/linux/memcontrol.h | 22 - include/net/sock.h

[Devel] [PATCH v6 4/8] per-cgroup tcp buffers control

2011-10-10 Thread Glauber Costa
With all the infrastructure in place, this patch implements per-cgroup control for tcp memory pressure handling. Signed-off-by: Glauber Costa glom...@parallels.com CC: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujtisu.com CC: David S. Miller da...@davemloft.net CC: Eric W. Biederman ebied

[Devel] [PATCH v6 8/8] Disable task moving when using kernel memory accounting

2011-10-10 Thread Glauber Costa
Since this code is still experimental, we are leaving the exact details of how to move tasks between cgroups when kernel memory accounting is used as future work. For now, we simply disallow movement if there are any pending accounted memory. Signed-off-by: Glauber Costa glom...@parallels.com CC

[Devel] [PATCH v6 6/8] tcp buffer limitation: per-cgroup limit

2011-10-10 Thread Glauber Costa
This patch uses the tcp_max_mem field of the kmem_cgroup to effectively control the amount of kernel memory pinned by a cgroup. We have to make sure that none of the memory pressure thresholds specified in the namespace are bigger than the current cgroup. Signed-off-by: Glauber Costa glom

[Devel] [PATCH v7 0/8] Request for inclusion: tcp memory buffers

2011-10-13 Thread Glauber Costa
are expected for soft limits, which are not handled. Please consider this for inclusion in your tree Thanks, Glauber Costa (8): Basic kernel memory functionality for the Memory Controller socket: initial cgroup code. foundations of per-cgroup memory pressure controlling. per-cgroup tcp buffers

[Devel] [PATCH v7 1/8] Basic kernel memory functionality for the Memory Controller

2011-10-13 Thread Glauber Costa
-by: Glauber Costa glom...@parallels.com Reviewed-by: Kirill A. Shutemov kir...@shutemov.name Reviewed-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com CC: Paul Menage p...@paulmenage.org CC: Greg Thelen gthe...@google.com --- Documentation/cgroups/memory.txt | 36 ++- init/Kconfig

[Devel] [PATCH v7 3/8] foundations of per-cgroup memory pressure controlling.

2011-10-13 Thread Glauber Costa
-by: Glauber Costa glom...@parallels.com Reviewed-by: KAMEZAWA Hiroyukikamezawa.hir...@jp.fujitsu.com CC: David S. Miller da...@davemloft.net CC: Eric W. Biederman ebied...@xmission.com --- crypto/af_alg.c |8 +++- include/linux/memcontrol.h | 22 - include/net/sock.h

[Devel] [PATCH v7 4/8] per-cgroup tcp buffers control

2011-10-13 Thread Glauber Costa
With all the infrastructure in place, this patch implements per-cgroup control for tcp memory pressure handling. Signed-off-by: Glauber Costa glom...@parallels.com Reviewed-by: KAMEZAWA Hiroyukikamezawa.hir...@jp.fujitsu.com CC: David S. Miller da...@davemloft.net CC: Eric W. Biederman ebied

[Devel] [PATCH v7 7/8] Display current tcp memory allocation in kmem cgroup

2011-10-13 Thread Glauber Costa
This patch introduces kmem.tcp_current_memory file, living in the kmem_cgroup filesystem. It is a simple read-only file that displays the amount of kernel memory currently consumed by the cgroup. Signed-off-by: Glauber Costa glom...@parallels.com Reviewed-by: KAMEZAWA Hiroyukikamezawa.hir

[Devel] [PATCH v7 2/8] socket: initial cgroup code.

2011-10-13 Thread Glauber Costa
We aim to control the amount of kernel memory pinned at any time by tcp sockets. To lay the foundations for this work, this patch adds a pointer to the kmem_cgroup to the socket structure. Signed-off-by: Glauber Costa glom...@parallels.com Acked-by: Kirill A. Shutemovkir...@shutemov.name Reviewed

[Devel] [PATCH v7 8/8] Disable task moving when using kernel memory accounting

2011-10-13 Thread Glauber Costa
Since this code is still experimental, we are leaving the exact details of how to move tasks between cgroups when kernel memory accounting is used as future work. For now, we simply disallow movement if there are any pending accounted memory. Signed-off-by: Glauber Costa glom...@parallels.com

[Devel] [PATCH v7 6/8] tcp buffer limitation: per-cgroup limit

2011-10-13 Thread Glauber Costa
This patch uses the tcp_max_mem field of the kmem_cgroup to effectively control the amount of kernel memory pinned by a cgroup. We have to make sure that none of the memory pressure thresholds specified in the namespace are bigger than the current cgroup. Signed-off-by: Glauber Costa glom

[Devel] [PATCH v7 5/8] per-netns ipv4 sysctl_tcp_mem

2011-10-13 Thread Glauber Costa
This patch allows each namespace to independently set up its levels for tcp memory pressure thresholds. This patch alone does not buy much: we need to make this values per group of process somehow. This is achieved in the patches that follows in this patchset. Signed-off-by: Glauber Costa glom

[Devel] What does glommer think about kmem cgroup ?

2011-10-13 Thread Glauber Costa
Hi guys, So, linuxcon is approaching. To help making our discussions more productive, I sketched a basic prototype of a kmem cgroup that can control the size of the dentry cache. I am sending the code here so you guys can have an idea, but keep in mind this is a *sketch*. This is my view of

[Devel] Re: [PATCH v7 0/8] Request for inclusion: tcp memory buffers

2011-10-13 Thread Glauber Costa
On 10/14/2011 12:00 AM, David Miller wrote: From: Glauber Costaglom...@parallels.com Date: Thu, 13 Oct 2011 17:09:34 +0400 This series was extensively reviewed over the past month, and after all major comments were merged, I feel it is ready for inclusion when the next merge window opens.

[Devel] Re: [PATCH v7 0/8] Request for inclusion: tcp memory buffers

2011-10-13 Thread Glauber Costa
On 10/14/2011 12:12 AM, David Miller wrote: From: Glauber Costaglom...@parallels.com Date: Fri, 14 Oct 2011 00:05:58 +0400 Also, I kind of dispute the affirmation that !cgroup will encompass the majority of users, since cgroups is being enabled by default by most vendors. All systemd based

[Devel] Re: [PATCH v7 0/8] Request for inclusion: tcp memory buffers

2011-10-13 Thread Glauber Costa
On 10/14/2011 12:16 AM, David Miller wrote: From: Glauber Costaglom...@parallels.com Date: Fri, 14 Oct 2011 00:05:58 +0400 Thank you for letting me now about your view of this that early. I depend upon my colleagues to assist me in the large task that is reviewing the enormous number of

[Devel] Re: [PATCH v7 0/8] Request for inclusion: tcp memory buffers

2011-10-14 Thread Glauber Costa
On 10/14/2011 12:18 AM, David Miller wrote: From: Glauber Costaglom...@parallels.com Date: Fri, 14 Oct 2011 00:14:40 +0400 Are you happy, or at least willing to accept, an approach that keep things as they were with cgroups *compiled out*, or were you referring to not in use == compiled in,

[Devel] [PATCH v5 00/10] per-cgroup tcp memory pressure

2011-11-07 Thread Glauber Costa
the network code untouched, and still having a global vision of its resources. I also do not compute max_usage for the root cgroup, for a similar reason. Please let me know what you think of it. Glauber Costa (10): Basic kernel memory functionality for the Memory Controller foundations of per

[Devel] [PATCH v5 01/10] Basic kernel memory functionality for the Memory Controller

2011-11-07 Thread Glauber Costa
-by: Glauber Costa glom...@parallels.com Reviewed-by: Kirill A. Shutemov kir...@shutemov.name CC: Paul Menage p...@paulmenage.org CC: Greg Thelen gthe...@google.com --- Documentation/cgroups/memory.txt | 36 - init/Kconfig | 14 + mm/memcontrol.c

[Devel] [PATCH v5 02/10] foundations of per-cgroup memory pressure controlling.

2011-11-07 Thread Glauber Costa
here, no performance impact at all is expected in the case where we don't have cgroups disabled. Signed-off-by: Glauber Costa glom...@parallels.com CC: David S. Miller da...@davemloft.net CC: Hiroyouki Kamezawa kamezawa.hir...@jp.fujitsu.com CC: Eric W. Biederman ebied...@xmission.com CC: Eric

[Devel] [PATCH v5 07/10] Display current tcp memory allocation in kmem cgroup

2011-11-07 Thread Glauber Costa
This patch introduces kmem.tcp.usage_in_bytes file, living in the kmem_cgroup filesystem. It is a simple read-only file that displays the amount of kernel memory currently consumed by the cgroup. Signed-off-by: Glauber Costa glom...@parallels.com CC: David S. Miller da...@davemloft.net CC

[Devel] [PATCH v5 05/10] per-netns ipv4 sysctl_tcp_mem

2011-11-07 Thread Glauber Costa
This patch allows each namespace to independently set up its levels for tcp memory pressure thresholds. This patch alone does not buy much: we need to make this values per group of process somehow. This is achieved in the patches that follows in this patchset. Signed-off-by: Glauber Costa glom

[Devel] [PATCH v5 06/10] tcp buffer limitation: per-cgroup limit

2011-11-07 Thread Glauber Costa
are being used, the admin is allowed to set a value bigger than cgroup's maximum, the same way it is allowed to set pretty much unlimited values in a real box. Signed-off-by: Glauber Costa glom...@parallels.com CC: David S. Miller da...@davemloft.net CC: Hiroyouki Kamezawa kamezawa.hir

[Devel] [PATCH v5 10/10] Disable task moving when using kernel memory accounting

2011-11-07 Thread Glauber Costa
Since this code is still experimental, we are leaving the exact details of how to move tasks between cgroups when kernel memory accounting is used as future work. For now, we simply disallow movement if there are any pending accounted memory. Signed-off-by: Glauber Costa glom...@parallels.com CC

[Devel] [PATCH v5 04/10] per-cgroup tcp buffers control

2011-11-07 Thread Glauber Costa
labels controlling cgroup. To this point, they were always disabled. Signed-off-by: Glauber Costa glom...@parallels.com CC: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujtisu.com CC: David S. Miller da...@davemloft.net CC: Eric W. Biederman ebied...@xmission.com CC: Eric Dumazet eric.duma...@gmail.com

[Devel] [PATCH v5 09/10] Display current tcp memory allocation in kmem cgroup

2011-11-07 Thread Glauber Costa
the maximum memory ever used by this cgroup. Signed-off-by: Glauber Costa glom...@parallels.com CC: David S. Miller da...@davemloft.net CC: Hiroyouki Kamezawa kamezawa.hir...@jp.fujitsu.com CC: Eric W. Biederman ebied...@xmission.com --- mm/memcontrol.c | 10 ++ 1 files changed, 10 insertions

[Devel] RE: [PATCH v5 04/10] per-cgroup tcp buffers control

2011-11-07 Thread Glauber Costa
Ok, I forgot to change the temporary name I was using for the jump label. Shame on me :) --- Mensagem Original --- De: Glauber Costa glom...@parallels.com Enviado: 7 de novembro de 2011 07/11/11 Para: linux-ker...@vger.kernel.org Cc: p...@paulmenage.org, l...@cn.fujitsu.com, kamezawa.hir

[Devel] Re: [PATCH v5 00/10] per-cgroup tcp memory pressure

2011-11-09 Thread Glauber Costa
On 11/07/2011 01:26 PM, Glauber Costa wrote: Hi all, This is my new attempt at implementing per-cgroup tcp memory pressure. I am particularly interested in what the network folks have to comment on it: my main goal is to achieve the least impact possible in the network code. Here's a brief

Re: [Devel] Re: [PATCH v5 00/10] per-cgroup tcp memory pressure

2011-11-18 Thread Glauber Costa
On 11/17/2011 07:35 PM, David Miller wrote: From: James Bottomleyjbottom...@parallels.com Date: Tue, 15 Nov 2011 18:27:12 + Ping on this, please. We're blocked on this patch set until we can get an ack that the approach is acceptable to network people. __sk_mem_schedule is now more

Re: [Devel] Re: [PATCH v5 00/10] per-cgroup tcp memory pressure

2011-11-23 Thread Glauber Costa
On 11/22/2011 12:07 AM, KAMEZAWA Hiroyuki wrote: On Fri, 18 Nov 2011 17:39:03 -0200 Glauber Costaglom...@parallels.com wrote: On 11/17/2011 07:35 PM, David Miller wrote: TCP specific stuff in mm/memcontrol.c, at best that's not nice at all. How crucial is that? Thing is that as far as I am

[Devel] [PATCH 0/4] cpuacct cleanup

2011-11-24 Thread Glauber Costa
it later. Please let me know if this is acceptable. Glauber Costa (4): Change cpustat fields to an array. Reuse cgroup's parent pointer Move part of cpuacct code cpuacct.stat: re-use scheduler statistics for the root cgroup arch/s390/appldata/appldata_os.c | 16 +- arch/x86/include

[Devel] [PATCH 2/4] Reuse cgroup's parent pointer

2011-11-24 Thread Glauber Costa
We already have a pointer to the cgroup parent (whose data is more likely to be in the cache than this, anyway), so there is no need to have this one in cpuacct. This patch makes the underlying cgroup be used instead. Signed-off-by: Glauber Costa glom...@parallels.com CC: Paul Tuner p

[Devel] [PATCH 1/4] Change cpustat fields to an array.

2011-11-24 Thread Glauber Costa
This patch changes fields in cpustat from a structure, to an u64 array. Math gets easier, and the code is more flexible. Signed-off-by: Glauber Costa glom...@parallels.com CC: Paul Tuner p...@google.com CC: Peter Zijlstra a.p.zijls...@chello.nl --- arch/s390/appldata/appldata_os.c | 16

[Devel] [PATCH 3/4] Move part of cpuacct code

2011-11-24 Thread Glauber Costa
This patch is just a preparation patch for the next one in the series. It moves the cpuacct structure definition and some helper functions early in the file so we can access its members from here on. Signed-off-by: Glauber Costa glom...@parallels.com CC: Paul Tuner p...@google.com CC: Peter

[Devel] [PATCH 4/4] cpuacct.stat: re-use scheduler statistics for the root cgroup

2011-11-24 Thread Glauber Costa
it here. Signed-off-by: Glauber Costa glom...@parallels.com CC: Paul Tuner p...@google.com CC: Peter Zijlstra a.p.zijls...@chello.nl --- kernel/sched.c | 118 ++-- 1 files changed, 72 insertions(+), 46 deletions(-) diff --git a/kernel/sched.c b

[Devel] [PATCH v6 00/10] Request for inclusion: per-cgroup tcp memory pressure controls

2011-11-25 Thread Glauber Costa
if there are any blocking concerns to this, and I'll address them as soon as I can. Thanks Glauber Costa (10): Basic kernel memory functionality for the Memory Controller foundations of per-cgroup memory pressure controlling. socket: initial cgroup code. Account tcp memory as kernel memory per-netns

[Devel] [PATCH v6 03/10] socket: initial cgroup code.

2011-11-25 Thread Glauber Costa
until the first non-root cgroup is created. So when nobody is using cgroups, even if it is mounted, no significant performance penalty should be seen. This patch handles the generic part of the code, and has nothing tcp-specific. Signed-off-by: Glauber Costa glom...@parallels.com Acked-by: Kirill

[Devel] [PATCH v6 02/10] foundations of per-cgroup memory pressure controlling.

2011-11-25 Thread Glauber Costa
here, no performance impact at all is expected in the case where we don't have cgroups disabled. Signed-off-by: Glauber Costa glom...@parallels.com CC: David S. Miller da...@davemloft.net CC: Hiroyouki Kamezawa kamezawa.hir...@jp.fujitsu.com CC: Eric W. Biederman ebied...@xmission.com CC: Eric

[Devel] [PATCH v6 01/10] Basic kernel memory functionality for the Memory Controller

2011-11-25 Thread Glauber Costa
-by: Glauber Costa glom...@parallels.com Reviewed-by: Kirill A. Shutemov kir...@shutemov.name CC: Paul Menage p...@paulmenage.org CC: Greg Thelen gthe...@google.com --- Documentation/cgroups/memory.txt | 36 - init/Kconfig | 14 + mm/memcontrol.c

[Devel] [PATCH v6 05/10] per-netns ipv4 sysctl_tcp_mem

2011-11-25 Thread Glauber Costa
This patch allows each namespace to independently set up its levels for tcp memory pressure thresholds. This patch alone does not buy much: we need to make this values per group of process somehow. This is achieved in the patches that follows in this patchset. Signed-off-by: Glauber Costa glom

[Devel] [PATCH v6 08/10] Display current tcp failcnt in kmem cgroup

2011-11-25 Thread Glauber Costa
-by: Glauber Costa glom...@parallels.com CC: David S. Miller da...@davemloft.net CC: Hiroyouki Kamezawa kamezawa.hir...@jp.fujitsu.com CC: Eric W. Biederman ebied...@xmission.com --- net/ipv4/tcp_memcg.c | 31 +++ 1 files changed, 31 insertions(+), 0 deletions(-) diff

[Devel] [PATCH v6 07/10] Display current tcp memory allocation in kmem cgroup

2011-11-25 Thread Glauber Costa
This patch introduces kmem.tcp.usage_in_bytes file, living in the kmem_cgroup filesystem. It is a simple read-only file that displays the amount of kernel memory currently consumed by the cgroup. Signed-off-by: Glauber Costa glom...@parallels.com CC: David S. Miller da...@davemloft.net CC

[Devel] [PATCH v6 09/10] Display maximum tcp memory allocation in kmem cgroup

2011-11-25 Thread Glauber Costa
the maximum memory ever used by this cgroup. Signed-off-by: Glauber Costa glom...@parallels.com CC: David S. Miller da...@davemloft.net CC: Hiroyouki Kamezawa kamezawa.hir...@jp.fujitsu.com CC: Eric W. Biederman ebied...@xmission.com --- net/ipv4/tcp_memcg.c | 12 +++- 1 files changed, 11

[Devel] [PATCH v6 10/10] Disable task moving when using kernel memory accounting

2011-11-25 Thread Glauber Costa
Since this code is still experimental, we are leaving the exact details of how to move tasks between cgroups when kernel memory accounting is used as future work. For now, we simply disallow movement if there are any pending accounted memory. Signed-off-by: Glauber Costa glom...@parallels.com CC

[Devel] [PATCH v6 04/10] Account tcp memory as kernel memory

2011-11-25 Thread Glauber Costa
Now that we account and control tcp memory buffers memory for pressure controlling purposes, display this information as part of the normal memcg files and other usages. Signed-off-by: Glauber Costa glom...@parallels.com CC: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujtisu.com CC: Eric W. Biederman

[Devel] Re: [PATCH 3/4] Move part of cpuacct code

2011-11-26 Thread Glauber Costa
On 11/26/2011 11:21 AM, Paul Turner wrote: On Thu, Nov 24, 2011 at 5:33 PM, Glauber Costaglom...@parallels.com wrote: This patch is just a preparation patch for the next one in the series. It moves the cpuacct structure definition and some helper functions early in the file so we can access

[Devel] Re: [PATCH v6 10/10] Disable task moving when using kernel memory accounting

2011-11-28 Thread Glauber Costa
On 11/28/2011 02:32 AM, KAMEZAWA Hiroyuki wrote: On Fri, 25 Nov 2011 15:38:16 -0200 Glauber Costaglom...@parallels.com wrote: Since this code is still experimental, we are leaving the exact details of how to move tasks between cgroups when kernel memory accounting is used as future work. For

[Devel] Re: [PATCH v6 01/10] Basic kernel memory functionality for the Memory Controller

2011-11-28 Thread Glauber Costa
On 11/28/2011 12:24 AM, KAMEZAWA Hiroyuki wrote: On Fri, 25 Nov 2011 15:38:07 -0200 Glauber Costaglom...@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: *

[Devel] [PATCH v2 0/3] cpuacct cgroup refactoring

2011-11-28 Thread Glauber Costa
Hi, This is the same series I've already sent before. Just sending again after the conflict with the code that was in tip.git Best regards, Glauber Costa (3): Change cpustat fields to an array. Reuse cgroup's parent pointer cpuacct.stat: re-use scheduler statistics for the root cgroup

[Devel] [PATCH v2 1/3] Change cpustat fields to an array.

2011-11-28 Thread Glauber Costa
This patch changes fields in cpustat from a structure, to an u64 array. Math gets easier, and the code is more flexible. Signed-off-by: Glauber Costa glom...@parallels.com Reviewed-by: KAMEZAWA Hiroyuki kamezawa.hir...@jp.fujitsu.com CC: Paul Tuner p...@google.com CC: Peter Zijlstra a.p.zijls

[Devel] [PATCH v2 2/3] Reuse cgroup's parent pointer

2011-11-28 Thread Glauber Costa
We already have a pointer to the cgroup parent (whose data is more likely to be in the cache than this, anyway), so there is no need to have this one in cpuacct. This patch makes the underlying cgroup be used instead. Signed-off-by: Glauber Costa glom...@parallels.com Reviewed-by: KAMEZAWA

[Devel] [PATCH v2 3/3] cpuacct.stat: re-use scheduler statistics for the root cgroup

2011-11-28 Thread Glauber Costa
it here. Signed-off-by: Glauber Costa glom...@parallels.com CC: Paul Tuner p...@google.com CC: Peter Zijlstra a.p.zijls...@chello.nl --- kernel/sched/core.c | 165 +++--- kernel/sched/sched.h | 33 +- 2 files changed, 105 insertions(+), 93

[Devel] Re: [PATCH v6 02/10] foundations of per-cgroup memory pressure controlling.

2011-11-29 Thread Glauber Costa
On 11/28/2011 12:55 AM, KAMEZAWA Hiroyuki wrote: On Fri, 25 Nov 2011 15:38:08 -0200 Glauber Costaglom...@parallels.com wrote: This patch replaces all uses of struct sock fields' memory_pressure, memory_allocated, sockets_allocated, and sysctl_mem to acessor macros. Those macros can either

[Devel] [PATCH v7 00/10] Request for Inclusion: per-cgroup tcp memory pressure

2011-11-29 Thread Glauber Costa
know if there is anything else I should address. Glauber Costa (10): Basic kernel memory functionality for the Memory Controller foundations of per-cgroup memory pressure controlling. socket: initial cgroup code. tcp memory pressure controls per-netns ipv4 sysctl_tcp_mem tcp buffer

[Devel] [PATCH v7 02/10] foundations of per-cgroup memory pressure controlling.

2011-11-29 Thread Glauber Costa
here, no performance impact at all is expected in the case where we don't have cgroups disabled. Signed-off-by: Glauber Costa glom...@parallels.com CC: David S. Miller da...@davemloft.net CC: Hiroyouki Kamezawa kamezawa.hir...@jp.fujitsu.com CC: Eric W. Biederman ebied...@xmission.com CC: Eric

[Devel] [PATCH v7 01/10] Basic kernel memory functionality for the Memory Controller

2011-11-29 Thread Glauber Costa
-by: Glauber Costa glom...@parallels.com Reviewed-by: Kirill A. Shutemov kir...@shutemov.name CC: Paul Menage p...@paulmenage.org CC: Greg Thelen gthe...@google.com --- Documentation/cgroups/memory.txt | 46 - init/Kconfig | 14 + mm/memcontrol.c

[Devel] [PATCH v7 05/10] per-netns ipv4 sysctl_tcp_mem

2011-11-29 Thread Glauber Costa
This patch allows each namespace to independently set up its levels for tcp memory pressure thresholds. This patch alone does not buy much: we need to make this values per group of process somehow. This is achieved in the patches that follows in this patchset. Signed-off-by: Glauber Costa glom

[Devel] [PATCH v7 03/10] socket: initial cgroup code.

2011-11-29 Thread Glauber Costa
until the first non-root cgroup is created. So when nobody is using cgroups, even if it is mounted, no significant performance penalty should be seen. This patch handles the generic part of the code, and has nothing tcp-specific. Signed-off-by: Glauber Costa glom...@parallels.com Acked-by: Kirill

[Devel] [PATCH v7 06/10] tcp buffer limitation: per-cgroup limit

2011-11-29 Thread Glauber Costa
are being used, the admin is allowed to set a value bigger than cgroup's maximum, the same way it is allowed to set pretty much unlimited values in a real box. Signed-off-by: Glauber Costa glom...@parallels.com CC: David S. Miller da...@davemloft.net CC: Hiroyouki Kamezawa kamezawa.hir

[Devel] [PATCH v7 04/10] tcp memory pressure controls

2011-11-29 Thread Glauber Costa
This patch introduces memory pressure controls for the tcp protocol. It uses the generic socket memory pressure code introduced in earlier patches, and fills in the necessary data in cg_proto struct. Signed-off-by: Glauber Costa glom...@parallels.com CC: KAMEZAWA Hiroyuki kamezawa.hir

[Devel] [PATCH v7 07/10] Display current tcp memory allocation in kmem cgroup

2011-11-29 Thread Glauber Costa
This patch introduces kmem.tcp.usage_in_bytes file, living in the kmem_cgroup filesystem. It is a simple read-only file that displays the amount of kernel memory currently consumed by the cgroup. Signed-off-by: Glauber Costa glom...@parallels.com CC: David S. Miller da...@davemloft.net CC

[Devel] [PATCH v7 08/10] Display current tcp failcnt in kmem cgroup

2011-11-29 Thread Glauber Costa
-by: Glauber Costa glom...@parallels.com CC: David S. Miller da...@davemloft.net CC: Hiroyouki Kamezawa kamezawa.hir...@jp.fujitsu.com CC: Eric W. Biederman ebied...@xmission.com --- net/ipv4/tcp_memcontrol.c | 31 +++ 1 files changed, 31 insertions(+), 0 deletions

[Devel] [PATCH v7 09/10] Display maximum tcp memory allocation in kmem cgroup

2011-11-29 Thread Glauber Costa
the maximum memory ever used by this cgroup. Signed-off-by: Glauber Costa glom...@parallels.com CC: David S. Miller da...@davemloft.net CC: Hiroyouki Kamezawa kamezawa.hir...@jp.fujitsu.com CC: Eric W. Biederman ebied...@xmission.com --- net/ipv4/tcp_memcontrol.c | 12 +++- 1 files changed, 11

[Devel] [PATCH v7 10/10] Disable task moving when using kernel memory accounting

2011-11-29 Thread Glauber Costa
Since this code is still experimental, we are leaving the exact details of how to move tasks between cgroups when kernel memory accounting is used as future work. For now, we simply disallow movement if there are any pending accounted memory. Signed-off-by: Glauber Costa glom...@parallels.com CC

[Devel] Re: [PATCH v7 02/10] foundations of per-cgroup memory pressure controlling.

2011-12-02 Thread Glauber Costa
static void proto_seq_printf(struct seq_file *seq, struct proto *proto) { + struct mem_cgroup *memcg = mem_cgroup_from_task(current); + seq_printf(seq, %-9s %4u %6d %6ld %-3s %6u %-3s %-10s %2c %2c %2c %2c %2c %2c %2c %2c %2c %2c %2c %2c %2c %2c

[Devel] Re: [PATCH v7 04/10] tcp memory pressure controls

2011-12-02 Thread Glauber Costa
On 11/29/2011 11:49 PM, KAMEZAWA Hiroyuki wrote: -static struct mem_cgroup *mem_cgroup_from_cont(struct cgroup *cont) +struct mem_cgroup *mem_cgroup_from_cont(struct cgroup *cont) { return container_of(cgroup_subsys_state(cont, mem_cgroup_subsys_id),

[Devel] Re: [PATCH v7 00/10] Request for Inclusion: per-cgroup tcp memory pressure

2011-12-02 Thread Glauber Costa
On 11/30/2011 12:11 AM, KAMEZAWA Hiroyuki wrote: On Tue, 29 Nov 2011 21:56:51 -0200 Glauber Costaglom...@parallels.com wrote: Hi, This patchset implements per-cgroup tcp memory pressure controls. It did not change significantly since last submission: rather, it just merges the comments Kame

[Devel] Re: [PATCH v7 10/10] Disable task moving when using kernel memory accounting

2011-12-02 Thread Glauber Costa
On 11/30/2011 12:22 AM, KAMEZAWA Hiroyuki wrote: On Tue, 29 Nov 2011 21:57:01 -0200 Glauber Costaglom...@parallels.com wrote: Since this code is still experimental, we are leaving the exact details of how to move tasks between cgroups when kernel memory accounting is used as future work. For

[Devel] Re: [PATCH v7 02/10] foundations of per-cgroup memory pressure controlling.

2011-12-05 Thread Glauber Costa
On 12/04/2011 11:59 PM, KAMEZAWA Hiroyuki wrote: On Fri, 2 Dec 2011 15:46:46 -0200 Glauber Costaglom...@parallels.com wrote: static void proto_seq_printf(struct seq_file *seq, struct proto *proto) { + struct mem_cgroup *memcg = mem_cgroup_from_task(current); +

[Devel] Re: [PATCH v7 00/10] Request for Inclusion: per-cgroup tcp memory pressure

2011-12-05 Thread Glauber Costa
On 12/05/2011 12:06 AM, KAMEZAWA Hiroyuki wrote: On Fri, 2 Dec 2011 16:04:08 -0200 Glauber Costaglom...@parallels.com wrote: On 11/30/2011 12:11 AM, KAMEZAWA Hiroyuki wrote: On Tue, 29 Nov 2011 21:56:51 -0200 Glauber Costaglom...@parallels.com wrote: Hi, This patchset implements

[Devel] Re: [PATCH v7 10/10] Disable task moving when using kernel memory accounting

2011-12-05 Thread Glauber Costa
On 12/05/2011 12:18 AM, KAMEZAWA Hiroyuki wrote: On Fri, 2 Dec 2011 16:11:56 -0200 Glauber Costaglom...@parallels.com wrote: On 11/30/2011 12:22 AM, KAMEZAWA Hiroyuki wrote: On Tue, 29 Nov 2011 21:57:01 -0200 Glauber Costaglom...@parallels.com wrote: Since this code is still

[Devel] How to draw values for /proc/stat

2011-12-05 Thread Glauber Costa
Hi, Specially Peter and Paul, but all the others: As you can see in https://lkml.org/lkml/2011/12/4/178, and in my answer to that, there is a question - one I've asked before but without that much of an audience - of whether /proc files read from process living on cgroups should display

[Devel] Re: [PATCH v7 00/10] Request for Inclusion: per-cgroup tcp memory pressure

2011-12-05 Thread Glauber Costa
On 12/05/2011 07:51 AM, KAMEZAWA Hiroyuki wrote: On Mon, 5 Dec 2011 07:09:51 -0200 Glauber Costaglom...@parallels.com wrote: On 12/05/2011 12:06 AM, KAMEZAWA Hiroyuki wrote: On Fri, 2 Dec 2011 16:04:08 -0200 Glauber Costaglom...@parallels.com wrote: On 11/30/2011 12:11 AM, KAMEZAWA

[Devel] [PATCH v8 0/9] per-cgroup tcp memory pressure controls

2011-12-05 Thread Glauber Costa
pointer (which is cleaner anyway) The rest should be mostly the same except for small fixes and style changes. Glauber Costa (9): Basic kernel memory functionality for the Memory Controller foundations of per-cgroup memory pressure controlling. socket: initial cgroup code. tcp memory pressure

[Devel] [PATCH v8 2/9] foundations of per-cgroup memory pressure controlling.

2011-12-05 Thread Glauber Costa
here, no performance impact at all is expected in the case where we don't have cgroups disabled. Signed-off-by: Glauber Costa glom...@parallels.com CC: David S. Miller da...@davemloft.net CC: Hiroyouki Kamezawa kamezawa.hir...@jp.fujitsu.com CC: Eric W. Biederman ebied...@xmission.com CC: Eric

[Devel] [PATCH v8 1/9] Basic kernel memory functionality for the Memory Controller

2011-12-05 Thread Glauber Costa
-by: Glauber Costa glom...@parallels.com Reviewed-by: Kirill A. Shutemov kir...@shutemov.name CC: Paul Menage p...@paulmenage.org CC: Greg Thelen gthe...@google.com --- Documentation/cgroups/memory.txt | 40 ++- init/Kconfig | 11 mm/memcontrol.c

[Devel] [PATCH v8 3/9] socket: initial cgroup code.

2011-12-05 Thread Glauber Costa
until the first non-root cgroup is created. So when nobody is using cgroups, even if it is mounted, no significant performance penalty should be seen. This patch handles the generic part of the code, and has nothing tcp-specific. Signed-off-by: Glauber Costa glom...@parallels.com CC: Kirill

[Devel] [PATCH v8 5/9] per-netns ipv4 sysctl_tcp_mem

2011-12-05 Thread Glauber Costa
This patch allows each namespace to independently set up its levels for tcp memory pressure thresholds. This patch alone does not buy much: we need to make this values per group of process somehow. This is achieved in the patches that follows in this patchset. Signed-off-by: Glauber Costa glom

[Devel] [PATCH v8 6/9] tcp buffer limitation: per-cgroup limit

2011-12-05 Thread Glauber Costa
are being used, the admin is allowed to set a value bigger than cgroup's maximum, the same way it is allowed to set pretty much unlimited values in a real box. Signed-off-by: Glauber Costa glom...@parallels.com CC: David S. Miller da...@davemloft.net CC: Hiroyouki Kamezawa kamezawa.hir

[Devel] [PATCH v8 9/9] Display maximum tcp memory allocation in kmem cgroup

2011-12-05 Thread Glauber Costa
the maximum memory ever used by this cgroup. Signed-off-by: Glauber Costa glom...@parallels.com Reviewed-by: Hiroyouki Kamezawa kamezawa.hir...@jp.fujitsu.com CC: David S. Miller da...@davemloft.net CC: Eric W. Biederman ebied...@xmission.com --- net/ipv4/tcp_memcontrol.c | 12 +++- 1 files

[Devel] [PATCH v8 7/9] Display current tcp memory allocation in kmem cgroup

2011-12-05 Thread Glauber Costa
This patch introduces kmem.tcp.usage_in_bytes file, living in the kmem_cgroup filesystem. It is a simple read-only file that displays the amount of kernel memory currently consumed by the cgroup. Signed-off-by: Glauber Costa glom...@parallels.com Reviewed-by: Hiroyouki Kamezawa kamezawa.hir

[Devel] [PATCH v8 8/9] Display current tcp failcnt in kmem cgroup

2011-12-05 Thread Glauber Costa
-by: Glauber Costa glom...@parallels.com Reviewed-by: Hiroyouki Kamezawa kamezawa.hir...@jp.fujitsu.com CC: David S. Miller da...@davemloft.net CC: Eric W. Biederman ebied...@xmission.com --- net/ipv4/tcp_memcontrol.c | 31 +++ 1 files changed, 31 insertions(+), 0

  1   2   3   4   5   6   7   8   9   10   >