From owner-freebsd-mips@FreeBSD.ORG Tue Sep 4 23:57:47 2012 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13C84106566C; Tue, 4 Sep 2012 23:57:47 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from duck.symmetricom.us (duck.symmetricom.us [206.168.13.214]) by mx1.freebsd.org (Postfix) with ESMTP id BC5DE8FC0A; Tue, 4 Sep 2012 23:57:46 +0000 (UTC) Received: from damnhippie.dyndns.org (daffy.symmetricom.us [206.168.13.218]) by duck.symmetricom.us (8.14.5/8.14.5) with ESMTP id q84NvjOb065536; Tue, 4 Sep 2012 17:57:45 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q84NvgSK041858; Tue, 4 Sep 2012 17:57:42 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) From: Ian Lepore To: Adrian Chadd In-Reply-To: References: <1346777897.1140.633.camel@revolution.hippie.lan> Content-Type: text/plain; charset="us-ascii" Date: Tue, 04 Sep 2012 17:57:42 -0600 Message-ID: <1346803062.59094.27.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org, freebsd-mips@freebsd.org Subject: Re: busdma buffer management enhancements - call for review and test X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2012 23:57:47 -0000 On Tue, 2012-09-04 at 15:37 -0700, Adrian Chadd wrote: > Hiya, > > This is pretty neat work. :) > > But by converting drivers to use individual uma allocations, aren't > you risking fragmenting FIFO rings and such? I'm sure there are > platforms out there whose memory controllers operate on minimum sized > bits (say, 512 byte chunks for some intel PC chipsets, if I'm not > mistaken) .. right now ath(4)'s RX descriptors are almost always kept > in order of allocation, but with your proposal it's quite possible > they'll be spread all around the the (fixed size) UMA slab. > I'm not quite sure I understand what you mean by that. Or rather, I'm not sure I understand the downside to a bunch of individual descriptors being scattered around in memory. If the hardware treats the descriptors as a linked list, it shouldn't matter where they're scattered. If it treats them as an array, then the only option is to allocate a single chunk of memory to hold the whole array, isn't it? In either case, what to do with the busdma sync ops when working with lists or arrays of descriptors that are shared between the CPU and a controller that accesses the same memory independently... well, that's something that's not directly addressed by this set of changes. If the CPU and the hardware are accessing the memory truly concurrently (such as what happens with a usb host controller), the current busdma code and documentation doesn't really address that. We need more discussion on that, but when I approached the topic in the freebsd-arch thread last week, the discussion fizzled out. We'll have to get back to it eventually. -- Ian