From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"balbir@linux.vnet.ibm.com" <balbir@linux.vnet.ibm.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>
Subject: Re: [mmotm][experimental][PATCH] coalescing charge
Date: Fri, 4 Sep 2009 14:26:54 +0900 [thread overview]
Message-ID: <20090904142654.08dd159f.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <20090904142143.15ffcb53.kamezawa.hiroyu@jp.fujitsu.com>
On Fri, 4 Sep 2009 14:21:43 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> On Fri, 4 Sep 2009 14:11:57 +0900
> Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> wrote:
>
> > > > > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> > > > It looks basically good. I'll do some tests with all patches applied.
> > > >
> > > thanks.
> > >
> > it seems that these patches make rmdir stall again...
> > This batched charge patch seems not to be the (only) suspect, though.
> >
> Ouch, no probelm with the latest mmotm ? I think this charge-uncharge-offload
> patch set doesn't use css_set()/get()...
> Hm, softlimit related parts ?
>
Ah, one more question. What memory.usage_in_bytes shows in that case ?
If not zero, charge/uncharge coalescing is guilty.
Thanks,
-Kame
>
> > > > > @@ -1288,23 +1364,25 @@ static int __mem_cgroup_try_charge(struc
> > > > > return 0;
> > > > >
> > > > > VM_BUG_ON(css_is_removed(&mem->css));
> > > > > + if (mem_cgroup_is_root(mem))
> > > > > + goto done;
> > > > > + if (consume_stock(mem))
> > > > > + goto charged;
> > > > >
> > IMHO, it would be better to check consume_stock() every time in the while loop below,
> > because someone might have already refilled the stock while the current context
> > sleeps in reclaiming memory.
> >
> Hm, make sense. I'll add it.
>
>
> > > > > while (1) {
> > > > > int ret = 0;
> > > > > unsigned long flags = 0;
> > > > >
> > > > > - if (mem_cgroup_is_root(mem))
> > > > > - goto done;
> > > > > - ret = res_counter_charge(&mem->res, PAGE_SIZE, &fail_res);
> > > > > + ret = res_counter_charge(&mem->res, CHARGE_SIZE, &fail_res);
> > > > > if (likely(!ret)) {
> > > > > if (!do_swap_account)
> > > > > break;
> > > > > - ret = res_counter_charge(&mem->memsw, PAGE_SIZE,
> > > > > + ret = res_counter_charge(&mem->memsw, CHARGE_SIZE,
> > > > > &fail_res);
> > > > > if (likely(!ret))
> > > > > break;
> > > > > /* mem+swap counter fails */
> > > > > - res_counter_uncharge(&mem->res, PAGE_SIZE);
> > > > > + res_counter_uncharge(&mem->res, CHARGE_SIZE);
> > > > > flags |= MEM_CGROUP_RECLAIM_NOSWAP;
> > > > > mem_over_limit = mem_cgroup_from_res_counter(fail_res,
> > > > > memsw);
> > How about changing pre-charge size according to the loop count ?
> > IMHO, it would be better to disable pre-charge at least in nr_retries==0 case,
> > i.e. it is about to causing oom.
>
> ya, I wonder I should do that. but it increases complexity if in bad conding.
> let me try.
>
> Thanks,
> -Kame
>
> >
> >
> > P.S. I will not be so active next week.
> >
> > Thanks,
> > Daisuke Nishimura.
> >
>
> --
> 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>
>
--
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-09-04 5:28 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-02 0:34 [mmotm][PATCH 1/2] memcg: softlimit clean up KAMEZAWA Hiroyuki
2009-09-02 0:35 ` [mmotm][PATCH 2/2] memcg: reduce calls for soft limit excess KAMEZAWA Hiroyuki
2009-09-02 5:16 ` Daisuke Nishimura
2009-09-02 5:20 ` KAMEZAWA Hiroyuki
2009-09-02 5:56 ` [mmotm][PATCH 2/2 v2] " KAMEZAWA Hiroyuki
2009-09-02 20:15 ` Balbir Singh
2009-09-03 0:34 ` KAMEZAWA Hiroyuki
2009-09-02 3:56 ` [mmotm][PATCH 1/2] memcg: softlimit clean up Daisuke Nishimura
2009-09-02 4:41 ` [mmotm][PATCH] coalescing uncharge KAMEZAWA Hiroyuki
2009-09-02 6:15 ` KAMEZAWA Hiroyuki
2009-09-02 9:29 ` [mmotm][experimental][PATCH] coalescing charge KAMEZAWA Hiroyuki
2009-09-02 19:58 ` Balbir Singh
2009-09-03 0:24 ` KAMEZAWA Hiroyuki
2009-09-03 5:17 ` Daisuke Nishimura
2009-09-04 4:18 ` KAMEZAWA Hiroyuki
2009-09-04 5:11 ` Daisuke Nishimura
2009-09-04 5:21 ` KAMEZAWA Hiroyuki
2009-09-04 5:26 ` KAMEZAWA Hiroyuki [this message]
2009-09-04 6:40 ` Daisuke Nishimura
2009-09-04 6:50 ` KAMEZAWA Hiroyuki
2009-09-04 7:37 ` [mmotm][BUGFIX][PATCH] memcg: fix softlimit css refcnt handling KAMEZAWA Hiroyuki
2009-09-04 7:45 ` KAMEZAWA Hiroyuki
2009-09-04 10:07 ` Daisuke Nishimura
2009-09-06 23:04 ` [mmotm][BUGFIX][PATCH] memcg: fix softlimit css refcnt handling(yet another one) Daisuke Nishimura
2009-09-07 0:49 ` KAMEZAWA Hiroyuki
2009-09-07 4:51 ` Balbir Singh
2009-09-04 5:47 ` [mmotm][experimental][PATCH] coalescing charge 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=20090904142654.08dd159f.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nishimura@mxp.nes.nec.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