Re: sendfile(2) SF_NOPUSH flag proposal
From: Igor Sysoev (is_at_rambler-co.ru)
Date: 05/29/03
- Previous message: Igor Sysoev: "Re: sendfile(2) SF_NOPUSH flag proposal"
- In reply to: Terry Lambert: "Re: sendfile(2) SF_NOPUSH flag proposal"
- Next in thread: Terry Lambert: "Re: sendfile(2) SF_NOPUSH flag proposal"
- Reply: Terry Lambert: "Re: sendfile(2) SF_NOPUSH flag proposal"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 29 May 2003 09:22:54 +0400 (MSD) To: Terry Lambert <tlambert2@mindspring.com>
On Wed, 28 May 2003, Terry Lambert wrote:
> Bill Fenner wrote:
> > Why not set PRUS_MORETOCOME on all but the final pru_send() call?
>
> If the file is larger than `sysctl net.inet.tcp.sendspace`, then
> this code in do_sendfile():
>
> if (sbspace(&so->so_snd) < so->so_snd.sb_lowat) {
> if (so->so_state & SS_NBIO) {
> m_freem(m);
> sbunlock(&so->so_snd);
> splx(s);
> error = EAGAIN;
> goto done;
> }
> error = sbwait(&so->so_snd);
>
> will result in you sleeping with PRUS_MORETOCOME set, but with
> no more being sent because the send buffer doesn't get emptied,
> as it's waiting for more data to send.
But as I understand PRUS_MORETOCOME is not set if socket is non-blocking.
Igor Sysoev
http://sysoev.ru/en/
_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
- Previous message: Igor Sysoev: "Re: sendfile(2) SF_NOPUSH flag proposal"
- In reply to: Terry Lambert: "Re: sendfile(2) SF_NOPUSH flag proposal"
- Next in thread: Terry Lambert: "Re: sendfile(2) SF_NOPUSH flag proposal"
- Reply: Terry Lambert: "Re: sendfile(2) SF_NOPUSH flag proposal"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|