From: Tejun Heo <tj@kernel.org>
To: Michal Hocko <mhocko@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
linux-mm@kvack.org, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org, Ying Han <yinghan@google.com>,
Hugh Dickins <hughd@google.com>,
Glauber Costa <glommer@parallels.com>,
Michel Lespinasse <walken@google.com>,
Greg Thelen <gthelen@google.com>,
Balbir Singh <bsingharora@gmail.com>
Subject: Re: [patch -v4 4/8] memcg: enhance memcg iterator to support predicates
Date: Tue, 4 Jun 2013 12:36:19 -0700 [thread overview]
Message-ID: <20130604193619.GA14916@htj.dyndns.org> (raw)
In-Reply-To: <20130604134523.GH31242@dhcp22.suse.cz>
Hey, Michal.
On Tue, Jun 04, 2013 at 03:45:23PM +0200, Michal Hocko wrote:
> Is this something that you find serious enough to block this series?
> I do not want to push hard but I would like to settle with something
> finally. This is taking way longer than I would like.
I really don't think memcg can afford to add more mess than there
already is. Let's try to get things right with each change, please.
Can we please see how the other approach would look like? I have a
suspicion that it's likely be simpler but the devils are in the
details and all...
> > The iteration only depends on the current position. Can't you factor
> > out skipping part outside the function rather than rolling into this
> > monstery thing with predicate callback? Just test the condition
> > outside and call a function to skip whatever is necessary?
> >
> > Also, cgroup_rightmost_descendant() can be pretty expensive depending
> > on how your tree looks like.
>
> I have no problem using something else. This was just the easiest to
> use and it behaves more-or-less good for hierarchies which are more or
> less balanced. If this turns out to be a problem we can introduce a
> new cgroup_skip_subtree which would get to last->sibling or go up the
> parent chain until there is non-NULL sibling. But what would be the next
> selling point here if we made it perfect right now? ;)
Yeah, sure thing. I was just worried because the skipping here might
not be as good as the code seems to indicate. There will be cases,
which aren't too uncommon, where the skipping doesn't save much
compared to just continuing the pre-order walk, so.... And nobody
would really notice it unless [s]he looks really hard for it, which is
the more worrisome part for me. Maybe just stick a comment there
explaining that we probably want something better in the future?
Thanks.
--
tejun
--
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:[~2013-06-04 19:38 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-03 10:18 [patch v4] Soft limit rework Michal Hocko
2013-06-03 10:18 ` [patch -v4 1/8] memcg: integrate soft reclaim tighter with zone shrinking code Michal Hocko
2013-06-03 10:18 ` [patch -v4 2/8] memcg: Get rid of soft-limit tree infrastructure Michal Hocko
2013-06-03 10:18 ` [patch -v4 3/8] vmscan, memcg: Do softlimit reclaim also for targeted reclaim Michal Hocko
2013-06-03 10:18 ` [patch -v4 4/8] memcg: enhance memcg iterator to support predicates Michal Hocko
2013-06-04 1:07 ` Tejun Heo
2013-06-04 13:45 ` Michal Hocko
2013-06-04 19:36 ` Tejun Heo [this message]
2013-06-04 20:48 ` Michal Hocko
2013-06-04 20:54 ` Tejun Heo
2013-06-05 7:37 ` Michal Hocko
2013-06-05 8:05 ` Tejun Heo
2013-06-05 8:52 ` Michal Hocko
2013-06-05 8:58 ` Tejun Heo
2013-06-05 9:07 ` Michal Hocko
2013-06-05 9:09 ` Tejun Heo
2013-06-07 0:48 ` Tejun Heo
2013-06-07 8:25 ` Michal Hocko
2013-06-10 7:48 ` Michal Hocko
2013-06-03 10:18 ` [patch -v4 5/8] memcg: track children in soft limit excess to improve soft limit Michal Hocko
2013-06-03 10:18 ` [patch -v4 6/8] memcg, vmscan: Do not attempt soft limit reclaim if it would not scan anything Michal Hocko
2013-06-03 10:18 ` [patch -v4 7/8] memcg: Track all children over limit in the root Michal Hocko
2013-06-03 10:18 ` [patch -v4 8/8] memcg, vmscan: do not fall into reclaim-all pass too quickly Michal Hocko
2013-06-04 16:27 ` [patch v4] Soft limit rework Balbir Singh
2013-06-04 16:38 ` Michal Hocko
2013-06-04 17:57 ` Balbir Singh
2013-06-04 18:08 ` Michal Hocko
2013-06-11 15:43 ` Michal Hocko
2013-06-17 14:01 ` Michal Hocko
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=20130604193619.GA14916@htj.dyndns.org \
--to=tj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=bsingharora@gmail.com \
--cc=cgroups@vger.kernel.org \
--cc=glommer@parallels.com \
--cc=gthelen@google.com \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--cc=walken@google.com \
--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).