linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Ying Han <yinghan@google.com>
To: balbir@linux.vnet.ibm.com
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Minchan Kim <minchan.kim@gmail.com>,
	Rik van Riel <riel@redhat.com>, Mel Gorman <mel@csn.ul.ie>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org
Subject: Re: [PATCH 1/2] check the return value of soft_limit reclaim
Date: Tue, 29 Mar 2011 10:39:31 -0700	[thread overview]
Message-ID: <BANLkTikXHW-yvJp=fw1D-Y3BMRadbLQvsg@mail.gmail.com> (raw)
In-Reply-To: <20110329153853.GD2879@balbir.in.ibm.com>

On Tue, Mar 29, 2011 at 8:38 AM, Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
> * nishimura@mxp.nes.nec.co.jp <nishimura@mxp.nes.nec.co.jp> [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@google.com> 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@google.com>
>> > ---
>> >  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.

I don't fully understand the "balance_gap" at the first place, and
maybe that is something interesting to talk about
in LSF :)


May be it might make sense to increment sc.nr_reclaimed based on the
return value?

Yes, that is how it is implemented now in V3 where we contribute the
sc.nr_scanned and sc.nr_reclaimed from soft_limit reclaim.

Thanks

--Ying

>
> --
>        Three Cheers,
>        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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-03-29 17:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-28  6:12 [PATCH 0/2] Reduce reclaim from per-zone LRU in global kswapd Ying Han
2011-03-28  6:12 ` [PATCH 1/2] check the return value of soft_limit reclaim Ying Han
2011-03-28  6:39   ` KOSAKI Motohiro
2011-03-28  8:44     ` KAMEZAWA Hiroyuki
2011-03-28 15:29       ` Minchan Kim
2011-03-28 17:35       ` Ying Han
2011-03-28 16:44     ` Ying Han
2011-03-28  7:33   ` Daisuke Nishimura
2011-03-29 15:38     ` Balbir Singh
2011-03-29 17:39       ` Ying Han [this message]
2011-03-28  6:12 ` [PATCH 2/2] add two stats to monitor " Ying Han

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='BANLkTikXHW-yvJp=fw1D-Y3BMRadbLQvsg@mail.gmail.com' \
    --to=yinghan@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=minchan.kim@gmail.com \
    --cc=nishimura@mxp.nes.nec.co.jp \
    --cc=riel@redhat.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).