[pnfs] sequence xdr fix

Trond Myklebust trond.myklebust at fys.uio.no
Thu Oct 4 09:48:48 EDT 2007


On Wed, 2007-10-03 at 20:25 -0700, dean hildebrand wrote:
> On 10/3/07, Trond Myklebust <trond.myklebust at fys.uio.no> wrote:
> > On Wed, 2007-10-03 at 14:52 -0700, dean hildebrand wrote:
> > > Here is a quick patch which removes duplicate sequence xdr allocations
> > > from all operations using sessions.  With this patch, our read
> > > performance increases 10x since the data doesn't need to be copied on
> > > the client after it is received.
> > >
> > > This is something we can talk about at the bakeathon, but for now I
> > > removed the global variable nr_sequence_quads and just set the buffer
> > > sizes statically. We need to develop an approach that will support
> > > NFSv4.0 and NFSv4.1.
> >
> > Just pass the replen as an argument to encode_readdir/encode_read/... so
> > that the caller can decide how much padding is needed.
> > The only reason why we haven't done this previously is that there is
> > only one caller (NFSv4.0).
> 
> Sounds like good idea.  Is it best to create separate constants at the
> top of nfs4xdr.c?
> eg:
> NFS4_dec_XXX_sz = ...
> NFS4_enc_XXX_sz = ...
> NFS41_dec_XXX_sz = NFS4_dec_XXX_sz + ...
> NFS41_enc_XXX_sz = NFS4_enc_XXX_sz + ...

Yes. I tend to find that helps the legibility of the code.

Cheers
  Trond



More information about the pNFS mailing list