From owner-freebsd-arch@FreeBSD.ORG Wed May 28 11:21: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 C176B37B401 for ; Wed, 28 May 2003 11:21:06 -0700 (PDT) Received: from park.rambler.ru (park.rambler.ru [81.19.64.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3134443FA3 for ; Wed, 28 May 2003 11:21:03 -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 h4SIL0mF049551; Wed, 28 May 2003 22:21:00 +0400 (MSD) Date: Wed, 28 May 2003 22:21:00 +0400 (MSD) From: Igor Sysoev X-Sender: is@is To: Terry Lambert In-Reply-To: <3ED4DFF2.51E40894@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: Wed, 28 May 2003 18:21:07 -0000 On Wed, 28 May 2003, Terry Lambert wrote: > Igor Sysoev wrote: > > On Wed, 28 May 2003, Terry Lambert wrote: > > > Why are you so dead-set on adding crufty flags, when three > > > people who have been in that code before (I back-ported the > > > external mbuf code and sendfile to FreeBSD 4.2 and 4.3 at > > > one point; Matt has lived in that code; Peter had his nose > > > in for quite a while; etc.) say that it's broken, and the > > > correct thing to do is to fix it, not add a bunch of kludge > > > code to work around the bugs that shouldn't be there in the > > > first place? > > > > Well, how do your code handle the partially filled file packets ? > > Here we get to the nub of things, then. You are being > obstinate not because you really want the flags, but > because you want someone else to do the actual work of > fixing sendfile for you. No, I do want these flags because they resolve the problem of partially filled packets. I believe that this problem can be solved without a fixing the sendfile() implementation. The real argument was Peter Jeremy's one that overhead of flags vs. overhead of setsockopt() is negligible after all. The portability argument is bogus because sendfile() portability is nonsense. The drawback that really annoyed me is that sendfile() blocks on a reading from a disk while a sending to non-blocking socket. Although I see three workarounds it's much better to fix this inside sendfile(). > There's probably no reason to continue this conversation, > unless you are going to insist on it. Five people have > told you the correct approach is to fix sendfile(2), and > you have ignored all of us. Three people, not all the same > people as before, have told you that if you could measure a > statistically significant performance improvement from your > proposed changes, we wouldn't object to your code going in, > even though it breaks source compatability further. Five people ? I probably missed something - there were only four people except me that discussed this subject. > Other than writing the correct code for you, there's little > else we can do, and I, at least, have other code I need to > write, to solve my own problems. Well, Terry, write your code and I will write my own. Igor Sysoev http://sysoev.ru/en/