From: Nick Piggin <nickpiggin@yahoo.com.au>
To: tridge@osdl.org
Cc: Andrew Morton <akpm@osdl.org>,
rddunlap@osdl.org, linux-kernel@vger.kernel.org, agruen@suse.de,
Andrea Arcangeli <andrea@suse.de>
Subject: Re: memory leak in 2.6.11-rc2
Date: Tue, 25 Jan 2005 23:11:39 +1100 [thread overview]
Message-ID: <41F6377B.8030609@yahoo.com.au> (raw)
In-Reply-To: <16886.12026.810752.23284@samba.org>
[-- Attachment #1: Type: text/plain, Size: 1624 bytes --]
Andrew Tridgell wrote:
> Andrew,
>
> > So what you should do before generating the leak tool output is to put
> > heavy memory pressure on the machine to try to get it to free up as much of
> > that pagecache as possible. bzero(malloc(lots)) will do it - create a real
> > swapstorm, then do swapoff to kill remaining swapcache as well.
>
> As you saw when you logged into the machine earlier tonight, when you
> suspend the dbench processes and run a memory filler the memory is
> reclaimed.
>
> I still think its a bug though, as the oom killer is being triggered
> when it shouldn't be. I have 4G of ram in this machine, and I'm only
> running a couple of hundred processes that should be using maybe 500M
> in total, so for the oom killer to kick in might mean that the memory
> isn't being reclaimed under normal memory pressure. Certainly a ps
> shows no process using more than a few MB.
>
> The oom killer report is below. This is with 2.6.11-rc2, with the pipe
> leak fix, and the pgown monitoring patch. It was running one nbench of
> size 50 and one dbench of size 40 at the time.
>
There are various OOM killer improvements and fixes that have gone
into Andrew's kernel tree which should be included for 2.6.11.
I don't think the OOM killer was ever perfect in 2.6, but recent
tinkering in mm/ probably aggrivated it. *blush*
Here is another small OOM killer improvement. Previously we needed
to reclaim SWAP_CLUSTER_MAX pages in a single pass. That should be
changed so that we need only reclaim that many pages during the
entire try_to_free_pages run, without going OOM.
Andrea? Andrew? Look OK?
[-- Attachment #2: less-oom.patch --]
[-- Type: text/plain, Size: 800 bytes --]
---
linux-2.6-npiggin/mm/vmscan.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff -puN mm/vmscan.c~oom-helper mm/vmscan.c
--- linux-2.6/mm/vmscan.c~oom-helper 2005-01-25 23:04:28.000000000 +1100
+++ linux-2.6-npiggin/mm/vmscan.c 2005-01-25 23:05:06.000000000 +1100
@@ -914,12 +914,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:[~2005-01-25 12:11 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-20 2:01 [ea-in-inode 0/5] Further fixes Andreas Gruenbacher
2005-01-20 2:01 ` [patch 3/5] Documentation fix Andreas Gruenbacher
2005-01-20 2:01 ` [patch 4/5] Fix i_extra_isize check Andreas Gruenbacher
2005-01-20 2:01 ` [patch 1/5] No lock needed when freeing inode Andreas Gruenbacher
2005-01-20 2:01 ` [patch 2/5] Set the EXT3_FEATURE_COMPAT_EXT_ATTR for in-inode xattrs Andreas Gruenbacher
2005-01-20 2:01 ` [patch 5/5] Disallow in-inode attributes for reserved inodes Andreas Gruenbacher
2005-01-20 12:16 ` Andreas Dilger
2005-01-20 13:29 ` Andreas Gruenbacher
2005-01-20 23:05 ` Andreas Dilger
2005-01-21 0:36 ` Andreas Gruenbacher
2005-01-21 22:58 ` [ea-in-inode 0/5] Further fixes Stephen C. Tweedie
2005-01-21 23:46 ` Andreas Gruenbacher
2005-01-23 13:22 ` Andrew Tridgell
2005-01-23 22:09 ` Andrew Tridgell
2005-01-23 22:58 ` Andreas Gruenbacher
2005-01-23 23:32 ` Andreas Gruenbacher
2005-01-24 11:24 ` Andrew Tridgell
2005-01-24 11:42 ` Christoph Hellwig
2005-01-24 14:11 ` Andreas Gruenbacher
2005-01-25 3:19 ` memory leak in 2.6.11-rc2 Andrew Tridgell
2005-01-25 3:20 ` Randy.Dunlap
2005-01-25 3:31 ` Andrew Tridgell
2005-01-25 4:48 ` Andrew Tridgell
2005-01-25 6:06 ` Andrew Morton
2005-01-25 11:35 ` Andrew Tridgell
2005-01-25 12:11 ` Nick Piggin [this message]
2005-01-25 3:45 ` Dave Jones
2005-01-25 12:51 ` Andrea Arcangeli
2005-01-25 13:31 ` Andreas Gruenbacher
2005-01-25 13:55 ` Andrea Arcangeli
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=41F6377B.8030609@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=agruen@suse.de \
--cc=akpm@osdl.org \
--cc=andrea@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rddunlap@osdl.org \
--cc=tridge@osdl.org \
/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