Linux NFS development
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Jeff Layton <jlayton@redhat.com>
Cc: "J. Bruce Fields" <bfields@fieldses.org>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH] knfsd: allocate readahead cache in individual chunks
Date: Thu, 14 Aug 2008 15:11:26 -0400	[thread overview]
Message-ID: <1218741086.7328.24.camel@localhost> (raw)
In-Reply-To: <20080814145227.15efe087-xSBYVWDuneFaJnirhKH9O4GKTjYczspe@public.gmane.org>

On Thu, 2008-08-14 at 14:52 -0400, Jeff Layton wrote:
> 1) do what I did here (individual kmalloc for each raparm)
> 
> 2) do an allocation of an raparms array for each hash bucket, but when
> we get to larger thread counts, these will still require multi-page
> allocations:
> 
> 8192 threads * 2 / 16 buckets * 72 bytes = 73728 byte allocation
> 
> 3) declare a separate slabcache for this and allocate each raparm
> individually from that
> 
> ...#3 might be reasonable, but we could end up wasting even more memory
> that way when we only have a few threads. Tough call...

How about
  4) Set an upper cap on the size of the raparm array

Readahead is only useful in moderation. You don't want to reach a
situation where the various threads' readahead activities start causing
thrashing...

Cheers
  Trond


  parent reply	other threads:[~2008-08-14 19:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-14  2:03 [PATCH] knfsd: allocate readahead cache in individual chunks Jeff Layton
2008-08-14 18:06 ` J. Bruce Fields
2008-08-14 18:52   ` Jeff Layton
     [not found]     ` <20080814145227.15efe087-xSBYVWDuneFaJnirhKH9O4GKTjYczspe@public.gmane.org>
2008-08-14 19:11       ` Trond Myklebust [this message]
2008-08-14 19:14         ` Jeff Layton

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=1218741086.7328.24.camel@localhost \
    --to=trond.myklebust@fys.uio.no \
    --cc=bfields@fieldses.org \
    --cc=jlayton@redhat.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