From owner-freebsd-firewire@FreeBSD.ORG Wed Dec 19 07:20:55 2007 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62EB116A419 for ; Wed, 19 Dec 2007 07:20:55 +0000 (UTC) (envelope-from freebsd@gm.nunu.org) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.180]) by mx1.freebsd.org (Postfix) with ESMTP id 0C43613C447 for ; Wed, 19 Dec 2007 07:20:54 +0000 (UTC) (envelope-from freebsd@gm.nunu.org) Received: by py-out-1112.google.com with SMTP id u77so5004938pyb.3 for ; Tue, 18 Dec 2007 23:20:54 -0800 (PST) Received: by 10.142.242.8 with SMTP id p8mr1190363wfh.142.1198048853175; Tue, 18 Dec 2007 23:20:53 -0800 (PST) Received: by 10.142.224.12 with HTTP; Tue, 18 Dec 2007 23:20:53 -0800 (PST) Message-ID: <626eb4530712182320q237c344crd309893a82fe8ef8@mail.gmail.com> Date: Wed, 19 Dec 2007 16:20:53 +0900 From: "Hidetoshi Shimokawa" Sender: freebsd@gm.nunu.org To: "Sean Bruno" In-Reply-To: <476696C4.60408@miralink.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <476610E5.2060108@miralink.com> <626eb4530712162258s4dfe1448o1102f20a623d3f95@mail.gmail.com> <476696C4.60408@miralink.com> X-Google-Sender-Auth: 9a86eb3c916cd8e6 Cc: freebsd-firewire@freebsd.org Subject: Re: sbp_targ memory leak X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Dec 2007 07:20:55 -0000 I think you are right and page table is not freed when CAM_SEND_STATUS is not set. Maybe we should always free page tables if refcont == 0 rather than free in sbp_targ_send_status(). You patch is not just adding debug printfs, right? What is the mtx locks for? On 12/18/07, Sean Bruno wrote: > Hidetoshi Shimokawa wrote: > > Thanks for the tracking of the problem. > > Could you resend the patch in unified or context diff? > > > > Thanks, > > > > On 12/17/07, Sean Bruno wrote: > > > >> In trying to understand and make sbp_targ functional, I've noted that > >> the code seems to lose track of how many page tables it allocates for > >> any give orbi. I had to add a lot of debugging code around the > >> malloc/free's to find out what was going on, and I'm not sure what the > >> code is supposed to do in this case. > >> > >> Please review the patch diff at --> http://consultcsg.com/RELENG_6.diff > >> > >> And the log at -->http://consultcsg.com/malloc_failure.txt > >> > >> > >> > Diff updated at http://consultcsg.com/RELENG_6.diff > > Sean > > > -- /\ Hidetoshi Shimokawa \/ simokawa@FreeBSD.ORG