linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Glauber Costa <glommer@parallels.com>
Cc: linux-kernel@vger.kernel.org, paul@paulmenage.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
Subject: Re: [PATCH v5 0/8] per-cgroup tcp buffer pressure settings
Date: Wed, 5 Oct 2011 09:29:54 +0900	[thread overview]
Message-ID: <20111005092954.718a0c29.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <1317730680-24352-1-git-send-email-glommer@parallels.com>

On Tue,  4 Oct 2011 16:17:52 +0400
Glauber Costa <glommer@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 ipv6 + tcp files in bytes ]]
> 
> Kame, Kirill,
> 
> I am submitting this again merging most of your comments. I've decided to
> leave some of them out:
>  * I am not using res_counters for allocated_memory. Besides being more
>    expensive than what we need, to make it work in a nice way, we'd have
>    to change the !cgroup code, including other protocols than tcp. Also,
>    
>  * I am not using failcnt and max_usage_in_bytes for it. I believe the value
>    of those lies more in the allocation than in the pressure control. Besides,
>    fail conditions lie mostly outside of the memory cgroup's control. (Actually,
>    a soft_limit makes a lot of sense, and I do plan to introduce it in a follow
>    up series)
> 
> If you agree with the above, and there are any other pressing issues, let me
> know and I will address them ASAP. Otherwise, let's discuss it. I'm always open.
> 

I'm not familar with reuqirements of users. So, I appreciate your choices.
What I adivse you here is taking a deep breath. Making new version every day
is not good for reviewing process ;)
(It's now -rc8 and merge will not be so quick, anyway.)

At this stage, my concern is view of interfaces and documenation, and future plans.

Let me give  a try explanation by myself. (Correct me ;)
I added some questions but I'm sorry you've already answered.

New interfaces are 5 files. All files exists only for non-root memory cgroup.

1. memory.independent_kmem_limit
2. memory.kmem.usage_in_bytes
3. memory.kmem.limit_in_bytes
4. memory.kmem.tcp.limit_in_bytes
5. memory.kmem.tcp.usage_in_bytes

* memory.independent_kmem_limit
 If 1, kmem_limit_in_bytes/kmem_usage_in_bytes works.
 If 0, kmem_limit_in_bytes/kmem_usage_in_bytes doesn't work and all kmem
    usages are controlled under memory.limit_in_bytes.

Question:
 - What happens when parent/chidlren cgroup has different indepedent_kmem_limit ?
 - What happens at creating a new cgroup with use_hierarchy==1.

* memory.kmem_limit_in_bytes/memory.kmem.tcp.limit_in_bytes

 Both files works independently for _Now_. And memory.kmem_usage_in_bytes and
 memory.kmem_tcp.usage_in_bytes has no relationships.

 In future plan, kmem.usage_in_bytes should includes tcp.kmem_usage_in_bytes.
 And kmem.limit_in_bytes should be the limiation of sum of all kmem.xxxx.limit_in_bytes.

Question:
 - Why this integration is difficult ?
   Can't tcp-limit-code borrows some amount of charges in batch from kmem_limit 
   and use it ?
 
 - Don't you need a stat file to indicate "tcp memory pressure works!" ?
   It can be obtained already ?

Thanks,
-Kame

--
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>

  parent reply	other threads:[~2011-10-05  0:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-04 12:17 Glauber Costa
2011-10-04 12:17 ` [PATCH v5 1/8] Basic kernel memory functionality for the Memory Controller Glauber Costa
2011-10-04 12:17 ` [PATCH v5 2/8] socket: initial cgroup code Glauber Costa
2011-10-04 12:17 ` [PATCH v5 3/8] foundations of per-cgroup memory pressure controlling Glauber Costa
2011-10-04 12:17 ` [PATCH v5 4/8] per-cgroup tcp buffers control Glauber Costa
2011-10-04 12:17 ` [PATCH v5 5/8] per-netns ipv4 sysctl_tcp_mem Glauber Costa
2011-10-04 12:17 ` [PATCH v5 6/8] tcp buffer limitation: per-cgroup limit Glauber Costa
2011-10-04 12:48   ` Eric Dumazet
2011-10-05  8:08     ` Glauber Costa
2011-10-05  8:58       ` Eric Dumazet
2011-10-06  8:38         ` Glauber Costa
2011-10-04 12:17 ` [PATCH v5 7/8] Display current tcp memory allocation in kmem cgroup Glauber Costa
2011-10-04 12:18 ` [PATCH v5 8/8] Disable task moving when using kernel memory accounting Glauber Costa
2011-10-05  0:29 ` KAMEZAWA Hiroyuki [this message]
2011-10-05  7:25   ` [PATCH v5 0/8] per-cgroup tcp buffer pressure settings Glauber Costa
2011-10-07  8:05     ` KAMEZAWA Hiroyuki
2011-10-07  8:20       ` Glauber Costa
2011-10-07  8:55         ` 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=20111005092954.718a0c29.kamezawa.hiroyu@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=avagin@parallels.com \
    --cc=davem@davemloft.net \
    --cc=devel@openvz.org \
    --cc=ebiederm@xmission.com \
    --cc=glommer@parallels.com \
    --cc=gthelen@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox