From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
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:42:04 -0400 [thread overview]
Message-ID: <1311298924.29521.2.camel@lade.trondhjem.org> (raw)
In-Reply-To: <20110721214106.GB3341@fieldses.org>
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.
If, OTOH, that memory is being allocated dynamically, then the rule is
"don't let rpciod sleep".
Cheers
Trond
--
Trond Myklebust
Linux NFS client maintainer
NetApp
Trond.Myklebust@netapp.com
www.netapp.com
next prev parent reply other threads:[~2011-07-22 1:42 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 [this message]
2011-07-22 1:55 ` J. Bruce Fields
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=1311298924.29521.2.camel@lade.trondhjem.org \
--to=trond.myklebust@netapp.com \
--cc=bfields@fieldses.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).