Re: Update: Debox sendfile modifications

From: John-Mark Gurney (gurney_j_at_efn.org)
Date: 11/09/03

  • Next message: TSaplin Mikhail: "config and opt_*h files, how it works?"
    Date: Sat, 8 Nov 2003 19:30:26 -0800
    To: Igor Sysoev <is@rambler-co.ru>
    
    

    Igor Sysoev wrote this message on Wed, Nov 05, 2003 at 12:31 +0300:
    > I think it can done in the following way - a socket should have flag
    > that says that sendfile() had started the reading a page.

    layer violation... how do you know that the fd is a socket?

    > select()/poll()/kevent() should check this flag before the checking
    > a socket buffer space. When the page had been read this flag is reset.

    So, what about using sendfile on a pipe? are you going to teach sendfile
    how to interact with pipe's too? What about other fd types?

    If you made this a fd transparent operation then I would agree with
    it.

    -- 
      John-Mark Gurney				Voice: +1 415 225 5579
         "All that I will do, has been done, All that I have, has not."
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
    

  • Next message: TSaplin Mikhail: "config and opt_*h files, how it works?"

    Relevant Pages

    • Re: Update: Debox sendfile modifications
      ... > that says that sendfile() had started the reading a page. ... > a socket buffer space. ... When the page had been read this flag is reset. ...
      (freebsd-hackers)
    • Re: complement to sendfile()?
      ... My program receives data from the socket and writes it to a file -- with the ... Is there anything zero-copying like sendfile() for the socket->file direction? ... This is because network buffers can be made ...
      (freebsd-net)
    • Re: sendfile(2) SF_NOPUSH flag proposal
      ... >When I turn TCP_NOPUSH on just before sendfile() then it sends the header ... The last data in the send buffer may not comprise a complete frame so ... the socket will become writable, ... As long as SO_SNDLOWAT is at least one frame smaller than SO_SNDBUF, ...
      (freebsd-arch)
    • Re: Update: Debox sendfile modifications
      ... >> The current sendfile() implementation works with sockets only. ... >> it allows to minimize a data copy in http and ftp servers. ... >> data from a socket to a file) is useless. ... To see the perfomance impact of using sendfilein http or ftp server ...
      (freebsd-hackers)
    • Re: [ANN] socket_sendfile
      ... socket = TCPSocket.open host, port ... ssize_t sendfile(int out_fd, int in_fd, off_t *offset, size_t count); ... And has this to say about non-blocking sockets: ... When using a socket marked for non-blocking I/O, sendfile() may send ...
      (comp.lang.ruby)