From: William Lee Irwin III <wli@holomorphy.com>
To: Peter Osterlund <petero2@telia.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>,
Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org
Subject: Re: Can't make use of swap memory in 2.6.7-bk19
Date: Tue, 13 Jul 2004 22:20:10 -0700 [thread overview]
Message-ID: <20040714052010.GE3411@holomorphy.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0407081126360.3104@telia.com>
On Thu, Jul 08, 2004 at 11:30:45AM +0200, Peter Osterlund wrote:
> swappiness is set to 60.
> However, I realized that I had set /proc/sys/vm/laptop_mode to 1. If I set
> it to 0, 2.6.7-bk10 starts to work.
Probably not what will get merged, but does the following brutal hack
do anything for you?
Index: laptop-2.6.8-rc1/mm/vmscan.c
===================================================================
--- laptop-2.6.8-rc1.orig/mm/vmscan.c 2004-07-11 10:33:55.000000000 -0700
+++ laptop-2.6.8-rc1/mm/vmscan.c 2004-07-13 22:18:04.193959968 -0700
@@ -902,7 +902,7 @@
sc.may_writepage = 0;
inc_page_state(allocstall);
-
+retry:
for (i = 0; zones[i] != 0; i++)
zones[i]->temp_priority = DEF_PRIORITY;
@@ -940,8 +940,14 @@
if (sc.nr_scanned && priority < DEF_PRIORITY - 2)
blk_congestion_wait(WRITE, HZ/10);
}
- if ((gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY))
- out_of_memory();
+ if ((gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY)) {
+ if (!laptop_mode || sc.may_writepage)
+ out_of_memory();
+ else {
+ sc.may_writepage = 1;
+ goto retry;
+ }
+ }
out:
for (i = 0; zones[i] != 0; i++)
zones[i]->prev_priority = zones[i]->temp_priority;
next prev parent reply other threads:[~2004-07-14 5:20 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-08 1:36 Can't make use of swap memory in 2.6.7-bk19 Peter Osterlund
2004-07-08 1:43 ` William Lee Irwin III
2004-07-08 2:14 ` Nick Piggin
2004-07-08 2:30 ` William Lee Irwin III
2004-07-08 12:59 ` Peter Osterlund
2004-07-08 19:39 ` William Lee Irwin III
2004-07-09 0:57 ` Nick Piggin
2004-07-09 1:53 ` William Lee Irwin III
2004-07-09 2:06 ` Nick Piggin
2004-07-09 2:09 ` William Lee Irwin III
2004-07-09 2:12 ` Andrew Morton
2004-07-09 2:50 ` William Lee Irwin III
2004-07-09 4:51 ` Andrew Morton
2004-07-09 2:14 ` Nick Piggin
2004-07-08 8:12 ` Peter Osterlund
2004-07-08 8:20 ` Andrew Morton
2004-07-08 8:23 ` Nick Piggin
2004-07-08 9:30 ` Peter Osterlund
2004-07-14 5:20 ` William Lee Irwin III [this message]
2004-07-14 10:39 ` Peter Osterlund
2004-07-14 10:57 ` William Lee Irwin III
2004-07-14 12:55 ` Peter Osterlund
2004-07-14 13:22 ` William Lee Irwin III
2004-07-14 20:00 ` Peter Osterlund
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=20040714052010.GE3411@holomorphy.com \
--to=wli@holomorphy.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
--cc=petero2@telia.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