From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 2 09:38:08 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5B87E16A412 for ; Sun, 2 Jul 2006 09:38:08 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe04.swip.net [212.247.154.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4E6D43D45 for ; Sun, 2 Jul 2006 09:38:07 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: gvlK0tOCzrqh9CPROFOFPw== X-Cloudmark-Score: 0.000000 [] Received: from mp-216-91-105.daxnet.no ([193.216.91.105] verified) by mailfe04.swip.net (CommuniGate Pro SMTP 5.0.8) with ESMTP id 224810400; Sun, 02 Jul 2006 11:38:04 +0200 From: Hans Petter Selasky To: David Malone Date: Sun, 2 Jul 2006 11:38:10 +0200 User-Agent: KMail/1.7 References: <200605271102.19799.hselasky@c2i.net> <200607011044.54872.hselasky@c2i.net> <20060701194435.GA30115@walton.maths.tcd.ie> In-Reply-To: <20060701194435.GA30115@walton.maths.tcd.ie> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607021138.11945.hselasky@c2i.net> Cc: freebsd-hackers@freebsd.org Subject: Re: contiguous memory allocation problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jul 2006 09:38:08 -0000 On Saturday 01 July 2006 21:44, David Malone wrote: > On Sat, Jul 01, 2006 at 10:44:54AM +0200, Hans Petter Selasky wrote: > > > The latest concensus seems to be that the USB system should make use of > > > the scatter-gather facilities in the hardware to avoid the need to > > > allocate large contiguous memory chunks. iedowse@ had mostly finished > > > implementing this in mid May. > > > > Yes, but scatter and gather will add extra complexity to the driver, and > > maybe an extra memory copy in most cases. The idea is to allocate less > > than or equal to a page of memory, and then avoid the problem? > > I believe the USB drivers in -current grew scatter/gather support > about a month ago. See the commit message below. Is this likely to > help? I see. But there is one problem, that has been overlooked, and that is High speed isochronous transfers, which are not supported by the existing USB system. I don't think that the EHCI specification was designed for scatter and gather, when you consider this: 8 transfers of 0xC00 bytes has to fit on 7 pages. If this is going to work, and I am right, one page has to contain two transfers. (see page 43 of ehci-r10.pdf) Currently the PAGE_SIZE is 0x1000, right? As you can see "(0xC00 * 2) > 0x1000". So is it possible to change the PAGE_SIZE ? --HPS