From owner-freebsd-arch@FreeBSD.ORG Thu May 29 10:33:06 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 5A7AC37B401 for ; Thu, 29 May 2003 10:33:06 -0700 (PDT) Received: from park.rambler.ru (park.rambler.ru [81.19.64.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id D308143F85 for ; Thu, 29 May 2003 10:33:04 -0700 (PDT) (envelope-from is@rambler-co.ru) Received: from is.park.rambler.ru (is.park.rambler.ru [81.19.64.102]) by park.rambler.ru (8.12.6/8.12.6) with ESMTP id h4THX3mF075818; Thu, 29 May 2003 21:33:03 +0400 (MSD) Date: Thu, 29 May 2003 21:33:03 +0400 (MSD) From: Igor Sysoev X-Sender: is@is To: Terry Lambert In-Reply-To: <3ED6291B.36F382F@mindspring.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 17:33:06 -0000 On Thu, 29 May 2003, Terry Lambert wrote: > Igor Sysoev wrote: > > On Wed, 28 May 2003, Terry Lambert wrote: > > > 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`. > > > > Why ? We can reset TF_MORETOCOME if the sending is completed. > > It's called a "deadly embrace" deadlock. Look it up. I misread you. I thought that sbwait() set PRUS_MORETOCOME itself. Nevertheless there would not be a deadlock because tcp_output() tests TF_MORETOCOME and TF_NOPSUH only the data is less than MSS. Otherwise tcp_output() can send it. Igor Sysoev http://sysoev.ru/en/