From: Andrew Morton <akpm@osdl.org>
To: Andrea Arcangeli <andrea@suse.de>
Cc: noahm@csail.mit.edu, linux-kernel@vger.kernel.org
Subject: Re: OOM problems with 2.6.11-rc4
Date: Wed, 16 Mar 2005 04:30:05 -0800 [thread overview]
Message-ID: <20050316043005.3e2a0ef5.akpm@osdl.org> (raw)
In-Reply-To: <20050316003134.GY7699@opteron.random>
Andrea Arcangeli <andrea@suse.de> wrote:
>
> This below is an untested attempt at bringing dquot a bit more in line
> with the API, to make the whole thing a bit more consistent,
Like this? (Noah, don't bother testing this one)
Fix some bugs spotted by Andrea Arcangeli <andrea@suse.de>
- When we added /proc/sys/vm/vfs_cache_pressure we forgot to allow it to
tune the dquot and mbcache slabs as well.
- Reduce lock contention in shrink_dqcache_memory().
- Use dqstats.free_dquots in shrink_dqcache_memory(): this is the count of
reclaimable objects.
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
25-akpm/fs/dquot.c | 12 +++++-------
25-akpm/fs/mbcache.c | 2 +-
2 files changed, 6 insertions(+), 8 deletions(-)
diff -puN fs/dquot.c~slab-shrinkers-use-vfs_cache_pressure fs/dquot.c
--- 25/fs/dquot.c~slab-shrinkers-use-vfs_cache_pressure 2005-03-16 04:22:01.000000000 -0800
+++ 25-akpm/fs/dquot.c 2005-03-16 04:27:09.000000000 -0800
@@ -505,14 +505,12 @@ static void prune_dqcache(int count)
static int shrink_dqcache_memory(int nr, unsigned int gfp_mask)
{
- int ret;
-
- spin_lock(&dq_list_lock);
- if (nr)
+ if (nr) {
+ spin_lock(&dq_list_lock);
prune_dqcache(nr);
- ret = dqstats.allocated_dquots;
- spin_unlock(&dq_list_lock);
- return ret;
+ spin_unlock(&dq_list_lock);
+ }
+ return (dqstats.free_dquots / 100) * sysctl_vfs_cache_pressure;
}
/*
diff -puN fs/mbcache.c~slab-shrinkers-use-vfs_cache_pressure fs/mbcache.c
--- 25/fs/mbcache.c~slab-shrinkers-use-vfs_cache_pressure 2005-03-16 04:22:01.000000000 -0800
+++ 25-akpm/fs/mbcache.c 2005-03-16 04:24:43.000000000 -0800
@@ -225,7 +225,7 @@ mb_cache_shrink_fn(int nr_to_scan, unsig
e_lru_list), gfp_mask);
}
out:
- return count;
+ return (count / 100) * sysctl_vfs_cache_pressure;
}
_
prev parent reply other threads:[~2005-03-16 12:30 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-15 20:44 Noah Meyerhans
2005-03-15 21:56 ` Sean
2005-03-15 22:12 ` Lee Revell
2005-03-15 23:46 ` Andrew Morton
2005-03-18 16:12 ` Noah Meyerhans
2005-04-13 13:47 ` Andrea Arcangeli
2005-04-14 16:56 ` Noah Meyerhans
2005-03-16 0:31 ` Andrea Arcangeli
2005-03-16 11:12 ` Andrea Arcangeli
2005-03-16 12:04 ` Andrew Morton
2005-03-16 12:15 ` Andrew Morton
2005-03-16 18:37 ` Andrea Arcangeli
2005-03-16 22:21 ` Andrew Morton
2005-03-23 19:53 ` OOM problems on 2.6.12-rc1 with many fsx tests Mingming Cao
2005-03-23 22:49 ` Andrew Morton
2005-03-23 23:13 ` Martin J. Bligh
2005-03-23 23:20 ` Andrew Morton
2005-03-23 23:26 ` Andries Brouwer
2005-03-23 23:30 ` Martin J. Bligh
2005-03-23 23:42 ` Andrew Morton
2005-03-23 23:49 ` [Ext2-devel] " Badari Pulavarty
2005-03-24 1:49 ` Andrea Arcangeli
2005-03-24 2:00 ` Andrew Morton
2005-03-25 21:56 ` Andrew Morton
2005-03-25 22:11 ` [Ext2-devel] " Badari Pulavarty
2005-03-27 0:23 ` Mingming Cao
2005-03-27 19:22 ` Mingming Cao
2005-03-27 20:06 ` Badari Pulavarty
2005-03-27 20:17 ` Badari Pulavarty
2005-03-26 0:17 ` Dave Jones
2005-03-26 0:20 ` [Ext2-devel] " Badari Pulavarty
2005-04-04 1:35 ` Andrew Morton
2005-04-04 16:50 ` Mingming Cao
2005-04-04 20:04 ` Andrew Morton
2005-04-04 20:24 ` Martin J. Bligh
2005-04-04 20:33 ` Andrew Morton
2005-04-05 17:04 ` [Ext2-devel] " Mingming Cao
2005-04-06 1:23 ` Andrew Morton
2005-04-12 12:50 ` Stephen C. Tweedie
2005-04-05 16:44 ` Stephen C. Tweedie
2005-03-16 12:23 ` OOM problems with 2.6.11-rc4 Andrew Morton
2005-03-16 12:30 ` Andrew Morton [this message]
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=20050316043005.3e2a0ef5.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=andrea@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=noahm@csail.mit.edu \
/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
Powered by JetHome