When copying files from a mounted cifs volume to the local filesystem, cifs only makes SMB requests in 4096-byte blocks, even if the server indicates that it supports "large read andx". In fact, these flags don't seem to be checked anywhere in the cifs code so it looks as if support for this capability simply hasn't been added yet. When reading data into the page cache, it appears that cifs restricts the size of the reads to the "max buffer length" negotiated at the beginning of the session (aka 'rsize' in the code), however if the server advertizes "large read andx/large write andx" capability, then I believe the client is permitted to request up to 64k at a time. Packet traces of WinXP <-> WinXP SMB sessions reveal that these large packets are used all over the place, while WinXP <-> linux cifs client does not use them at all. Taking advantage of the "large read andx" availability is critical to LAN performance. Right now I'm only seeing about 3 MB/s transfer rate over a 1Gbps network, when I should be seeing transfer rates around 20MB/s (speed of the disk drives involved).
With the mount option "forcedirectio" current cifs under test will support more than 4K writes if the app requests up to max of buffer size 16K if server is configured as is usual (cifs can support more than 16K reads and writes only if fs/cifs/cifspdu.h MAX_CIFS_MSGSIZE is increased beyond its default of 4 pages and servers max xmit is increased in server config) The pressing need is for a cifs_writepages implementation (for multipage write). This has not been written - although multipage cifs_readpages is implemented (although not optimal - as you note 128K is preferred)
this is better now - the code handles the large read flag and can do 127K reads if the cifs buf size is increased at insmod time (modinfo cifs.ko to see the name of the parm) and if rsize on the mount line is increased and forcedirectio specified on mount as well. I agree that I eventually should be able to handle reads bigger than the negotiated buffer size even without mounting forcedirectio.