[linux-cifs-client] Re: Questions about CIFS

Steven French sfrench at us.ibm.com
Fri Dec 10 19:26:42 GMT 2004


> I am reading the source code of CIFS 1.22 in Linux
> Kernel 2.6.8. I think the comments are not enough and
> I am puzzled about some details. Whether the
> CIFSSMBRead() is for blocking IO or non-blocking IO? 
> I think it should be non-blocking since sometimes 
> the page cache needs readahead. But I don't know 
> how to implement it

The only async operation is FindNotify (CIFSSMBNotify) which is not 
implemented in the source you have
(you need to get more current cifs vfs source from bitkeeper 
bk://cifs.bkbits.net/linux-2.5cifs or
the slightly older version in Samba svn in the linux-cifs-client project.

Readahead with cifs does work of course, but it uses the default page 
cache mechanism and synchronously
reads 4 pages at a time from the server (usually).  JazzyJames's patch 
(posted to linux-cifs-client
mailing list IIRC) could improve things by adding async cifs_readpages 
support.  As important as
async support is - it would be just as important to finish support for 
very large reads 
(larger than 16K) perhaps as big as 127K would be optimal for readpages. 

Using readsize of 16K (as opposed to smbfs's 4K) almost tripled 
performance.  Increasing to 63K
(simulated by using forcedirectio cifs mount option which was added last 
week) 
almost tripled large file read perf again (almost 9 times better than 4K 
reads - when using
fast network such as loopback interface or GigE).   Async dispatch of up 
to maxmux (50) simultaneous
read requests could also help but has to be done carefully to avoid races 
in command completion.
The main code hits to make this enhancement would be to cifs_readpages, 
CIFSSMBRead, and SendReceive routines.
Would be very exciting if this were done since it is likely CIFS could 
match or beat NFS in a few cases perhaps
even without enhancing the server.


Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench at-sign us dot ibm dot com
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the linux-cifs-client mailing list