public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: Max Michaels <mmichaels@rightmedia.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.8-r1 mem issues
Date: Mon, 20 Sep 2004 07:33:12 -0300	[thread overview]
Message-ID: <20040920103312.GA2089@logos.cnet> (raw)
In-Reply-To: <0FC82FC6709BE34CB9118EE0E252FD2307994E70@ehost007.exch005intermedia.net>

[-- Attachment #1: Type: text/plain, Size: 992 bytes --]

On Sun, Sep 19, 2004 at 04:20:48PM -0700, Max Michaels wrote:
> This is my first post, so please be forgiving of any faux-pas. I am
> having issues with 2.6.8-r1 with memory being eaten by the kernel. Top
> reveals that only about 35% of the memory (3GB) is being used but the
> actual count of free memory is only about 10MB. /proc/slabinfo shows no
> odd numbers and /proc/meminfo shows the same 10MB as the top total. No
> processes account for this memory, so I'm assuming it must be the
> kernel. Eventually, I run out of memory and OOM-killer starts killing
> processes until it has some memory. Is there some troubleshooting method
> I am missing or is this a known issue?

Hi Max,

Please try 2.6.9-rc2-mm1 and see if you can reproduce the problem there. 

If you can, please apply the attached patch and wait for the OOM killer to trigger.

Doing so will show us how many swap pages were free at the moment of the killing,
if there was swap space available there's something wrong.


[-- Attachment #2: vm-reclaim2.patch --]
[-- Type: text/plain, Size: 1331 bytes --]

--- mm/page_alloc.c.orig	2004-08-24 20:37:53.000000000 -0300
+++ mm/page_alloc.c	2004-08-24 22:51:49.498375608 -0300
@@ -1021,11 +1021,12 @@
 void show_free_areas(void)
 {
 	struct page_state ps;
-	int cpu, temperature;
+	int cpu, temperature, i;
 	unsigned long active;
 	unsigned long inactive;
 	unsigned long free;
 	struct zone *zone;
+	unsigned int swap_pages = 0;
 
 	for_each_zone(zone) {
 		show_node(zone);
@@ -1086,6 +1087,8 @@
 			" active:%lukB"
 			" inactive:%lukB"
 			" present:%lukB"
+			" pages_scanned:%lu"
+			" all_unreclaimable? %s"
 			"\n",
 			zone->name,
 			K(zone->free_pages),
@@ -1094,7 +1097,9 @@
 			K(zone->pages_high),
 			K(zone->nr_active),
 			K(zone->nr_inactive),
-			K(zone->present_pages)
+			K(zone->present_pages),
+			zone->pages_scanned,
+			(zone->all_unreclaimable ? "yes" : "no")
 			);
 		printk("protections[]:");
 		for (i = 0; i < MAX_NR_ZONES; i++)
@@ -1125,6 +1130,18 @@
 		printk("= %lukB\n", K(total));
 	}
 
+	swap_list_lock();
+	for (i = 0; i < nr_swapfiles; i++) {
+		if (!(swap_info[i].flags & SWP_USED) ||
+		     (swap_info[i].flags & SWP_WRITEOK))
+                       continue;
+		swap_pages += swap_info[i].inuse_pages;
+	}
+	swap_pages += nr_swap_pages;
+	swap_list_unlock();
+
+	printk("nr_free_swap_pages: %u\n", swap_pages);
+
 	show_swap_cache_info();
 }
 

  parent reply	other threads:[~2004-09-20 11:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-19 23:20 2.6.8-r1 mem issues Max Michaels
2004-09-20  0:18 ` Jon Masters
2004-09-20 10:33 ` Marcelo Tosatti [this message]
2004-09-20 15:27 ` Jeff V. Merkey
  -- strict thread matches above, loose matches on Subject: below --
2004-09-20  0:29 Max Michaels

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=20040920103312.GA2089@logos.cnet \
    --to=marcelo.tosatti@cyclades.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmichaels@rightmedia.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