From: Andrew Morton <akpm@linux-foundation.org>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>,
Ying Han <yinghan@google.com>,
"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>
Subject: Re: [PATCHv4] memcg: reclaim memory from node in round-robin
Date: Thu, 26 May 2011 12:52:07 -0700 [thread overview]
Message-ID: <20110526125207.e02e5775.akpm@linux-foundation.org> (raw)
In-Reply-To: <20110506151302.a7256987.kamezawa.hiroyu@jp.fujitsu.com>
On Fri, 6 May 2011 15:13:02 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> > It would be much better to work out the optimum time at which to rotate
> > the index via some deterministic means.
> >
> > If we can't think of a way of doing that then we should at least pace
> > the rotation frequency via something saner than wall-time. Such as
> > number-of-pages-scanned.
> >
>
>
> What I think now is using reclaim_stat or usigng some fairness based on
> the ratio of inactive file caches. We can calculate the total sum of
> recalaim_stat which gives us a scan_ratio for a whole memcg. And we can
> calculate LRU rotate/scan ratio per node. If rotate/scan ratio is small,
> it will be a good candidate of reclaim target. Hmm,
>
> - check which memory(anon or file) should be scanned.
> (If file is too small, rotate/scan ratio of file is meaningless.)
> - check rotate/scan ratio of each nodes.
> - calculate weights for each nodes (by some logic ?)
> - give a fair scan w.r.t node's weight.
>
> Hmm, I'll have a study on this.
How's the study coming along ;)
I'll send this in to Linus today, but I'll feel grumpy while doing so.
We really should do something smarter here - the magic constant will
basically always be suboptimal for everyone and we end up tweaking its
value (if we don't, then the feature just wasn't valuable in the first
place) and then we add a tunable and then people try to tweak the
default setting of the tunable and then I deride them for not setting
the tunable in initscripts and then we have to maintain the stupid
tunable after we've changed the internal implementation and it's all
basically screwed up.
How to we automatically determine the optimum time at which to rotate,
at runtime?
--
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>
next prev parent reply other threads:[~2011-05-26 19:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-27 7:51 [PATCHv2] memcg: reclaim memory from node in round-robin KAMEZAWA Hiroyuki
2011-04-27 17:33 ` Ying Han
2011-04-27 23:57 ` KAMEZAWA Hiroyuki
2011-04-28 2:49 ` Ying Han
2011-04-28 0:35 ` [PATCHv3] " KAMEZAWA Hiroyuki
2011-04-28 1:37 ` Daisuke Nishimura
2011-04-28 1:49 ` [PATCHv4] " KAMEZAWA Hiroyuki
2011-04-28 2:04 ` Daisuke Nishimura
2011-05-04 21:26 ` Andrew Morton
2011-05-06 6:13 ` KAMEZAWA Hiroyuki
2011-05-26 19:52 ` Andrew Morton [this message]
2011-05-26 23:54 ` KAMEZAWA Hiroyuki
2011-05-27 2:39 ` KAMEZAWA Hiroyuki
2011-05-09 2:20 ` [PATCHv2] " KOSAKI Motohiro
2011-05-09 2:30 ` 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=20110526125207.e02e5775.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nishimura@mxp.nes.nec.co.jp \
--cc=yinghan@google.com \
/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;
as well as URLs for NNTP newsgroup(s).