From owner-freebsd-current@FreeBSD.ORG Sun Jan 9 05:25:22 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EDFCE16A4D3 for ; Sun, 9 Jan 2005 05:25:22 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id A153E43D2F for ; Sun, 9 Jan 2005 05:25:21 +0000 (GMT) (envelope-from scottl@freebsd.org) Received: from [192.168.254.12] (g4.samsco.home [192.168.254.12]) (authenticated bits=0) by pooker.samsco.org (8.12.11/8.12.10) with ESMTP id j095SMaB033730; Sat, 8 Jan 2005 22:28:22 -0700 (MST) (envelope-from scottl@freebsd.org) Message-ID: <41E0C02F.60100@freebsd.org> Date: Sat, 08 Jan 2005 22:25:03 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040514 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Peter Jeremy References: <20050109011132.GJ39552@cirb503493.alcatel.com.au> In-Reply-To: <20050109011132.GJ39552@cirb503493.alcatel.com.au> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=0.0 required=3.8 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on pooker.samsco.org cc: freebsd-current@freebsd.org Subject: Re: bus_dmamem_alloc() can't handle large NOWAIT requests X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Sun, 09 Jan 2005 05:25:23 -0000 Peter Jeremy wrote: > I've just been tracking down a panic in 4.x and found that the problem > is still present in 6.x. > > According to bus_dma(9), bus_dmamem_alloc() can be invoked with a > flag BUS_DMA_NOWAIT to indicate that sleep()ing is not allowed. > > At least on the i386, if the requested size exceeds 1 page (or some > other cases), the requested memory will be allocated via contigmalloc(). > > bus_dmamem_alloc() maps BUS_DMA_NOWAIT to M_NOWAIT but contigmalloc() > does not support M_NOWAIT and will tsleep() under some conditions. > > Unfortunately, I don't know enough about the VM code to be able to > suggest a fix. > Will contigmalloc() actually sleep? If so, then this is something that needs to be addressed in contigmalloc. Scott