From: "Randy.Dunlap" <rdunlap@xenotime.net>
To: David Chinner <dgc@sgi.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] Per-superblock unused dentry LRU lists.
Date: Tue, 23 May 2006 18:44:07 -0700 [thread overview]
Message-ID: <20060523184407.dc8b4a2b.rdunlap@xenotime.net> (raw)
In-Reply-To: <20060524012412.GB7412499@melbourne.sgi.com>
On Wed, 24 May 2006 11:24:12 +1000 David Chinner wrote:
> Index: 2.6.x-xfs-new/fs/dcache.c
> ===================================================================
> --- 2.6.x-xfs-new.orig/fs/dcache.c 2006-05-15 16:24:44.212207654 +1000
> +++ 2.6.x-xfs-new/fs/dcache.c 2006-05-16 14:00:46.327462206 +1000
> @@ -114,6 +113,38 @@ static void dentry_iput(struct dentry *
> }
> }
>
> +static void
> +dentry_lru_add(struct dentry *dentry)
> +{
> + list_add(&dentry->d_lru, &dentry->d_sb->s_dentry_lru);
> + dentry_stat.nr_unused++;
> +}
> +
> +static void
> +dentry_lru_add_tail(struct dentry *dentry)
> +{
> + list_add_tail(&dentry->d_lru, &dentry->d_sb->s_dentry_lru);
> + dentry_stat.nr_unused++;
> +}
> +
> +static void
> +dentry_lru_del(struct dentry *dentry)
> +{
> + if (!list_empty(&dentry->d_lru)) {
> + list_del(&dentry->d_lru);
> + dentry_stat.nr_unused--;
> + }
> +}
> +
> +static void
> +dentry_lru_del_init(struct dentry *dentry)
> +{
> + if (likely(!list_empty(&dentry->d_lru))) {
> + list_del_init(&dentry->d_lru);
> + dentry_stat.nr_unused--;
> + }
> +}
> +
> /*
> * This is dput
> *
Please use regular kernel coding style for functions:
don't put qualifiers and names on separate lines.
> @@ -377,6 +399,48 @@ static inline void prune_one_dentry(stru
> spin_lock(&dcache_lock);
> }
>
> +/*
> + * Shrink the dentry LRU on æ given superblock.
on ? given superblock ?
> + */
> +static void
> +__shrink_dcache_sb(struct super_block *sb, int *count, int flags)
> +{
---
~Randy
next prev parent reply other threads:[~2006-05-24 1:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-24 1:24 David Chinner
2006-05-24 1:44 ` Randy.Dunlap [this message]
2006-05-24 1:48 ` David Chinner
2006-05-24 1:59 ` Arjan van de Ven
2006-05-24 4:01 ` David Chinner
2006-05-24 4:23 ` Arjan van de Ven
2006-05-24 5:47 ` David Chinner
2006-05-24 5:02 ` Balbir Singh
2006-05-24 6:19 ` David Chinner
2006-05-24 7:06 ` Balbir Singh
2006-05-24 8:15 ` David Chinner
2006-05-24 8:28 ` Balbir Singh
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=20060523184407.dc8b4a2b.rdunlap@xenotime.net \
--to=rdunlap@xenotime.net \
--cc=dgc@sgi.com \
--cc=linux-fsdevel@vger.kernel.org \
--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®