Re: sendmsg blocking with sendtimeout vs. non-blocking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 23 Oct 2008 21:30:32 -0400
Jim Rees <rees@xxxxxxxxx> wrote:

> Steve French wrote:
> 
>   If that is the case (ie that cifs and nfs never need to set these over
>   tcp - I am still having trouble reconciling that with the NFS guys'
>   comments that they must set rcvbuf (and Jim's comment below)
> 
> If you have an application that wants to read a big chunk of data from a
> socket, and won't remove any of that data from the socket until the entire
> chunk has arrived, then the application must set the receive socket buffer
> size big enough to hold the entire chunk.  Otherwise the application will
> stall.
> 
> As far as I can tell, the corresponding situation does not hold for send
> buffers, because the tcp layer will grow the send buffer to be big enough to
> hold whatever the application wants to send.  But I don't know if that's
> always true, or if there is some limit, so to be safe our NFS patch
> continues to set both the receive and send buffer sizes.

Right, that's not actually the case for CIFS, so I don't think we need
to have CIFS tune the receive buffer. cifs_demultiplex_thread just
slurps data off of the socket as it comes without concern about whether
we have a whole request or not. We may end up having to call
kernel_recvmsg a few extra times, but I don't think we need to worry
about it getting stuck.

-- 
Jeff Layton <jlayton@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux