From owner-freebsd-net@FreeBSD.ORG Sun Feb 18 15:54:52 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 83F7816A400 for ; Sun, 18 Feb 2007 15:54:52 +0000 (UTC) (envelope-from doginou@dong.ci0.org) Received: from dong.ci0.org (cognet.ci0.org [80.65.224.102]) by mx1.freebsd.org (Postfix) with ESMTP id C233B13C471 for ; Sun, 18 Feb 2007 15:54:51 +0000 (UTC) (envelope-from doginou@dong.ci0.org) Received: from dong.ci0.org (localhost.ci0.org [127.0.0.1]) by dong.ci0.org (8.13.7/8.13.4) with ESMTP id l1IGDXQG043612; Sun, 18 Feb 2007 17:13:33 +0100 (CET) (envelope-from doginou@dong.ci0.org) Received: (from doginou@localhost) by dong.ci0.org (8.13.8/8.13.8/Submit) id l1IGDWDR043611; Sun, 18 Feb 2007 17:13:32 +0100 (CET) (envelope-from doginou) Date: Sun, 18 Feb 2007 17:13:32 +0100 From: Olivier Houchard To: Max Laier Message-ID: <20070218161332.GA42920@ci0.org> References: <200702161738.35142.max@love2party.net> <20070216085132.A7944@xorpc.icir.org> <200702181620.26610.max@love2party.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200702181620.26610.max@love2party.net> User-Agent: Mutt/1.4.1i Cc: Jeremie Le Hen , Luigi Rizzo , "V.Chukharev" , freebsd-net@freebsd.org Subject: Re: iwi leaks memory? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Feb 2007 15:54:52 -0000 On Sun, Feb 18, 2007 at 04:20:18PM +0100, Max Laier wrote: > On Friday 16 February 2007 17:51, Luigi Rizzo wrote: > > On Fri, Feb 16, 2007 at 05:38:28PM +0100, Max Laier wrote: > > ... > > > > > I'm under the impression that this is more a problem of increasing > > > fragmentation until we can't get a big enough unfragmented chunk. I > > > don't have any proof of this assumption yet. > > > > makes sense. > > As a matter of fact i wonder whether it wouldn't be smarter > > to allocate the dma-ble memory on the first request and > > keep it around until the driver is unloaded. > > > > If i read the code in iwi_load_firmware() correctly, > > the contiguous chunks cannot be longer than 8191 bytes, > > so a single contiguous buffer is not mandatory. > > I just don't know if we can write the firmware to the adapter > > with multiple operations (lists of command blocks) or > > it needs to be just a single list ? > > The linux driver uses one continuous buffer as well. I tried to hand in > separate buffers, but it failed to initialize the firmware. Attached is > a diff (for HEAD and RELENG_6) to allocate the DMA buffer once and keep > it around. As I said earlier: As long as the firmware is as (un)stable > as it is now, this might be the only sensible way. All in all it's not > that bad, as we "only" throw away 212966 bytes. > > Could you please confirm that this works for you? > Should do, that's what my patch did too :-) Mine tried to re-allocate memory only if the new firmware size was > the old one, not sure it's useful. Olivier