From: Christoph Hellwig <hch@infradead.org>
To: Maneesh Soni <maneesh@in.ibm.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
lse-tech <lse-tech@lists.sourceforge.net>,
Al Viro <viro@math.psu.edu>
Subject: Re: [Lse-tech] [RFC] dcache scalability patch (2.4.17)
Date: Fri, 12 Jul 2002 15:13:22 +0100 [thread overview]
Message-ID: <20020712151322.B31480@infradead.org> (raw)
In-Reply-To: <20020712193935.B13618@in.ibm.com>; from maneesh@in.ibm.com on Fri, Jul 12, 2002 at 07:39:35PM +0530
> diff -urN linux-2.4.17-base/fs/dcache.c linux-2.4.17-dc8/fs/dcache.c
> --- linux-2.4.17-base/fs/dcache.c Fri Dec 21 23:11:55 2001
> +++ linux-2.4.17-dc8/fs/dcache.c Fri Jul 12 16:18:39 2002
> @@ -25,6 +25,7 @@
> #include <linux/module.h>
>
> #include <asm/uaccess.h>
> +#include <linux/rcupdate.h>
Please try to include <linux/*.h> before <asm/*.h> headers.
> +static void d_callback(void *arg)
> +{
> + struct dentry * dentry = (struct dentry *)arg;
> +
> + if (dname_external(dentry))
> + kfree((void *) dentry->d_name.name);
> + kmem_cache_free(dentry_cache, dentry);
> +}
why do you cast to void * before calling kfree?
> - /* dput on a free dentry? */
> - if (!list_empty(&dentry->d_lru))
> - BUG();
> + spin_lock(&dentry->d_lock);
> + if (atomic_read(&dentry->d_count)) {
> + spin_unlock(&dentry->d_lock);
> + spin_unlock(&dcache_lock);
> + return;
> + }
> +
Please use tabs instead of eight spaces in kernel code.
Another implementation details is whether we shouldn't spin on a bit of
->d_vfs_flags instead of increasing struct dentry further. Maybe the
spin_lock_bit interface that wli prototypes might be a godd choise.
Else the patch looks fine to me, although I'm wondering why you target 2.4.17
next prev parent reply other threads:[~2002-07-12 14:10 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-12 14:09 [RFC] dcache scalability patch (2.4.17) Maneesh Soni
2002-07-12 14:13 ` Christoph Hellwig [this message]
2002-07-12 16:20 ` [Lse-tech] " Dipankar Sarma
2002-07-15 8:10 ` Maneesh Soni
2002-07-15 8:25 ` Maneesh Soni
2002-07-12 14:29 ` Alexander Viro
2002-07-12 16:10 ` [Lse-tech] " Dipankar Sarma
2002-07-12 18:02 ` Dipankar Sarma
2002-07-12 18:10 ` Hanna Linder
2002-07-12 17:35 ` Paul Menage
2002-07-13 8:52 ` Alexander Viro
2002-07-13 17:25 ` Paul Menage
2002-07-13 17:33 ` Alexander Viro
2002-07-13 17:51 ` Paul Menage
2002-07-13 17:54 ` Alexander Viro
2002-07-15 0:10 ` Linus Torvalds
2002-07-12 22:50 ` Hanna Linder
2002-07-15 7:49 ` Maneesh Soni
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=20020712151322.B31480@infradead.org \
--to=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lse-tech@lists.sourceforge.net \
--cc=maneesh@in.ibm.com \
--cc=viro@math.psu.edu \
/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