Re: 2.6.1 sendfile regression

From: Lennert Buytenhek
Date: Mon Jan 12 2004 - 06:33:31 EST


On Sun, Jan 11, 2004 at 06:58:55PM -0800, Linus Torvalds wrote:

> > > strace shows that the process is hanging
> > > inside sendfile64 (which should not happen since the socket is
> > > non-blocking).
> >
> > What if the data you're sending is not in the page cache?
>
> It will always block on the actual page cache, although we could try to
> change that.

My impression is that this is the reason why AIO sendfile was attempted.
Although my wild guess is that that probably would only work on raw block
devices and still not on regular filesystem files.


> However, even if it blocks, it should only block at one page
> at a time (or "incidental" blockage due to memory allocations etc).
>
> Blocking for long times implies a bug.

(Even if it only blocks a page at a time, it will happily block on the
next page and the one after that as long as there is write space in the
destination socket?)


--L
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/