From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: kosaki.motohiro@jp.fujitsu.com,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Rik van Riel <riel@redhat.com>
Subject: Re: [PATCH] mmtom: Prevent shrinking of active anon lru list in case of no swap space V2
Date: Thu, 14 May 2009 21:11:40 +0900 (JST) [thread overview]
Message-ID: <20090514210839.9B90.A69D9226@jp.fujitsu.com> (raw)
In-Reply-To: <28c262360905140505h2db7ac3bp5ca10fcf2b4301bb@mail.gmail.com>
> On Thu, May 14, 2009 at 8:44 PM, KOSAKI Motohiro
> <kosaki.motohiro@jp.fujitsu.com> wrote:
> >> >
> >> > Changelog since V2
> >> > ?o Add new function - can_reclaim_anon : it tests anon_list can be reclaim
> >> >
> >> > Changelog since V1
> >> > ?o Use nr_swap_pages <= 0 in shrink_active_list to prevent scanning ?of active anon list.
> >> >
> >> > Now shrink_active_list is called several places.
> >> > But if we don't have a swap space, we can't reclaim anon pages.
> >> > So, we don't need deactivating anon pages in anon lru list.
> >> >
> >> > Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
> >> > Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> >> > Cc: Johannes Weiner <hannes@cmpxchg.org>
> >> > Cc: Rik van Riel <riel@redhat.com>
> >>
> >> looks good to me. thanks :)
> >
> > Grr, my fault.
> >
> >
> >
> >> ?static unsigned long shrink_list(enum lru_list lru, unsigned long nr_to_scan,
> >> ? ? ? struct zone *zone, struct scan_control *sc, int priority)
> >> ?{
> >> @@ -1399,7 +1412,7 @@ static unsigned long shrink_list(enum lru_list lru, unsigned long nr_to_scan,
> >> ? ? ? ? ? ? ? return 0;
> >> ? ? ? }
> >>
> >> - ? ? if (lru == LRU_ACTIVE_ANON && inactive_anon_is_low(zone, sc)) {
> >> + ? ? if (lru == LRU_ACTIVE_ANON && can_reclaim_anon(zone, sc)) {
> >> ? ? ? ? ? ? ? shrink_active_list(nr_to_scan, zone, sc, priority, file);
> >> ? ? ? ? ? ? ? return 0;
> >
> > you shouldn't do that. if nr_swap_pages==0, get_scan_ratio return anon=0%.
> > then, this branch is unnecessary.
> >
>
> But, I think at last it can be happen following as.
>
> 1515 * Even if we did not try to evict anon pages at all, we want to
> 1516 * rebalance the anon lru active/inactive ratio.
> 1517 */
> 1518 if (inactive_anon_is_low(zone, sc))
> 1519 shrink_active_list(SWAP_CLUSTER_MAX, zone, sc, priority, 0);
I pointed to shrink_list(), but you replayed shrink_zone().
I only talked about shrink_list().
--
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:[~2009-05-14 12:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-14 11:11 Minchan Kim
2009-05-14 11:25 ` KOSAKI Motohiro
2009-05-14 11:44 ` KOSAKI Motohiro
2009-05-14 12:05 ` Minchan Kim
2009-05-14 12:11 ` KOSAKI Motohiro [this message]
2009-05-14 12:35 ` Minchan Kim
2009-05-14 12:58 ` Rik van Riel
2009-05-14 13:09 ` Minchan Kim
2009-05-14 13:18 ` Rik van Riel
2009-05-14 13:33 ` Minchan Kim
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=20090514210839.9B90.A69D9226@jp.fujitsu.com \
--to=kosaki.motohiro@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan.kim@gmail.com \
--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