From owner-freebsd-current@FreeBSD.ORG Sun Jan 9 01:11:36 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 1103C16A4CE for ; Sun, 9 Jan 2005 01:11:36 +0000 (GMT) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id 73A8543D46 for ; Sun, 9 Jan 2005 01:11:35 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229]) j091BXFp014536 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sun, 9 Jan 2005 12:11:34 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1])j091BXxP047116 for ; Sun, 9 Jan 2005 12:11:33 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost) by cirb503493.alcatel.com.au (8.12.10/8.12.9/Submit) id j091BWuG047115 for freebsd-current@freebsd.org; Sun, 9 Jan 2005 12:11:33 +1100 (EST) (envelope-from pjeremy) Date: Sun, 9 Jan 2005 12:11:32 +1100 From: Peter Jeremy To: freebsd-current@freebsd.org Message-ID: <20050109011132.GJ39552@cirb503493.alcatel.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2i Subject: 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 01:11:36 -0000 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. -- Peter Jeremy