lkml.org 
[lkml]   [2013]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sendfile and EAGAIN
Ulrich Drepper <drepper@gmail.com> wrote:
> On Mon, Feb 25, 2013 at 2:22 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> > I don't understand the issue.
> >
> > sendfile() returns -EAGAIN only if no bytes were copied to the socket.
>
> There is something wrong/unexpected/...
>
> I have a program which can use either sendfile or send. When using
> sendfile to transmit a large block (I've seen it with 900k) the
> sendfile call does not transmit everything. There receiver gets only
> about 600k. This is the situation when I think I've seen EAGAIN
> errors from sendmail but I cannot just now reproduce it. This is with
> sockets of AF_UNIX type.

If you manage to reproduce it, can you pass an offset to sendfile() and
see if the offset changed when you get EAGAIN?

Also, which kernel version are you using? Perhaps it's triggered
by memory pressure.


\
 
 \ /
  Last update: 2013-03-04 12:21    [W:0.089 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site