From: Hugh Dickins <hugh.dickins@tiscali.co.uk>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Rik van Riel <riel@redhat.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Mel Gorman <mel@csn.ul.ie>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH mmotm] vmscan move pgdeactivate modification to shrink_active_list fix2
Date: Wed, 2 Sep 2009 01:57:21 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0909020154060.31130@sister.anvils> (raw)
In-Reply-To: <Pine.LNX.4.64.0908282034240.19475@sister.anvils>
A second fix to the ill-starred
vmscan-move-pgdeactivate-modification-to-shrink_active_list.patch
which, once corrected to update the right counters by the first fix,
builds up absurdly large Active counts in /proc/meminfo.
nr_rotated is not the number of pages added back to the active list
(maybe it once was, maybe it should be again: but if so that's not
any business for a code rearrangement patch). shrink_active_list()
needs to keep a separate nr_reactivated count of those.
Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
---
Or... revert the offending patch and its first fix.
mm/vmscan.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- mmotm/mm/vmscan.c 2009-08-28 18:30:33.000000000 +0100
+++ linux/mm/vmscan.c 2009-09-02 01:28:34.000000000 +0100
@@ -1306,6 +1306,7 @@ static void shrink_active_list(unsigned
struct zone_reclaim_stat *reclaim_stat = get_reclaim_stat(zone, sc);
unsigned long nr_rotated = 0;
unsigned long nr_deactivated = 0;
+ unsigned long nr_reactivated = 0;
lru_add_drain();
spin_lock_irq(&zone->lru_lock);
@@ -1354,6 +1355,7 @@ static void shrink_active_list(unsigned
*/
if ((vm_flags & VM_EXEC) && !PageAnon(page)) {
list_add(&page->lru, &l_active);
+ nr_reactivated++;
continue;
}
}
@@ -1382,7 +1384,7 @@ static void shrink_active_list(unsigned
__count_vm_events(PGDEACTIVATE, nr_deactivated);
__mod_zone_page_state(zone, NR_ISOLATED_ANON + file, -nr_taken);
__mod_zone_page_state(zone, NR_ACTIVE_ANON + file * LRU_FILE,
- nr_rotated);
+ nr_reactivated);
__mod_zone_page_state(zone, NR_INACTIVE_ANON + file * LRU_FILE,
nr_deactivated);
spin_unlock_irq(&zone->lru_lock);
--
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-09-02 0:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-28 19:39 [PATCH mmotm] vmscan move pgdeactivate modification to shrink_active_list fix Hugh Dickins
2009-08-28 21:21 ` Rik van Riel
2009-08-28 22:38 ` Minchan Kim
2009-08-29 10:00 ` KOSAKI Motohiro
2009-08-29 12:22 ` Johannes Weiner
2009-08-29 15:32 ` KOSAKI Motohiro
2009-09-02 0:57 ` Hugh Dickins [this message]
2009-09-02 1:30 ` [PATCH mmotm] vmscan move pgdeactivate modification to shrink_active_list fix2 KOSAKI Motohiro
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=Pine.LNX.4.64.0909020154060.31130@sister.anvils \
--to=hugh.dickins@tiscali.co.uk \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mel@csn.ul.ie \
--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).