* nishimura@xxxxxxxxxxxxxxxxx <nishimura@xxxxxxxxxxxxxxxxx> [2011-03-28 16:33:11]: > Hi, > > This patch looks good to me, except for one nitpick. > > On Sun, 27 Mar 2011 23:12:54 -0700 > Ying Han <yinghan@xxxxxxxxxx> wrote: > > > In the global background reclaim, we do soft reclaim before scanning the > > per-zone LRU. However, the return value is ignored. This patch adds the logic > > where no per-zone reclaim happens if the soft reclaim raise the free pages > > above the zone's high_wmark. > > > > I did notice a similar check exists but instead leaving a "gap" above the > > high_wmark(the code right after my change in vmscan.c). There are discussions > > on whether or not removing the "gap" which intends to balance pressures across > > zones over time. Without fully understand the logic behind, I didn't try to > > merge them into one, but instead adding the condition only for memcg users > > who care a lot on memory isolation. > > > > Signed-off-by: Ying Han <yinghan@xxxxxxxxxx> > > --- > > mm/vmscan.c | 16 +++++++++++++++- > > 1 files changed, 15 insertions(+), 1 deletions(-) > > > > diff --git a/mm/vmscan.c b/mm/vmscan.c > > index 060e4c1..e4601c5 100644 > > --- a/mm/vmscan.c > > +++ b/mm/vmscan.c > > @@ -2320,6 +2320,7 @@ static unsigned long balance_pgdat(pg_data_t *pgdat, int order, > > int end_zone = 0; /* Inclusive. 0 = ZONE_DMA */ > > unsigned long total_scanned; > > struct reclaim_state *reclaim_state = current->reclaim_state; > > + unsigned long nr_soft_reclaimed; > > struct scan_control sc = { > > .gfp_mask = GFP_KERNEL, > > .may_unmap = 1, > > @@ -2413,7 +2414,20 @@ loop_again: > > * Call soft limit reclaim before calling shrink_zone. > > * For now we ignore the return value > > You should remove this comment too. > > But, Balbir-san, do you remember why did you ignore the return value here ? > We do that since soft limit reclaim cannot help us make a decision from the return value. balance_gap is recomputed following this routine. May be it might make sense to increment sc.nr_reclaimed based on the return value? -- Three Cheers, Balbir -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx 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@xxxxxxxxx"> email@xxxxxxxxx </a>