[pnfs] Server sessions slot table patches

Benny Halevy bhalevy at panasas.com
Wed Apr 4 06:53:44 EDT 2007


My question is why are we hashing sessionid at all?
Since the session_is is generated and returned by the server
why not just use it as a handle to a server managed sessions table?

for example:
struct nfsd_session_id {
	u32 si_handle;  /* index to the server sessions table */
	struct nfstime4 si_crtime; /* session create time */
};

This will allow the nfsd to detect stale sessions after a server reboot,
or after purging inactive sessions, or after reusing a slot in the
sessions table if the client closes the session cleanly;

The session table itself can be either bound in size, or grow by reallocation
in case it overflows, or be the spine of a hash table, using the the si_crtime
as a uniquifier.  Again, the spine can be reallocated in case the buckets fill up.

Benny

Iyer, Rahul wrote:
> Hi Andy,
> The exchange_id patches look ok. As for the slot table patches, I had a
> couple of comments:
> 
> How fast is crc32c? Since it's a crypto digest/CRC calculator (I don't
> know what it is), is it slow? We don't wasn't this being a bottleneck.
> We need a reasonable hash with a decent spread, not necessarily a secure
> one. 
> 
> Also, I'd suggest making the has table size prime... It helps the spread
> with the modulo.
> 
> In patch 0007 of the slot table, in nfsd4_sequence, the KERN_EMERG could
> be KERN_ERROR or KERN_NOTICE (I know I'm responsible for the EMERG ;) )
> 
> Regards
> Rahul
> 
> 
>> -----Original Message-----
>> From: William A. (Andy) Adamson [mailto:andros at citi.umich.edu] 
>> Sent: Tuesday, April 03, 2007 6:43 AM
>> To: pnfs at linux-nfs.org
>> Subject: [pnfs] Server sessions slot table patches
>>
>> hi
>>
>> here are 9 patches that implement the server slot table 
>> management. there is not DRC yet, but this code has been 
>> developed with the DRC in mind. This code almost passes the 
>> connectathon tests on the 4.1-sessions branch with the client 
>> patches i just sent out. 
>>
>> it fails the general connectathon tests with an 
>> NFS4ERR_SEQ_MISORDERED. i note that the client mostly uses 
>> slot 0, and occasionally uses slot 1. the slot 1 sequence is 
>> out of order - i don't know if it is the client or server. 
>>
>> please review the patches...
>>
>> thanks
>>
>> -->Andy
>>
>>
> _______________________________________________
> pNFS mailing list
> pNFS at linux-nfs.org
> http://linux-nfs.org/cgi-bin/mailman/listinfo/pnfs



More information about the pNFS mailing list