From: "KAMEZAWA Hiroyuki" <kamezawa.hiroyu@jp.fujitsu.com>
To: balbir@linux.vnet.ibm.com
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
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 (v5)
Date: Fri, 13 Mar 2009 17:41:03 +0900 (JST) [thread overview]
Message-ID: <b025ddee3cbbdaadeddd2d32220e5389.squirrel@webmail-b.css.fujitsu.com> (raw)
In-Reply-To: <20090313071501.GK16897@balbir.in.ibm.com>
Balbir Singh wrote:
> * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-03-13
> 15:51:25]:
>
>> Balbir Singh wrote:
>> > Feature: Implement reclaim from groups over their soft limit
>> >
>> > From: Balbir Singh <balbir@linux.vnet.ibm.com>
>>
>> > +unsigned long mem_cgroup_soft_limit_reclaim(struct zonelist *zl,
>> gfp_t
>> > gfp_mask)
>> > +{
>> > + unsigned long nr_reclaimed = 0;
>> > + struct mem_cgroup *mem;
>> > + unsigned long flags;
>> > + unsigned long reclaimed;
>> > +
>> > + /*
>> > + * This loop can run a while, specially if mem_cgroup's continuously
>> > + * keep exceeding their soft limit and putting the system under
>> > + * pressure
>> > + */
>> > + do {
>> > + mem = mem_cgroup_largest_soft_limit_node();
>> > + if (!mem)
>> > + break;
>> > +
>> > + reclaimed = mem_cgroup_hierarchical_reclaim(mem, zl,
>> > + gfp_mask,
>> > + MEM_CGROUP_RECLAIM_SOFT);
>> > + nr_reclaimed += reclaimed;
>> > + spin_lock_irqsave(&memcg_soft_limit_tree_lock, flags);
>> > + mem->usage_in_excess = res_counter_soft_limit_excess(&mem->res);
>> > + __mem_cgroup_remove_exceeded(mem);
>> > + if (mem->usage_in_excess)
>> > + __mem_cgroup_insert_exceeded(mem);
>> > + spin_unlock_irqrestore(&memcg_soft_limit_tree_lock, flags);
>> > + css_put(&mem->css);
>> > + cond_resched();
>> > + } while (!nr_reclaimed);
>> > + return nr_reclaimed;
>> > +}
>> > +
>> Why do you never consider bad corner case....
>> As I wrote many times, "order of global usage" doesn't mean the
>> biggest user of memcg containes memory in zones which we want.
>> So, please don't pust "mem" back to RB-tree if reclaimed is 0.
>>
>> This routine seems toooo bad as v4.
>
> Are you talking about cases where a particular mem cgroup never
> allocated from a node? Thanks.. let me take a look at it
>
Using cpuset to test and limiting nodes for memory is an easy way,
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-13 8:41 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-12 17:56 [PATCH 0/4] Memory controller soft limit patches (v5) Balbir Singh
2009-03-12 17:56 ` [PATCH 1/4] Memory controller soft limit documentation (v5) Balbir Singh
2009-03-12 17:56 ` [PATCH 2/4] Memory controller soft limit interface (v5) Balbir Singh
2009-03-12 22:59 ` Andrew Morton
2009-03-13 4:58 ` Balbir Singh
2009-03-12 17:56 ` [PATCH 3/4] Memory controller soft limit organize cgroups (v5) Balbir Singh
2009-03-12 23:04 ` Andrew Morton
2009-03-13 5:03 ` Balbir Singh
2009-03-13 0:47 ` KOSAKI Motohiro
2009-03-13 5:04 ` Balbir Singh
2009-03-13 5:22 ` KOSAKI Motohiro
2009-03-13 8:20 ` Balbir Singh
2009-03-13 6:59 ` KAMEZAWA Hiroyuki
2009-03-13 7:09 ` Balbir Singh
2009-03-12 17:56 ` [PATCH 4/4] Memory controller soft limit reclaim on contention (v5) Balbir Singh
2009-03-12 23:34 ` Andrew Morton
2009-03-13 7:53 ` Balbir Singh
2009-03-13 1:36 ` KOSAKI Motohiro
2009-03-13 4:13 ` Balbir Singh
2009-03-13 4:31 ` KOSAKI Motohiro
2009-03-13 4:50 ` KOSAKI Motohiro
2009-03-13 5:07 ` Balbir Singh
2009-03-13 6:54 ` KOSAKI Motohiro
2009-03-13 7:03 ` Balbir Singh
2009-03-13 7:17 ` KOSAKI Motohiro
2009-03-13 7:26 ` Balbir Singh
2009-03-13 8:37 ` KAMEZAWA Hiroyuki
2009-03-13 5:26 ` Balbir Singh
2009-03-13 5:34 ` KOSAKI Motohiro
2009-03-13 4:58 ` Balbir Singh
2009-03-13 6:51 ` KAMEZAWA Hiroyuki
2009-03-13 7:15 ` Balbir Singh
2009-03-13 8:41 ` KAMEZAWA Hiroyuki [this message]
2009-03-13 7:02 ` [PATCH 0/4] Memory controller soft limit patches (v5) KAMEZAWA Hiroyuki
2009-03-13 7:07 ` KAMEZAWA Hiroyuki
2009-03-13 7:15 ` Andrew Morton
2009-03-13 7:29 ` Balbir Singh
2009-03-13 7:18 ` 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=b025ddee3cbbdaadeddd2d32220e5389.squirrel@webmail-b.css.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 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.