From: Andrew Morton <akpm@digeo.com>
To: Rik van Riel <riel@conectiva.com.br>
Cc: "Martin J. Bligh" <mbligh@aracnet.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-mm mailing list <linux-mm@kvack.org>
Subject: Re: ZONE_NORMAL exhaustion (dcache slab)
Date: Mon, 21 Oct 2002 15:53:19 -0700 [thread overview]
Message-ID: <3DB4855F.D5DA002E@digeo.com> (raw)
In-Reply-To: Pine.LNX.4.44L.0210212028100.22993-100000@imladris.surriel.com
Rik van Riel wrote:
>
> On Mon, 21 Oct 2002, Martin J. Bligh wrote:
>
> > > Blockdevices only use ZONE_NORMAL for their pagecache. That cat will
> > > selectively put pressure on the normal zone (and DMA zone, of course).
> >
> > Ah, I recall that now. That's fundamentally screwed.
>
> It's not too bad since the data can be reclaimed easily.
>
> The problem in your case is that the dentry and inode cache
> didn't get reclaimed. Maybe there is a leak so they can't get
> reclaimed at all or maybe they just don't get reclaimed fast
> enough.
>
He had 3 million dentries and only 100k pages on the LRU,
so we should have been reclaiming 60 dentries per scanned
page.
Conceivably the multiply in shrink_slab() overflowed, where
we calculate local variable `delta'. But doubtful.
First, we need to make it happen again, then see if this (quick
hack) fixes it up.
--- 25/mm/vmscan.c~shrink_slab-overflow Mon Oct 21 15:40:57 2002
+++ 25-akpm/mm/vmscan.c Mon Oct 21 15:51:28 2002
@@ -147,14 +147,15 @@ static int shrink_slab(int scanned, uns
list_for_each(lh, &shrinker_list) {
struct shrinker *shrinker;
int entries;
- unsigned long delta;
+ long long delta;
shrinker = list_entry(lh, struct shrinker, list);
entries = (*shrinker->shrinker)(0, gfp_mask);
if (!entries)
continue;
- delta = scanned * shrinker->seeks * entries;
- shrinker->nr += delta / (pages + 1);
+ delta = scanned * shrinker->seeks;
+ delta *= entries;
+ shrinker->nr += do_div(delta, pages + 1);
if (shrinker->nr > SHRINK_BATCH) {
int nr = shrinker->nr;
.
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@digeo.com>
To: Rik van Riel <riel@conectiva.com.br>
Cc: "Martin J. Bligh" <mbligh@aracnet.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-mm mailing list <linux-mm@kvack.org>
Subject: Re: ZONE_NORMAL exhaustion (dcache slab)
Date: Mon, 21 Oct 2002 15:53:19 -0700 [thread overview]
Message-ID: <3DB4855F.D5DA002E@digeo.com> (raw)
In-Reply-To: Pine.LNX.4.44L.0210212028100.22993-100000@imladris.surriel.com
Rik van Riel wrote:
>
> On Mon, 21 Oct 2002, Martin J. Bligh wrote:
>
> > > Blockdevices only use ZONE_NORMAL for their pagecache. That cat will
> > > selectively put pressure on the normal zone (and DMA zone, of course).
> >
> > Ah, I recall that now. That's fundamentally screwed.
>
> It's not too bad since the data can be reclaimed easily.
>
> The problem in your case is that the dentry and inode cache
> didn't get reclaimed. Maybe there is a leak so they can't get
> reclaimed at all or maybe they just don't get reclaimed fast
> enough.
>
He had 3 million dentries and only 100k pages on the LRU,
so we should have been reclaiming 60 dentries per scanned
page.
Conceivably the multiply in shrink_slab() overflowed, where
we calculate local variable `delta'. But doubtful.
First, we need to make it happen again, then see if this (quick
hack) fixes it up.
--- 25/mm/vmscan.c~shrink_slab-overflow Mon Oct 21 15:40:57 2002
+++ 25-akpm/mm/vmscan.c Mon Oct 21 15:51:28 2002
@@ -147,14 +147,15 @@ static int shrink_slab(int scanned, uns
list_for_each(lh, &shrinker_list) {
struct shrinker *shrinker;
int entries;
- unsigned long delta;
+ long long delta;
shrinker = list_entry(lh, struct shrinker, list);
entries = (*shrinker->shrinker)(0, gfp_mask);
if (!entries)
continue;
- delta = scanned * shrinker->seeks * entries;
- shrinker->nr += delta / (pages + 1);
+ delta = scanned * shrinker->seeks;
+ delta *= entries;
+ shrinker->nr += do_div(delta, pages + 1);
if (shrinker->nr > SHRINK_BATCH) {
int nr = shrinker->nr;
.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
next prev parent reply other threads:[~2002-10-21 22:47 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-21 20:40 ZONE_NORMAL exhaustion (dcache slab) Martin J. Bligh
2002-10-21 20:40 ` Martin J. Bligh
2002-10-21 21:13 ` Andrew Morton
2002-10-21 21:13 ` Andrew Morton
2002-10-21 21:16 ` Martin J. Bligh
2002-10-21 21:16 ` Martin J. Bligh
2002-10-21 21:33 ` Andrew Morton
2002-10-21 21:33 ` Andrew Morton
2002-10-21 21:33 ` Martin J. Bligh
2002-10-21 21:33 ` Martin J. Bligh
2002-10-21 21:49 ` Andrew Morton
2002-10-21 21:49 ` Andrew Morton
2002-10-21 22:30 ` Rik van Riel
2002-10-21 22:30 ` Rik van Riel
2002-10-21 22:53 ` Andrew Morton [this message]
2002-10-21 22:53 ` Andrew Morton
2002-10-22 0:31 ` Martin J. Bligh
2002-10-22 0:31 ` Martin J. Bligh
2002-10-22 3:39 ` Andrew Morton
2002-10-22 3:39 ` Andrew Morton
2002-10-22 3:53 ` Martin J. Bligh
2002-10-22 3:53 ` Martin J. Bligh
2002-10-22 4:20 ` Andrew Morton
2002-10-22 4:20 ` Andrew Morton
2002-10-22 5:49 ` Martin J. Bligh
2002-10-22 5:49 ` Martin J. Bligh
2002-10-22 6:21 ` Andrew Morton
2002-10-22 6:21 ` Andrew Morton
2002-10-22 16:13 ` Martin J. Bligh
2002-10-22 16:13 ` Martin J. Bligh
2002-10-24 11:35 ` Ed Tomlinson
2002-10-24 11:35 ` Ed Tomlinson
2002-10-24 14:28 ` Martin J. Bligh
2002-10-24 14:28 ` Martin J. Bligh
2002-10-22 16:33 ` Rik van Riel
2002-10-22 16:33 ` Rik van Riel
2002-10-22 16:54 ` ARP address resolving in kernel Steffen Persvold
2002-10-22 17:05 ` ZONE_NORMAL exhaustion (dcache slab) Andrew Morton
2002-10-22 17:05 ` Andrew Morton
2002-10-22 16:21 ` Dipankar Sarma
2002-10-22 16:21 ` Dipankar Sarma
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=3DB4855F.D5DA002E@digeo.com \
--to=akpm@digeo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mbligh@aracnet.com \
--cc=riel@conectiva.com.br \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.