From owner-freebsd-arch@FreeBSD.ORG Wed May 28 22:57:38 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3F61737B401 for ; Wed, 28 May 2003 22:57:38 -0700 (PDT) Received: from stork.mail.pas.earthlink.net (stork.mail.pas.earthlink.net [207.217.120.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id C04CB43F85 for ; Wed, 28 May 2003 22:57:37 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-38lc0vo.dialup.mindspring.com ([209.86.3.248] helo=mindspring.com) by stork.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19LGPv-0007kO-00; Wed, 28 May 2003 22:57:35 -0700 Message-ID: <3ED5A105.26F528A6@mindspring.com> Date: Wed, 28 May 2003 22:56:21 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Igor Sysoev References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4f159af4a743a800703a6f20e5737617093caf27dac41a8fd350badd9bab72f9c350badd9bab72f9c cc: arch@freebsd.org Subject: Re: sendfile(2) SF_NOPUSH flag proposal X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 May 2003 05:57:38 -0000 Igor Sysoev wrote: > > 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. Then the bug is still not fixed by setting it, since your total send size might be less than `sysctl net.inet.tcp.sendspace`. You guys should really just have a buffer finalize function that gets called on block/return cases, and impute the flags you need on the socket while it's being used for sendfile. -- Terry