From: Nikita Danilov <Nikita@Namesys.COM>
To: Linux Kernel Mailing List <Linux-Kernel@Vger.Kernel.ORG>
Subject: [PATCH] 5/5 VM changes: reclaim_mapped-pressure.patch
Date: Wed, 9 Jul 2003 12:47:35 +0400 [thread overview]
Message-ID: <16139.54951.18108.338103@laputa.namesys.com> (raw)
Use zone->pressure (rathar than scanning priority) to determine when to start
reclaiming mapped pages in refill_inactive_zone(). When using priority every
call to try_to_free_pages() starts with scanning parts of active list and
skipping mapped pages (because reclaim_mapped evaluates to 0 on low
priorities) no matter how high memory pressure is.
diff -puN mm/vmscan.c~reclaim_mapped-pressure mm/vmscan.c
--- i386/mm/vmscan.c~reclaim_mapped-pressure Wed Jul 9 12:24:53 2003
+++ i386-god/mm/vmscan.c Wed Jul 9 12:24:53 2003
@@ -95,6 +95,11 @@ static void zone_adj_pressure(struct zon
zone->pressure = expavg(zone->pressure, pass << 10, 1);
}
+static int pressure_to_priority(int pressure)
+{
+ return DEF_PRIORITY - (pressure >> 10);
+}
+
/*
* The list of shrinker callbacks used by to apply pressure to
* ageable caches.
@@ -685,7 +690,7 @@ refill_inactive_zone(struct zone *zone,
* `distress' is a measure of how much trouble we're having reclaiming
* pages. 0 -> no problems. 100 -> great trouble.
*/
- distress = 100 >> priority;
+ distress = 100 >> pressure_to_priority(zone->pressure);
/*
* The point of this algorithm is to decide when to start reclaiming
_
reply other threads:[~2003-07-09 8:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=16139.54951.18108.338103@laputa.namesys.com \
--to=nikita@namesys.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;
as well as URLs for NNTP newsgroup(s).