From: Christoph Lameter <clameter@sgi.com>
To: linux-kernel@vger.kernel.org
Cc: steiner@sgi.com, ak@suse.de, Wu Fengguang <wfg@mail.ustc.edu.cn>,
Christoph Lameter <clameter@sgi.com>,
linux-mm@vger.kernel.org, Martin Hicks <mort@bork.org>
Subject: Zone reclaim V4 [1/3]: resurrect may_swap
Date: Wed, 21 Dec 2005 13:08:23 -0800 (PST) [thread overview]
Message-ID: <20051221210823.3354.53223.sendpatchset@schroedinger.engr.sgi.com> (raw)
Resurrect may_swap in struct scan_control
Patch against 2.6.15-rc5-mm3 to undo the patch to remove may_writepage.
Not needed for 2.6.14 / 2.6.15-rc6.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Index: linux-2.6.15-rc5-mm3/mm/vmscan.c
===================================================================
--- linux-2.6.15-rc5-mm3.orig/mm/vmscan.c 2005-12-20 15:46:51.000000000 -0800
+++ linux-2.6.15-rc5-mm3/mm/vmscan.c 2005-12-21 12:32:43.000000000 -0800
@@ -71,6 +71,9 @@ struct scan_control {
int may_writepage;
+ /* Can pages be swapped as part of reclaim? */
+ int may_swap;
+
/* This context's SWAP_CLUSTER_MAX. If freeing memory for
* suspend, we effectively ignore SWAP_CLUSTER_MAX.
* In this context, it doesn't matter that we scan the
@@ -457,6 +460,8 @@ static int shrink_list(struct list_head
* Try to allocate it some swap space here.
*/
if (PageAnon(page) && !PageSwapCache(page)) {
+ if (!sc->may_swap)
+ goto keep_locked;
if (!add_to_swap(page, GFP_ATOMIC))
goto activate_locked;
}
@@ -1180,6 +1185,7 @@ int try_to_free_pages(struct zone **zone
sc.gfp_mask = gfp_mask;
sc.may_writepage = 0;
+ sc.may_swap = 1;
count_event(ALLOCSTALL);
@@ -1282,6 +1288,7 @@ loop_again:
total_reclaimed = 0;
sc.gfp_mask = GFP_KERNEL;
sc.may_writepage = 0;
+ sc.may_swap = 1;
sc.nr_mapped = global_page_state(NR_MAPPED);
count_event(PAGEOUTRUN);
next reply other threads:[~2005-12-21 21:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-21 21:08 Christoph Lameter [this message]
2005-12-21 21:08 ` Zone reclaim V4 [2/3]: Reclaim logic based on zoned counters Christoph Lameter
2005-12-21 21:08 ` Zone reclaim V4 [3/3]: Alternate logic without " Christoph Lameter
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=20051221210823.3354.53223.sendpatchset@schroedinger.engr.sgi.com \
--to=clameter@sgi.com \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@vger.kernel.org \
--cc=mort@bork.org \
--cc=steiner@sgi.com \
--cc=wfg@mail.ustc.edu.cn \
/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
Powered by JetHome