From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
nishimura@mxp.nes.nec.co.jp, menage@google.com, xemul@openvz.org,
linux-mm@kvack.org, lizf@cn.fujitsu.com
Subject: Re: [RFC] Reduce the resource counter lock overhead
Date: Thu, 25 Jun 2009 21:46:11 +0530 [thread overview]
Message-ID: <20090625161611.GB8642@balbir.in.ibm.com> (raw)
In-Reply-To: <20090625153033.17852d85.kamezawa.hiroyu@jp.fujitsu.com>
* KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-06-25 15:30:33]:
> On Thu, 25 Jun 2009 11:10:42 +0530
> Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
>
> > * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-06-25 13:39:08]:
> >
> > > On Wed, 24 Jun 2009 20:44:26 -0700
> > > Andrew Morton <akpm@linux-foundation.org> wrote:
> > >
> > > > On Thu, 25 Jun 2009 08:57:17 +0530 Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
> > > >
> > > > > We do a read everytime before we charge.
> > > >
> > > > See, a good way to fix that is to not do it. Instead of
> > > >
> > > > if (under_limit())
> > > > charge_some_more(amount);
> > > > else
> > > > goto fail;
> > > >
> > > > one can do
> > > >
> > > > if (try_to_charge_some_more(amount) < 0)
> > > > goto fail;
> > > >
> > > > which will halve the locking frequency. Which may not be as beneficial
> > > > as avoiding the locking altogether on the read side, dunno.
> > > >
> > > I don't think we do read-before-write ;)
> > >
> >
> > I need to figure out the reason for read contention and why seqlock's
> > help. Like I said before I am seeing some strange values for
> > reclaim_stats on the root cgroup, even though it is not reclaimable or
> > not used for reclaim. There can be two reasons
> >
> I don't remember but reclaim_stat goes bad ? new BUG ?
> reclaim_stat means zone_recaim_stat gotten by get_reclaim_stat() ?
>
> IIUC, after your ROOT_CGROUP-no-LRU patch, reclaim_stat of root cgroup
> will never be accessed. Right ?
>
Correct!
>
> > 1. Reclaim
> > 2. User space constantly reading the counters
> >
> > I have no user space utilities I am aware of running on the system,
> > constantly reading the contents of the files.
> >
>
> This is from your result.
>
> Before After
> class name &counter->lock: &(&counter->lock)->lock
> con-bounces 1534627 962193
> contentions 1575341 976349
> waittime-min 0.57 0.60
> waittime-max 18.39 14.07
> waittime-total 675713.23 465926.04
> acq-bounces 43330446 21364165
> acquisitions 138524248 66041988
> holdtime-min 0.43 0.45
> holdtime-max 148.13 88.31
> holdtime-total 54133607.05 25395513.12
>
> >From this result, acquisitions is changed as
> - 138524248 => 66041988
> Almost half.
>
Yes, precisely! That is why I thought it was a great result.
> Then,
> - "read" should be half of all counter access.
> or
> - did you enabped swap cgroup in "after" test ?
>
> BTW, if this result is against "Root" cgroup, no reclaim by memcg
> will happen after your no-ROOT-LRU patch.
>
The configuration was the same for both runs. I'll rerun and see why
that is.
--
Balbir
--
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-06-25 19:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-24 17:05 Balbir Singh
2009-06-24 19:40 ` Paul Menage
2009-06-24 23:10 ` Andrew Morton
2009-06-24 23:53 ` KAMEZAWA Hiroyuki
2009-06-25 3:27 ` Balbir Singh
2009-06-25 3:44 ` Andrew Morton
2009-06-25 4:39 ` KAMEZAWA Hiroyuki
2009-06-25 5:40 ` Balbir Singh
2009-06-25 6:30 ` KAMEZAWA Hiroyuki
2009-06-25 16:16 ` Balbir Singh [this message]
2009-06-25 5:01 ` Balbir Singh
2009-06-25 4:37 ` KAMEZAWA Hiroyuki
2009-06-25 3:04 ` Balbir Singh
2009-06-25 3:40 ` Andrew Morton
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=20090625161611.GB8642@balbir.in.ibm.com \
--to=balbir@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=lizf@cn.fujitsu.com \
--cc=menage@google.com \
--cc=nishimura@mxp.nes.nec.co.jp \
--cc=xemul@openvz.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