From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: balbir@linux.vnet.ibm.com
Cc: linux-mm@kvack.org, YAMAMOTO Takashi <yamamoto@valinux.co.jp>,
lizf@cn.fujitsu.com,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Rik van Riel <riel@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 4/4] Memory controller soft limit reclaim on contention (v6)
Date: Tue, 17 Mar 2009 13:47:27 +0900 [thread overview]
Message-ID: <20090317134727.62efc14e.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <20090317044016.GG16897@balbir.in.ibm.com>
On Tue, 17 Mar 2009 10:10:16 +0530
Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
> > - vm.softlimit_ratio
> >
> > If vm.softlimit_ratio = 99%,
> > when sum of all usage of memcg is over 99% of system memory,
> > softlimit runs and reclaim memory until the whole usage will be below 99%.
> > (or some other trigger can be considered.)
> >
> > Then,
> > - We don't have to take care of misc. complicated aspects of memory reclaiming
> > We reclaim memory based on our own logic, then, no influence to global LRU.
> >
> > I think this approach will hide the all corner case and make merging softlimit
> > to mainline much easier. If you use this approach, RB-tree is the best one
> > to go with (and we don't have to care zone's status.)
>
> I like the idea in general, but I have concerns about
>
> 1. Tracking all cgroup memory, it can quickly get expensive (tracking
> to check for vm.soft_limit_ratio and for usage)
Not so expensive because we already tracks them all by default cgroup.
Then, what we need is "fast" counter.
Maybe percpu coutner (lib/percpu_counter.c) gives us enough codes for counting.
Checking value ratio is ...how about "once per 1000 increment per cpu" or some ?
> 2. Finding a good default for the sysctl (might not be so hard)
>
I think some parameter like high-low watermark is good and we can find
good value as
- low watermak .... max_memory - (sum of all zone->high) * 16 of memory.
- high watermark .... max_memory - (sum_of all zone->high) * 8
(just an example but not so bad.)
> Even today our influence on global LRU is very limited, only when we
> come under reclaim, we do an additional step of seeing if we can get
> memory from soft limit groups first.
>
> (1) is a real concern.
Maybe yes. But all memcg will call "charge" "uncharge" codes so, problem is
just "counter". I think percpu coutner works enough.
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2009-03-17 4:48 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-14 17:30 [PATCH 0/4] Memory controller soft limit patches (v6) Balbir Singh
2009-03-14 17:30 ` [PATCH 1/4] Memory controller soft limit documentation (v6) Balbir Singh
2009-03-14 17:30 ` [PATCH 2/4] Memory controller soft limit interface (v6) Balbir Singh
2009-03-14 17:31 ` [PATCH 3/4] Memory controller soft limit organize cgroups (v6) Balbir Singh
2009-03-16 0:21 ` KAMEZAWA Hiroyuki
2009-03-16 8:47 ` Balbir Singh
2009-03-16 8:57 ` KAMEZAWA Hiroyuki
2009-03-14 17:31 ` [PATCH 4/4] Memory controller soft limit reclaim on contention (v6) Balbir Singh
2009-03-16 0:52 ` KAMEZAWA Hiroyuki
2009-03-16 8:35 ` Balbir Singh
2009-03-16 8:49 ` KAMEZAWA Hiroyuki
2009-03-16 9:03 ` KAMEZAWA Hiroyuki
2009-03-16 9:10 ` Balbir Singh
2009-03-16 11:10 ` KAMEZAWA Hiroyuki
2009-03-16 11:38 ` Balbir Singh
2009-03-16 11:58 ` KAMEZAWA Hiroyuki
2009-03-16 12:19 ` Balbir Singh
2009-03-17 3:47 ` KAMEZAWA Hiroyuki
2009-03-17 4:40 ` Balbir Singh
2009-03-17 4:47 ` KAMEZAWA Hiroyuki [this message]
2009-03-17 4:58 ` Balbir Singh
2009-03-17 5:17 ` KAMEZAWA Hiroyuki
2009-03-17 5:55 ` Balbir Singh
2009-03-17 6:00 ` KAMEZAWA Hiroyuki
2009-03-17 6:22 ` Balbir Singh
2009-03-17 6:30 ` KAMEZAWA Hiroyuki
2009-03-17 6:59 ` Balbir Singh
2009-03-18 0:07 ` KAMEZAWA Hiroyuki
2009-03-18 4:14 ` Balbir Singh
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=20090317134727.62efc14e.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=lizf@cn.fujitsu.com \
--cc=riel@redhat.com \
--cc=yamamoto@valinux.co.jp \
/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