httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject RE: errnos and buff.c
Date Sun, 20 Dec 1998 21:59:58 GMT


On Sat, 19 Dec 1998, RobS wrote:

> > Just how would it memcpy?  The buffer empties from the bottom, and fills
> > at the top.  We've already decided it was full.  If we've had a partial
> > write then we've got space at the bottom, not the top.
> 
> You'd have to move whats left in BUF down (unless the buffer was circular)
> and then copy from buf.  It just seems silly to force another call to
> write() to ship the last <small number> bytes in BUFF so you can copy in the
> <small number> bytes (left) in buf to a clean BUF.

It seems equally silly to move bytes around.  Remember we want to reduce
the number of times the bytes move.  On pretty much every box out there
the kernel is going to have to copy those bytes into a socket buffer
anyhow.

> I don't know how often partial writes typically occur (slow clients) for 4K.
> I just assumed that they do - its not something we have control over.

It's probably not worth thinking about until someone shows they do occur
too frequently. 

Dean


Mime
View raw message