Re: ZONE_NORMAL exhaustion (dcache slab)

From: Andrew Morton (akpm@digeo.com)
Date: Mon Oct 21 2002 - 17:53:19 EST


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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Oct 23 2002 - 22:00:56 EST