From owner-freebsd-current@FreeBSD.ORG Thu Sep 21 17:08:10 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C27A16A415; Thu, 21 Sep 2006 17:08:10 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id A570D43D45; Thu, 21 Sep 2006 17:08:04 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 71C7446CB0; Thu, 21 Sep 2006 13:08:03 -0400 (EDT) Date: Thu, 21 Sep 2006 18:08:03 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Peter Jeremy In-Reply-To: <20060921075903.GD960@turion.vk2pj.dyndns.org> Message-ID: <20060921180711.W56349@fledge.watson.org> References: <4511B9B1.2000903@freebsd.org> <20060921075903.GD960@turion.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-net@freebsd.org, freebsd-current@freebsd.org, Andre Oppermann Subject: Re: Much improved sendfile(2) kernel implementation X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2006 17:08:10 -0000 On Thu, 21 Sep 2006, Peter Jeremy wrote: > On Wed, 2006-Sep-20 23:59:13 +0200, Andre Oppermann wrote: >> I have rewritten kern_sendfile() to work in two loops, the inner which >> turns as many pages into mbufs as it can up to the free send socket buffer >> space. > > The 64K blocks sounds good but how does this interact with TCP slow start? > Is there the possibility that a couple (for some reasonably large value of > 'couple') of TCP connections slowly accepting a file could eat all the mbuf > space? In principle, existing socket buffer resource limits are the way to prevent this from happening -- sendfile() should continue to obey them as before, we are just better able to use the available buffer space if it exists. Robert N M Watson Computer Laboratory University of Cambridge