All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Steve Dickson <steved@redhat.com>,
	Linux NFS Mailing list <linux-nfs@vger.kernel.org>,
	tom@ogc.us, tmtalpey@gmail.com
Subject: Re: [PATCH] RDMA: Increasing RPCRDMA_MAX_DATA_SEGS
Date: Thu, 21 Jul 2011 21:55:03 -0400	[thread overview]
Message-ID: <20110722015503.GA4749@fieldses.org> (raw)
In-Reply-To: <1311298924.29521.2.camel@lade.trondhjem.org>

On Thu, Jul 21, 2011 at 09:42:04PM -0400, Trond Myklebust wrote:
> On Thu, 2011-07-21 at 17:41 -0400, J. Bruce Fields wrote: 
> > On Thu, Jul 21, 2011 at 01:49:02PM -0400, Steve Dickson wrote:
> > > Our performance team has noticed that increasing
> > > RPCRDMA_MAX_DATA_SEGS from 8 to 64 significantly
> > > increases throughput when using the RDMA transport.
> > 
> > The main risk that I can see being that we have on the stack in two
> > places:
> > 
> > 	rpcrdma_register_fmr_external(struct rpcrdma_mr_seg *seg, ...
> > 	{
> > 		...
> > 		u64 physaddrs[RPCRDMA_MAX_DATA_SEGS];
> > 
> > 	rpcrdma_register_default_external(struct rpcrdma_mr_seg *seg, ...
> > 	{
> > 		...
> > 		struct ib_phys_buf ipb[RPCRDMA_MAX_DATA_SEGS]; 
> > 
> > Where ip_phys_buf is 16 bytes.
> > 
> > So that's 512 bytes in the first case, 1024 in the second.  This is
> > called from rpciod--what are our rules about allocating memory from
> > rpciod?
> 
> Is that allocated on the stack? We should always try to avoid 1024-byte
> allocations on the stack, since that eats up a full 1/8th (or 1/4 in the
> case of 4k stacks) of the total stack space.

Right, it's on the stack, so I was wondering what we should do
instead....

> If, OTOH, that memory is being allocated dynamically, then the rule is
> "don't let rpciod sleep".

OK, so, looking around, the buf_alloc methods might provide examples to
follow for dynamic allocation here?

--b.

  reply	other threads:[~2011-07-22  1:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-21 17:49 [PATCH] RDMA: Increasing RPCRDMA_MAX_DATA_SEGS Steve Dickson
2011-07-21 21:41 ` J. Bruce Fields
2011-07-22  1:42   ` Trond Myklebust
2011-07-22  1:55     ` J. Bruce Fields [this message]
2011-07-22  8:19 ` Max Matveev
2011-07-25 15:18   ` Steve Dickson

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=20110722015503.GA4749@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=Trond.Myklebust@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=steved@redhat.com \
    --cc=tmtalpey@gmail.com \
    --cc=tom@ogc.us \
    /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.