linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: andros@netapp.com, Jeff Layton <jlayton@redhat.com>,
	linux-nfs@vger.kernel.org
Subject: Re: [[RFC] 1/1] SUNRPC: dynamic rpc_slot allocator for TCP
Date: Wed, 4 May 2011 12:07:26 +1000	[thread overview]
Message-ID: <20110504120726.347df3fc@notabene.brown> (raw)
In-Reply-To: <1304473563.26184.28.camel@lade.trondhjem.org>

On Tue, 03 May 2011 21:46:03 -0400 Trond Myklebust
<Trond.Myklebust@netapp.com> wrote:

> On Wed, 2011-05-04 at 11:18 +1000, NeilBrown wrote:
> > For rpc slots, I doubt you need mempools at all.
> > Mempools are only needed if failure is not an option and you would rather
> > wait, but you cannot wait for regular writeback because you are on the
> > writeback path.  So you use a mempool which waits for a previous request to
> > complete.  I don't think that describes rpc slots at all.
> > For rpc slots, you can afford to wait when setting up the transport, as you
> > are not on the writeout path yet, and later you can always cope with failure.
> > So just use kmalloc.
> 
> Errr.... No. By the time you get to allocating an RPC slot, you may be
> bang smack in the middle of the writeout path.
> 
> The scenario would be that something triggers a writeback (kswapd,
> direct reclaim,...) which triggers an RPC call, which requires you to
> allocate at least one rpc slot before you can put the write on the wire.
> 
> I agree with your assertion that we only need one successful slot
> allocation in order to make overall forward progress, but we definitely
> do need that one...
> 

Probably I misunderstood the code, but I thought that there was a base set of
slots preallocated.  Eventually one of those will become free won't it?

Looking at the code again, it only ever returns entries to the mempool when
it is about to destroy the xprt.  That makes no sense.  If you are using a
mempool, then you allocate when you need to use space, and free it as soon as
you have finished with it, so the next request can get a turn.

NeilBrown

  reply	other threads:[~2011-05-04  2:07 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-03  1:40 [RFC 0/1] SUNRPC: dynamic rpc_slot allocator for TCP andros
2011-05-03  1:40 ` [[RFC] 1/1] " andros
2011-05-04  0:20   ` Jeff Layton
2011-05-04  0:44     ` Trond Myklebust
2011-05-04  1:18       ` NeilBrown
2011-05-04  1:46         ` Trond Myklebust
2011-05-04  2:07           ` NeilBrown [this message]
2011-05-04 11:54             ` Jeff Layton
2011-05-04 14:54               ` Andy Adamson
2011-05-04 15:18                 ` Jeff Layton
2011-05-04 15:30                   ` Trond Myklebust
2011-05-04 15:52                   ` Andy Adamson
2011-05-04 16:01                     ` Chuck Lever
2011-05-04 17:22                       ` Andy Adamson
2011-05-05 12:05                         ` Jeff Layton
2011-05-04  1:33       ` Jeff Layton
2011-05-04 14:59   ` Jeff Layton
     [not found]     ` <20110504105918.422f7609-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2011-05-04 15:10       ` Andy Adamson
2011-05-04 15:08   ` Jeff Layton
2011-05-04 15:20     ` Andy Adamson
2011-05-04 15:31       ` Jeff Layton
2011-05-04 15:35       ` Trond Myklebust
2011-05-05 11:47         ` Jeff Layton
2011-05-05 12:19           ` Trond Myklebust
2011-05-03 20:06 ` [RFC 0/1] " Chuck Lever
2011-05-03 20:13   ` Andy Adamson
2011-05-03 20:20     ` Chuck Lever
2011-05-03 20:34       ` Andy Adamson

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=20110504120726.347df3fc@notabene.brown \
    --to=neilb@suse.de \
    --cc=Trond.Myklebust@netapp.com \
    --cc=andros@netapp.com \
    --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;
as well as URLs for NNTP newsgroup(s).