[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130516221200.GF7171@mtj.dyndns.org>
Date: Thu, 16 May 2013 15:12:00 -0700
From: Tejun Heo <tj@...nel.org>
To: Michal Hocko <mhocko@...e.cz>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
Johannes Weiner <hannes@...xchg.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Ying Han <yinghan@...gle.com>, Hugh Dickins <hughd@...gle.com>,
Glauber Costa <glommer@...allels.com>,
Michel Lespinasse <walken@...gle.com>,
Greg Thelen <gthelen@...gle.com>,
Balbir Singh <bsingharora@...il.com>
Subject: Re: [patch v3 -mm 1/3] memcg: integrate soft reclaim tighter with
zone shrinking code
Sorry about the delay. Just getting back to memcg.
On Mon, May 13, 2013 at 09:46:10AM +0200, Michal Hocko wrote:
...
> during the first pass. Only groups which are over their soft limit or
> any of their parents up the hierarchy is over the limit are considered
ancestors?
> +static void shrink_zone(struct zone *zone, struct scan_control *sc)
> +{
> + bool do_soft_reclaim = mem_cgroup_should_soft_reclaim(sc);
> + unsigned long nr_scanned = sc->nr_scanned;
> +
> + __shrink_zone(zone, sc, do_soft_reclaim);
> +
> + /*
> + * No group is over the soft limit or those that are do not have
> + * pages in the zone we are reclaiming so we have to reclaim everybody
> + */
> + if (do_soft_reclaim && (sc->nr_scanned == nr_scanned)) {
> + __shrink_zone(zone, sc, false);
> + return;
> + }
> +}
Maybe the following is easier to follow?
if (mem_cgroup_should_soft_reclaim(sc)) {
__shrink_zone(zone, sc, true);
if (sc->nr_scanned == nr_scanned)
__shrink_zone(zone, sc, false);
} else {
__shrink_zone(zone, sc, false);
}
But it's a minor point, please feel free to ignore.
Reviewed-by: Tejun Heo <tj@...nel.org>
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists