From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Peter Osterlund <petero2@telia.com>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: Can't make use of swap memory in 2.6.7-bk19
Date: Thu, 08 Jul 2004 12:14:16 +1000 [thread overview]
Message-ID: <40ECADF8.7010207@yahoo.com.au> (raw)
In-Reply-To: <m2brir9t6d.fsf@telia.com>
[-- Attachment #1: Type: text/plain, Size: 333 bytes --]
Peter Osterlund wrote:
> I created a test program that allocates a 300MB buffer and writes to
> all bytes sequentially. On my computer, which has 256MB RAM and 512MB
> swap, the program gets OOM killed after dirtying about 140-180MB, and
> the kernel reports:
>
Someone hand me a paper bag... Peter, can you give this patch a try?
[-- Attachment #2: vm-allocfail-fix.patch --]
[-- Type: text/x-patch, Size: 812 bytes --]
---
linux-2.6-npiggin/mm/vmscan.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff -puN mm/vmscan.c~vm-allocfail-fix mm/vmscan.c
--- linux-2.6/mm/vmscan.c~vm-allocfail-fix 2004-07-08 12:10:29.000000000 +1000
+++ linux-2.6-npiggin/mm/vmscan.c 2004-07-08 12:12:33.000000000 +1000
@@ -917,12 +917,12 @@ int try_to_free_pages(struct zone **zone
sc.nr_reclaimed += reclaim_state->reclaimed_slab;
reclaim_state->reclaimed_slab = 0;
}
- if (sc.nr_reclaimed >= SWAP_CLUSTER_MAX) {
+ total_scanned += sc.nr_scanned;
+ total_reclaimed += sc.nr_reclaimed;
+ if (total_reclaimed >= SWAP_CLUSTER_MAX) {
ret = 1;
goto out;
}
- total_scanned += sc.nr_scanned;
- total_reclaimed += sc.nr_reclaimed;
/*
* Try to write back as many pages as we just scanned. This
_
next prev parent reply other threads:[~2004-07-08 2:14 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 [this message]
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
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=40ECADF8.7010207@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--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