[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <48ADD092.7080203@redhat.com>
Date: Thu, 21 Aug 2008 16:31:14 -0400
From: Chris Snook <csnook@...hat.com>
To: Hua Zhong <hzhong@...il.com>
CC: netdev@...r.kernel.org
Subject: Re: tcp write returns 0?
Hua Zhong wrote:
> Under what condition would tcp write return 0?
>
> Especially since a previous poll() indicates the socket is writable. Could
> this only happen for socket in NONBLOCK mode?
The socket could become unwritable for various reasons between poll()
returning and the send() call. This shouldn't happen very often, but if
the system is under memory pressure and needs to page in data between
those two calls, that race window can get rather large. You might want
to increase your TCP buffer sizes, either per-socket with setsockopt, or
system-wide with sysctl.
-- Chris
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists