public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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: Wed, 14 Jul 2004 03:57:13 -0700	[thread overview]
Message-ID: <20040714105713.GP3411@holomorphy.com> (raw)
In-Reply-To: <m2u0wayisp.fsf@telia.com>

William Lee Irwin III <wli@holomorphy.com> writes:
>> Probably not what will get merged, but does the following brutal hack
>> do anything for you?

On Wed, Jul 14, 2004 at 12:39:18PM +0200, Peter Osterlund wrote:
> Doesn't help. I added some printk's to your patch and got this:

Brilliant, about zero dirty. Okay, I'm desperate. Could you try running
this and see what it spews when the OOM kill happens?


-- wli

Index: for_akpm-2.6.8-rc1/mm/oom_kill.c
===================================================================
--- for_akpm-2.6.8-rc1.orig/mm/oom_kill.c	2004-07-11 10:34:39.000000000 -0700
+++ for_akpm-2.6.8-rc1/mm/oom_kill.c	2004-07-14 03:54:23.990164640 -0700
@@ -220,7 +220,7 @@
 /**
  * out_of_memory - is the system out of memory?
  */
-void out_of_memory(void)
+void out_of_memory(unsigned gfp_mask, int order)
 {
 	/*
 	 * oom_lock protects out_of_memory()'s static variables.
@@ -273,6 +273,10 @@
 
 	/* oom_kill() sleeps */
 	spin_unlock(&oom_lock);
+	printk("Out of memory: pid %d, comm %-13.13s, gfp 0x%u, order %d\n",
+		current->pid, current->comm, gfp_mask, order);
+	show_free_areas();
+	dump_stack();
 	oom_kill();
 	spin_lock(&oom_lock);
 
Index: for_akpm-2.6.8-rc1/mm/vmscan.c
===================================================================
--- for_akpm-2.6.8-rc1.orig/mm/vmscan.c	2004-07-13 22:18:04.193959000 -0700
+++ for_akpm-2.6.8-rc1/mm/vmscan.c	2004-07-14 03:53:31.422156192 -0700
@@ -942,7 +942,7 @@
 	}
 	if ((gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY)) {
 		if (!laptop_mode || sc.may_writepage)
-			out_of_memory();
+			out_of_memory(gfp_mask, order);
 		else {
 			sc.may_writepage = 1;
 			goto retry;
Index: for_akpm-2.6.8-rc1/include/linux/swap.h
===================================================================
--- for_akpm-2.6.8-rc1.orig/include/linux/swap.h	2004-07-13 22:57:05.104087536 -0700
+++ for_akpm-2.6.8-rc1/include/linux/swap.h	2004-07-14 03:53:09.308517976 -0700
@@ -148,7 +148,7 @@
 #define vm_swap_full() (nr_swap_pages*2 < total_swap_pages)
 
 /* linux/mm/oom_kill.c */
-extern void out_of_memory(void);
+void out_of_memory(unsigned, int);
 
 /* linux/mm/memory.c */
 extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *);

  reply	other threads:[~2004-07-14 10:57 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
2004-07-14 10:39             ` Peter Osterlund
2004-07-14 10:57               ` William Lee Irwin III [this message]
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=20040714105713.GP3411@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