From: William Lee Irwin III <wli@holomorphy.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org, elf@buici.com
Subject: vmscan.c heuristic adjustment for smaller systems
Date: Sat, 17 Apr 2004 12:38:55 -0700 [thread overview]
Message-ID: <20040417193855.GP743@holomorphy.com> (raw)
Marc Singer reported an issue where an embedded ARM system performed
poorly due to page replacement potentially prematurely replacing
mapped memory where there was very little mapped pagecache in use to
begin with.
The following patch attempts to address the issue by using the
_maximum_ of vm_swappiness and distress to add to the mapped ratio, so
that distress doesn't contribute to swap_tendency until it exceeds
vm_swappiness, and afterward the effect is not cumulative.
The intended effect is that swap_tendency should vary in a more jagged
way, and not be elevated by distress beyond vm_swappiness until distress
exceeds vm_swappiness. For instance, since distress is 100 >>
zone->prev_priority, no distinction is made between a vm_swappiness of
50 or a vm_swappiness of 90 given the same mapped_ratio.
Marc Singer has results where this is an improvement, and hopefully can
clarify as-needed. Help determining whether this policy change is an
improvement for a broader variety of systems would be appreciated.
-- wli
Index: singer-2.6.5-mm6/mm/vmscan.c
===================================================================
--- singer-2.6.5-mm6.orig/mm/vmscan.c 2004-04-14 23:21:19.000000000 -0700
+++ singer-2.6.5-mm6/mm/vmscan.c 2004-04-17 11:09:35.000000000 -0700
@@ -636,7 +636,7 @@
*
* A 100% value of vm_swappiness overrides this algorithm altogether.
*/
- swap_tendency = mapped_ratio / 2 + distress + vm_swappiness;
+ swap_tendency = mapped_ratio / 2 + max(distress, vm_swappiness);
/*
* Now use this metric to decide whether to start moving mapped memory
next reply other threads:[~2004-04-17 19:38 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-17 19:38 William Lee Irwin III [this message]
2004-04-17 21:29 ` vmscan.c heuristic adjustment for smaller systems Marc Singer
2004-04-17 21:33 ` William Lee Irwin III
2004-04-17 21:52 ` Marc Singer
2004-04-18 1:06 ` William Lee Irwin III
2004-04-18 5:05 ` Marc Singer
2004-04-17 23:21 ` Andrew Morton
2004-04-17 23:30 ` Marc Singer
2004-04-17 23:51 ` Andrew Morton
2004-04-18 0:11 ` Trond Myklebust
2004-04-18 0:23 ` Marc Singer
2004-04-18 3:37 ` Nick Piggin
2004-04-18 4:17 ` William Lee Irwin III
2004-04-18 4:41 ` Nick Piggin
2004-04-18 5:10 ` Marc Singer
2004-04-18 5:19 ` Nick Piggin
2004-04-18 5:35 ` Marc Singer
2004-04-18 5:41 ` Nick Piggin
2004-04-18 23:44 ` Marc Singer
2004-04-18 9:29 ` Russell King
2004-04-18 1:59 ` William Lee Irwin III
2004-04-18 3:53 ` Andrew Morton
2004-04-18 5:38 ` Marc Singer
2004-04-18 5:52 ` Andrew Morton
2004-04-18 6:15 ` Marc Singer
2004-04-19 0:26 ` Rik van Riel
2004-04-19 0:39 ` Marc Singer
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=20040417193855.GP743@holomorphy.com \
--to=wli@holomorphy.com \
--cc=akpm@osdl.org \
--cc=elf@buici.com \
--cc=linux-kernel@vger.kernel.org \
/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