Date: Sat, 08 Jan 2005 22:25:03 -0700 From: Scott Long <scottl@freebsd.org> To: Peter Jeremy <PeterJeremy@optushome.com.au> Cc: freebsd-current@freebsd.org Subject: Re: bus_dmamem_alloc() can't handle large NOWAIT requests Message-ID: <41E0C02F.60100@freebsd.org> In-Reply-To: <20050109011132.GJ39552@cirb503493.alcatel.com.au> References: <20050109011132.GJ39552@cirb503493.alcatel.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41E0C02F.60100>