From: David Chinner <dgc@sgi.com>
To: Neil Brown <neilb@suse.de>
Cc: Linux NFS Mailing List <nfs@lists.sourceforge.net>,
Greg Banks <gnb@melbourne.sgi.com>
Subject: Re: [PATCH 4/8] knfsd: repcache: split hash index
Date: Mon, 16 Oct 2006 16:38:58 +1000 [thread overview]
Message-ID: <20061016063858.GI11034@melbourne.sgi.com> (raw)
In-Reply-To: <17714.59304.768727.298610@cse.unsw.edu.au>
On Mon, Oct 16, 2006 at 12:00:08PM +1000, Neil Brown wrote:
> If I've done my sums right (there is always room for doubt), then HASHSIZE == 4096.
>
> > +
> > + b->hash = kmalloc (HASHSIZE * sizeof(struct hlist_head), GFP_KERNEL);
>
> So this kmalloc asks for 16K or 32K depending on pointer size. On
> most machines that would be an order 2 or 3 allocation which is more
> likely to fail that order 0.
>
> I would really like to see HASHSIZE limited to PAGE_SIZE, and if
> needed, push CACHE_NUM_BUCKETS up ... that might make the
> 'cache_buckets' array bigger than a page, but we don't kmalloc that so
> it shouldn't be a problem.
>
> Hmmm.. but if we wanted to scale the hash table size based on memory,
> we would want to kmalloc cache_buckets which might limit it's size...
> Maybe we could try allocating it big - which might work on big
> machines, and scale back the size on kmalloc failure?? That would
> probably work.
Yes, that works. e.g. XFS uses kmem_zalloc_greedy() allocating
large hashes at mount time....
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
next prev parent reply other threads:[~2006-10-16 6:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-11 11:27 [PATCH 4/8] knfsd: repcache: split hash index Greg Banks
2006-10-16 2:00 ` Neil Brown
2006-10-16 6:38 ` David Chinner [this message]
2006-10-16 9:51 ` Greg Banks
2006-10-16 10:23 ` Neil Brown
2006-10-16 11:06 ` Greg Banks
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=20061016063858.GI11034@melbourne.sgi.com \
--to=dgc@sgi.com \
--cc=gnb@melbourne.sgi.com \
--cc=neilb@suse.de \
--cc=nfs@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.