mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [rfc][patch] dynamic resizing dentry hash using RCU
Date: Sat, 24 Feb 2007 06:15:56 +0100	[thread overview]
Message-ID: <20070224051556.GB16601@wotan.suse.de> (raw)
In-Reply-To: <20070224130723.01f3c429.kamezawa.hiroyu@jp.fujitsu.com>

On Sat, Feb 24, 2007 at 01:07:23PM +0900, KAMEZAWA Hiroyuki wrote:
> On Fri, 23 Feb 2007 16:37:43 +0100
> Nick Piggin <npiggin@suse.de> wrote:
> 
> > +static void dcache_hash_resize(unsigned int new_shift);
> > +static void mod_nr_dentry(int mod)
> > +{
> > +	unsigned long dentry_size;
> > +
> > +	dentry_stat.nr_dentry += mod;
> > +
> > +	dentry_size = 1 << dentry_hash->shift;
> > +	if (unlikely(dentry_stat.nr_dentry > dentry_size+(dentry_size>>1)))
> > +		dcache_hash_resize(dentry_hash->shift+1);
> > +	else if (unlikely(dentry_stat.nr_dentry < (dentry_size>>1)))
> > +		dcache_hash_resize(dentry_hash->shift-1);
> > +}
> > +
> 
> Do we need to do this kind of resizing in implicit automatic way ?
> I think it's good to show contention rate by /proc and add sysctl for
> resize this.

Well having the kernel automatically adjust to the workload is better
than a sysctl. But it could well be the case that these simple heuristics
are bad (though they're fine for my system).

But a manual override is a good idea as well.

  reply	other threads:[~2007-02-24  5:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-23 15:37 Nick Piggin
2007-02-23 16:31 ` Eric Dumazet
2007-02-24  1:08   ` Nick Piggin
2007-02-23 17:25 ` Zach Brown
2007-02-24  1:26   ` Nick Piggin
2007-02-24  2:07     ` Nick Piggin
2007-02-24  1:31   ` Michael K. Edwards
2007-02-24  1:52     ` Nick Piggin
2007-02-24  4:07 ` KAMEZAWA Hiroyuki
2007-02-24  5:15   ` Nick Piggin [this message]
2007-02-24  4:24 ` William Lee Irwin III
2007-02-24  5:09   ` Nick Piggin
2007-02-24 22:56     ` William Lee Irwin III
2007-02-25  0:56       ` David Miller
2007-02-25  2:15         ` William Lee Irwin III
2007-02-25  6:21 ` Paul E. McKenney
2007-03-05  4:11 ` David Miller
2007-03-05  4:27   ` Nick Piggin
2007-03-05  4:38     ` David Miller
2007-03-05  4:42     ` Nick Piggin

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=20070224051556.GB16601@wotan.suse.de \
    --to=npiggin@suse.de \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®