From: "J. Bruce Fields" <bfields@fieldses.org>
To: Krishna Kumar <krikku@gmail.com>
Cc: Krishna Kumar <krkumar2@in.ibm.com>,
jlayton@redhat.com, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 1/11] nfsd: ADD data structure infrastructure
Date: Tue, 21 Apr 2009 18:48:38 -0400 [thread overview]
Message-ID: <20090421224838.GH27411@fieldses.org> (raw)
In-Reply-To: <20090325133628.16437.11092.sendpatchset-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
On Wed, Mar 25, 2009 at 07:06:28PM +0530, Krishna Kumar wrote:
> From: Krishna Kumar <krkumar2@in.ibm.com>
>
> ADD infrastructure in terms of new structures.
>
> Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
> ---
>
> fs/nfsd/vfs.c | 35 +++++++++++++++++++++++++++++++++++
> 1 file changed, 35 insertions(+)
>
> diff -ruNp org/fs/nfsd/vfs.c new1/fs/nfsd/vfs.c
> --- org/fs/nfsd/vfs.c 2009-03-25 17:31:39.000000000 +0530
> +++ new1/fs/nfsd/vfs.c 2009-03-25 17:39:43.000000000 +0530
> @@ -88,6 +88,41 @@ struct raparm_hbucket {
> #define RAPARM_HASH_MASK (RAPARM_HASH_SIZE-1)
> static struct raparm_hbucket raparm_hash[RAPARM_HASH_SIZE];
>
> +/*
> + * This is a cache of file handles to quicken file lookup. This also
> + * helps prevent multiple open/close of a file when a client reads it.
> + *
> + * If you increase the number of cached files very much, you'll need to
> + * add a hash table here.
I'm a little confused here--what do you mean by "add a hash table here"?
--b.
> + */
> +struct fhcache {
> + struct fhcache *p_next;
> +
> + /* Hashed on this parameter */
> + __u32 p_auth;
> +
> + /* Cached information */
> + struct file *p_filp;
> + struct svc_export *p_exp;
> +
> + /* Refcount for overwrite */
> + atomic_t p_count;
> +
> + /* When this entry expires */
> + unsigned long p_expires;
> +
> + unsigned int p_hindex;
> +};
> +
> +struct fhcache_hbucket {
> + struct fhcache *pb_head;
> + spinlock_t pb_lock;
> +} ____cacheline_aligned_in_smp;
> +
> +#define FHPARM_HASH_BITS 8
> +#define FHPARM_HASH_SIZE (1<<FHPARM_HASH_BITS)
> +#define FHPARM_HASH_MASK (FHPARM_HASH_SIZE-1)
> +
> /*
> * Called from nfsd_lookup and encode_dirent. Check if we have crossed
> * a mount point.
next prev parent reply other threads:[~2009-04-21 22:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20090325133607.16437.33288.sendpatchset@localhost.localdomain>
[not found] ` <20090325133607.16437.33288.sendpatchset-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-04-17 18:46 ` [PATCH 0/11] nfsd: Summary of "Improve NFS server performance" J. Bruce Fields
2009-04-17 19:30 ` Krishna Kumar2
2009-04-21 22:57 ` J. Bruce Fields
2009-04-22 5:35 ` Krishna Kumar2
2009-04-22 19:41 ` J. Bruce Fields
[not found] ` <20090325133628.16437.11092.sendpatchset@localhost.localdomain>
[not found] ` <20090325133628.16437.11092.sendpatchset-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-04-21 22:48 ` J. Bruce Fields [this message]
2009-04-22 5:36 ` [PATCH 1/11] nfsd: ADD data structure infrastructure Krishna Kumar2
2009-04-22 19:43 ` J. Bruce Fields
2009-04-21 23:05 ` J. Bruce Fields
[not found] ` <20090325133647.16437.59567.sendpatchset@localhost.localdomain>
[not found] ` <20090325133647.16437.59567.sendpatchset-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-04-22 2:54 ` [PATCH 2/11] nfsd: ADD new function infrastructure J. Bruce Fields
2009-04-22 5:37 ` Krishna Kumar2
[not found] ` <20090325133707.16437.66360.sendpatchset@localhost.localdomain>
[not found] ` <20090325133707.16437.66360.sendpatchset-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-04-22 20:05 ` [PATCH 3/11] nfsd: CHANGE old function calls to new calls J. Bruce Fields
2009-04-23 15:55 ` Krishna Kumar2
2009-04-23 22:39 ` J. Bruce Fields
2009-04-24 16:17 ` Krishna Kumar2
2009-04-24 16:23 ` J. Bruce Fields
2009-04-24 16:58 ` Krishna Kumar2
2009-04-24 19:25 ` J. Bruce Fields
2009-04-26 11:16 ` Krishna Kumar2
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=20090421224838.GH27411@fieldses.org \
--to=bfields@fieldses.org \
--cc=jlayton@redhat.com \
--cc=krikku@gmail.com \
--cc=krkumar2@in.ibm.com \
--cc=linux-nfs@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