From owner-freebsd-current@FreeBSD.ORG Thu Jun 25 18:30:37 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2599C106566C for ; Thu, 25 Jun 2009 18:30:37 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id D07748FC14 for ; Thu, 25 Jun 2009 18:30:36 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.local (pooker.samsco.org [168.103.85.57]) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id n5PIUUP5012592; Thu, 25 Jun 2009 12:30:33 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <4A43C243.9000001@samsco.org> Date: Thu, 25 Jun 2009 12:30:27 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: =?ISO-8859-2?Q?Piotr_Zi=EAcik?= References: <200906251329.35200.kosmo@semihalf.com> In-Reply-To: <200906251329.35200.kosmo@semihalf.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-current@freebsd.org Subject: Re: [PATCH RFC]: Bus_dma eats all available memory 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, 25 Jun 2009 18:30:37 -0000 Piotr Ziêcik wrote: > Hi > > While working on new driver for FreeBSD I have found a problem in bus_dma > subsystem. Every time when bus_dmamap_create() is called on bus_dma tag > using bounce zone, at least 1 page in bounce zone is allocated. This causes > eating of all avaible memory by bounce zone. Problem affects i386, amd64 and > arm. The code block that you point at can only be entered if the maxpages limit has not been reached. However, the max limit is per zone, not global, and there's no easy way to make it be global. Are you creating an excessive number of tags/zones? Scott