[linux-cifs-client] Re: Some questions on CIFS

Steven French sfrench at us.ibm.com
Mon Sep 12 15:43:27 GMT 2005










>
> In 2.6.x kernel read andx request size is 64K. But my 2.4.18 linux is
only 4K.
>
> Do you know how to increase read request size 4K to 64(or 16K)?
>
The 2.4 kernel did not export an operation for multipage read operations
(readpages) in the vfs memory management interfaces, so reads are one page
at a time unless the filesystem coalesces reads in a distinct thread.    In
2.6 kernel a filesystem, like cifs, which exports cifs_readpages, will
typically get requests for megabytes of data to read (readahead) at one
time so cifs will map these to 16K (the negotiated buffer size, although it
could go larger with an experimental option which is disabled by default).
In the 2.6 cifs code is also the option to mount "forcedirectio" which
bypasses the page cache so can read larger (or smaller) than 4k (depending
on what the application requests).

To change the 2.4 code to handle forcedirectio would be an option by
backporting a more recent version of the 2.6 cifs code (and would not be
too hard) or alternatively code could be written to coalesce reads and
writes in an async dispatch thread.  I think just changing cifs_readpage to
be async (and allowing many more 4K reads to be on the wire at once) would
get most of the benefit and double or triple the single large file copy
performance over Gigabit ethernet, but it is a little tricky to do right
and I have been hoping that James Roper or one of the other guys who looked
at a similar approach would try again, since I am still buried in some
backlevel (windows 9x, windows me) compat issues and Shaggy is looking at
improving writepages.



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