From: Glauber Costa <glommer@parallels.com>
To: David Miller <davem@davemloft.net>
Cc: jbottomley@parallels.com, eric.dumazet@gmail.com,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
paul@paulmenage.org, lizf@cn.fujitsu.com, linux-mm@kvack.org,
devel@openvz.org, kirill@shutemov.name, gthelen@google.com,
kamezawa.hiroyu@jp.fujitsu.com
Subject: Re: [Devel] Re: [PATCH v5 00/10] per-cgroup tcp memory pressure
Date: Fri, 18 Nov 2011 17:39:03 -0200 [thread overview]
Message-ID: <4EC6B457.4010502@parallels.com> (raw)
In-Reply-To: <20111117.163501.1963137869848419475.davem@davemloft.net>
On 11/17/2011 07:35 PM, David Miller wrote:
> From: James Bottomley<jbottomley@parallels.com>
> Date: Tue, 15 Nov 2011 18:27:12 +0000
>
>> 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 expensive, because instead of short-circuiting
> the majority of the function's logic when "allocated<= prot->sysctl_mem[0]"
> and immediately returning 1, the whole rest of the function is run.
Not the whole rest of the function. Rather, just the other two tests.
But that's the behavior we need since if your parent is on pressure, you
should be as well. How do you feel if we'd also provide two versions for
this:
1) non-cgroup, try to return 1 as fast as we can
2) cgroup, also check your parents.
That could be enclosed in the same static branch we're using right now.
> The static branch protecting all of the cgroup code seems to be
> enabled if any memory based cgroup'ing is enabled. What if people use
> the memory cgroup facility but not for sockets? I am to understand
> that, of the very few people who are going to use this stuff in any
> capacity, this would be a common usage.
How about we make the jump_label only used for sockets (which is basic
what we have now, just need a clear name to indicate that), and then
enable it not when the first non-root cgroup is created, but when the
first one sets the limit to something different than unlimited?
Of course to that point, we'd be accounting only to the root structures,
but I guess this is not a big deal.
> 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 concerned, all the
memcg people really want the inner layout of struct mem_cgroup to be
private to memcontrol.c This means that at some point, we need to have
at least a wrapper in memcontrol.c that is able to calculate the offset
of the tcp structure, and since most functions are actually quite
simple, that would just make us do more function calls.
Well, an alternative to that would be to use a void pointer in the newly
added struct cg_proto to an already parsed memcg-related field
(in this case tcp_memcontrol), that would be passed to the functions
instead of the whole memcg structure. Do you think this would be
preferable ?
> Otherwise looks mostly good.
Thank you for your time.
--
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: David Miller <davem@davemloft.net>
Cc: <jbottomley@parallels.com>, <eric.dumazet@gmail.com>,
<linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
<paul@paulmenage.org>, <lizf@cn.fujitsu.com>,
<linux-mm@kvack.org>, <devel@openvz.org>, <kirill@shutemov.name>,
<gthelen@google.com>, <kamezawa.hiroyu@jp.fujitsu.com>
Subject: Re: [Devel] Re: [PATCH v5 00/10] per-cgroup tcp memory pressure
Date: Fri, 18 Nov 2011 17:39:03 -0200 [thread overview]
Message-ID: <4EC6B457.4010502@parallels.com> (raw)
In-Reply-To: <20111117.163501.1963137869848419475.davem@davemloft.net>
On 11/17/2011 07:35 PM, David Miller wrote:
> From: James Bottomley<jbottomley@parallels.com>
> Date: Tue, 15 Nov 2011 18:27:12 +0000
>
>> 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 expensive, because instead of short-circuiting
> the majority of the function's logic when "allocated<= prot->sysctl_mem[0]"
> and immediately returning 1, the whole rest of the function is run.
Not the whole rest of the function. Rather, just the other two tests.
But that's the behavior we need since if your parent is on pressure, you
should be as well. How do you feel if we'd also provide two versions for
this:
1) non-cgroup, try to return 1 as fast as we can
2) cgroup, also check your parents.
That could be enclosed in the same static branch we're using right now.
> The static branch protecting all of the cgroup code seems to be
> enabled if any memory based cgroup'ing is enabled. What if people use
> the memory cgroup facility but not for sockets? I am to understand
> that, of the very few people who are going to use this stuff in any
> capacity, this would be a common usage.
How about we make the jump_label only used for sockets (which is basic
what we have now, just need a clear name to indicate that), and then
enable it not when the first non-root cgroup is created, but when the
first one sets the limit to something different than unlimited?
Of course to that point, we'd be accounting only to the root structures,
but I guess this is not a big deal.
> 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 concerned, all the
memcg people really want the inner layout of struct mem_cgroup to be
private to memcontrol.c This means that at some point, we need to have
at least a wrapper in memcontrol.c that is able to calculate the offset
of the tcp structure, and since most functions are actually quite
simple, that would just make us do more function calls.
Well, an alternative to that would be to use a void pointer in the newly
added struct cg_proto to an already parsed memcg-related field
(in this case tcp_memcontrol), that would be passed to the functions
instead of the whole memcg structure. Do you think this would be
preferable ?
> Otherwise looks mostly good.
Thank you for your time.
WARNING: multiple messages have this Message-ID (diff)
From: Glauber Costa <glommer@parallels.com>
To: David Miller <davem@davemloft.net>
Cc: <jbottomley@parallels.com>, <eric.dumazet@gmail.com>,
<linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
<paul@paulmenage.org>, <lizf@cn.fujitsu.com>,
<linux-mm@kvack.org>, <devel@openvz.org>, <kirill@shutemov.name>,
<gthelen@google.com>, <kamezawa.hiroyu@jp.fujitsu.com>
Subject: Re: [Devel] Re: [PATCH v5 00/10] per-cgroup tcp memory pressure
Date: Fri, 18 Nov 2011 17:39:03 -0200 [thread overview]
Message-ID: <4EC6B457.4010502@parallels.com> (raw)
In-Reply-To: <20111117.163501.1963137869848419475.davem@davemloft.net>
On 11/17/2011 07:35 PM, David Miller wrote:
> From: James Bottomley<jbottomley@parallels.com>
> Date: Tue, 15 Nov 2011 18:27:12 +0000
>
>> 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 expensive, because instead of short-circuiting
> the majority of the function's logic when "allocated<= prot->sysctl_mem[0]"
> and immediately returning 1, the whole rest of the function is run.
Not the whole rest of the function. Rather, just the other two tests.
But that's the behavior we need since if your parent is on pressure, you
should be as well. How do you feel if we'd also provide two versions for
this:
1) non-cgroup, try to return 1 as fast as we can
2) cgroup, also check your parents.
That could be enclosed in the same static branch we're using right now.
> The static branch protecting all of the cgroup code seems to be
> enabled if any memory based cgroup'ing is enabled. What if people use
> the memory cgroup facility but not for sockets? I am to understand
> that, of the very few people who are going to use this stuff in any
> capacity, this would be a common usage.
How about we make the jump_label only used for sockets (which is basic
what we have now, just need a clear name to indicate that), and then
enable it not when the first non-root cgroup is created, but when the
first one sets the limit to something different than unlimited?
Of course to that point, we'd be accounting only to the root structures,
but I guess this is not a big deal.
> 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 concerned, all the
memcg people really want the inner layout of struct mem_cgroup to be
private to memcontrol.c This means that at some point, we need to have
at least a wrapper in memcontrol.c that is able to calculate the offset
of the tcp structure, and since most functions are actually quite
simple, that would just make us do more function calls.
Well, an alternative to that would be to use a void pointer in the newly
added struct cg_proto to an already parsed memcg-related field
(in this case tcp_memcontrol), that would be passed to the functions
instead of the whole memcg structure. Do you think this would be
preferable ?
> Otherwise looks mostly good.
Thank you for your time.
--
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>
next prev parent reply other threads:[~2011-11-18 19:39 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-07 15:26 [PATCH v5 00/10] per-cgroup tcp memory pressure Glauber Costa
2011-11-07 15:26 ` Glauber Costa
2011-11-07 15:26 ` [PATCH v5 01/10] Basic kernel memory functionality for the Memory Controller Glauber Costa
2011-11-07 15:26 ` Glauber Costa
2011-11-07 15:26 ` [PATCH v5 02/10] foundations of per-cgroup memory pressure controlling Glauber Costa
2011-11-07 15:26 ` Glauber Costa
2011-11-07 15:26 ` [PATCH v5 03/10] socket: initial cgroup code Glauber Costa
2011-11-07 15:26 ` Glauber Costa
2011-11-07 15:26 ` [PATCH v5 04/10] per-cgroup tcp buffers control Glauber Costa
2011-11-07 15:26 ` Glauber Costa
2011-11-07 15:26 ` [PATCH v5 05/10] per-netns ipv4 sysctl_tcp_mem Glauber Costa
2011-11-07 15:26 ` Glauber Costa
2011-11-07 15:26 ` [PATCH v5 06/10] tcp buffer limitation: per-cgroup limit Glauber Costa
2011-11-07 15:26 ` Glauber Costa
2011-11-07 15:26 ` [PATCH v5 07/10] Display current tcp memory allocation in kmem cgroup Glauber Costa
2011-11-07 15:26 ` Glauber Costa
2011-11-07 15:26 ` [PATCH v5 08/10] " Glauber Costa
2011-11-07 15:26 ` Glauber Costa
2011-11-07 15:26 ` [PATCH v5 09/10] " Glauber Costa
2011-11-07 15:26 ` Glauber Costa
2011-11-07 15:26 ` [PATCH v5 10/10] Disable task moving when using kernel memory accounting Glauber Costa
2011-11-07 15:26 ` Glauber Costa
2011-11-09 18:02 ` [PATCH v5 00/10] per-cgroup tcp memory pressure Glauber Costa
2011-11-09 18:02 ` Glauber Costa
2011-11-09 18:02 ` Glauber Costa
2011-11-15 18:27 ` [Devel] " James Bottomley
2011-11-15 18:27 ` James Bottomley
2011-11-17 21:35 ` David Miller
2011-11-17 21:35 ` David Miller
2011-11-18 19:39 ` Glauber Costa [this message]
2011-11-18 19:39 ` Glauber Costa
2011-11-18 19:39 ` Glauber Costa
2011-11-18 19:51 ` David Miller
2011-11-18 19:51 ` David Miller
2011-11-22 2:07 ` KAMEZAWA Hiroyuki
2011-11-22 2:07 ` KAMEZAWA Hiroyuki
2011-11-22 2:07 ` KAMEZAWA Hiroyuki
2011-11-23 10:25 ` Glauber Costa
2011-11-23 10:25 ` Glauber Costa
2011-11-23 10:25 ` Glauber Costa
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=4EC6B457.4010502@parallels.com \
--to=glommer@parallels.com \
--cc=davem@davemloft.net \
--cc=devel@openvz.org \
--cc=eric.dumazet@gmail.com \
--cc=gthelen@google.com \
--cc=jbottomley@parallels.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizf@cn.fujitsu.com \
--cc=netdev@vger.kernel.org \
--cc=paul@paulmenage.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.