From: Wu Fengguang <fengguang.wu@intel.com>
To: Vincent Li <macli@brc.ubc.ca>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Rik van Riel <riel@redhat.com>,
Minchan Kim <minchan.kim@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] mm/vsmcan: check shrink_active_list() sc->isolate_pages() return value.
Date: Tue, 1 Sep 2009 09:56:17 +0800 [thread overview]
Message-ID: <20090901015617.GB11320@localhost> (raw)
In-Reply-To: <1251759241-15167-1-git-send-email-macli@brc.ubc.ca>
On Tue, Sep 01, 2009 at 06:54:01AM +0800, Vincent Li wrote:
> commit 5343daceec (If sc->isolate_pages() return 0...) make shrink_inactive_list handle
> sc->isolate_pages() return value properly. Add similar proper return value check for
> shrink_active_list() sc->isolate_pages().
>
> Signed-off-by: Vincent Li <macli@brc.ubc.ca>
Looks good to me, thanks.
Reviewed-by: Wu Fengguang <fengguang.wu@intel.com>
> ---
> mm/vmscan.c | 9 +++++++--
> 1 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 460a6f7..2d1c846 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -1319,9 +1319,12 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
> if (scanning_global_lru(sc)) {
> zone->pages_scanned += pgscanned;
> }
> - reclaim_stat->recent_scanned[file] += nr_taken;
> -
> __count_zone_vm_events(PGREFILL, zone, pgscanned);
> +
> + if (nr_taken == 0)
> + goto done;
> +
> + reclaim_stat->recent_scanned[file] += nr_taken;
> if (file)
> __mod_zone_page_state(zone, NR_ACTIVE_FILE, -nr_taken);
> else
> @@ -1383,6 +1386,8 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
> __mod_zone_page_state(zone, NR_ISOLATED_ANON + file, -nr_taken);
> __mod_zone_page_state(zone, LRU_ACTIVE + file * LRU_FILE, nr_rotated);
> __mod_zone_page_state(zone, LRU_BASE + file * LRU_FILE, nr_deactivated);
> +
> +done:
> spin_unlock_irq(&zone->lru_lock);
> }
>
> --
> 1.6.0.4
--
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>
prev parent reply other threads:[~2009-09-01 1:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-31 22:54 [PATCH] mm/vsmcan: check shrink_active_list() sc->isolate_pages() return value Vincent Li
2009-08-31 23:29 ` Minchan Kim
2009-09-01 0:01 ` Vincent Li
2009-09-01 0:12 ` Minchan Kim
2009-09-01 0:43 ` KOSAKI Motohiro
2009-09-01 4:56 ` Vincent Li
2009-08-31 23:42 ` Rik van Riel
2009-09-01 1:56 ` Wu Fengguang [this message]
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=20090901015617.GB11320@localhost \
--to=fengguang.wu@intel.com \
--cc=akpm@linux-foundation.org \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=macli@brc.ubc.ca \
--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;
as well as URLs for NNTP newsgroup(s).