[pnfs] sequence xdr fix

Benny Halevy bhalevy at panasas.com
Thu Oct 4 00:16:58 EDT 2007


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 + ...

This is why I like my suggestion better.
When each operation returns the number of bytes it expects in the reply
adding them up for different kinds of compounds is easy and safer
as you don't need to synchronize these constants with the code
in case you're changing it as the draft makes progress.

> 
> Dean
> _______________________________________________
> pNFS mailing list
> pNFS at linux-nfs.org
> http://linux-nfs.org/cgi-bin/mailman/listinfo/pnfs



More information about the pNFS mailing list