mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Wu Fengguang <wfg@mail.ustc.edu.cn>
Cc: linux-kernel@vger.kernel.org
Subject: Re: vm-kswapd-incmin.patch problem
Date: Wed, 23 Nov 2005 19:01:08 +1100	[thread overview]
Message-ID: <438421C4.6020201@yahoo.com.au> (raw)
In-Reply-To: <20051123040619.GA4386@mail.ustc.edu.cn>

Wu Fengguang wrote:
> Hi Nick,
> 

Hi Wu,

> Then I disabled the shrinker by:
>         echo 0 > /proc/sys/vm/vfs_cache_pressure
> 
> That increased the number from
>         3393    28      45      0       0       0
> to
>         6247    2672    45      0       0       0
> And there is no sudden huge increases of free pages any more.
> 

Yes, the inode shrinker can discard all pagecache from a file if
it is under a lot of pressure to free inodes. This is what you
are seeing I guess.

> Maybe your patch is shrinking the slabs much more, though I cannot confirm this
> from the source code. But one thing I'm sure is that there should be a lower
> bound for the unused dentries, either absolutely or relatively, something like
> this:
> 
> --- linux-2.6.15-rc1-mm2.orig/fs/dcache.c
> +++ linux-2.6.15-rc1-mm2/fs/dcache.c
> @@ -860,7 +860,7 @@ static int shrink_dcache_memory(int nr, 
>  			return -1;
>  		prune_dcache(nr);
>  	}
> -	return (dentry_stat.nr_unused / 100) * sysctl_vfs_cache_pressure;
> +	return (dentry_stat.nr_unused / 1000) * 10 * sysctl_vfs_cache_pressure;
>  }
>  

I don't think that kswapd-incmin puts much more pressure on the slab
(unless there is a bug), but I'll take a look. It could just be a
"weird" interaction in the reclaim code, or possibly a rounding issue.

Changing the pressure calculation here is probably not the right way
to do this, but rather in vmscan.c. I know Andrea has recently been
looking at a problem with slab shrinking too.

Thanks,
Nick

-- 
SUSE Labs, Novell Inc.

Send instant messages to your online friends http://au.messenger.yahoo.com 

      reply	other threads:[~2005-11-23  8:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20051122074818.GA3801@mail.ustc.edu.cn>
2005-11-23  4:06 ` Wu Fengguang
2005-11-23  8:01   ` Nick Piggin [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=438421C4.6020201@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wfg@mail.ustc.edu.cn \
    /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

all inboxes | Powered by JetHome®