Date: Fri, 15 Nov 2002 11:03:44 -0600 (CST) From: mark tinguely <tinguely@web.cs.ndsu.nodak.edu> To: chuck_tuffli@agilent.com, tinguely@web.cs.ndsu.nodak.edu Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: bus_dmamem_alloc failing Message-ID: <200211151703.gAFH3ij16483@web.cs.ndsu.nodak.edu> In-Reply-To: <20021115164813.GB19814@cre85086tuf.rose.agilent.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Fri, Nov 15, 2002 at 10:36:18AM -0600, mark tinguely wrote: > > since the allocated space is larger that a physical page (65536 > 4096), > > bus_dmamem_alloc() allocates physical contiguous memory. After repeated > > allocations and frees, the physical memory pages will fragment and the > > allocation will fail. <deleted text> Chuck Tuffli asks: > When the driver frees the memory with bus_dmamem_free(), can other > drivers or the kernel not use this memory? The memory is avaliable to the kernel/drivers when bus_dmamem_free() is called. The problem for you is that someone else does allocate a page within the 16 page chunk making it unable to reallocatable by you, so the next bus_dmamem_alloc() looks for the next 16 page contiguous chunk. This continues until there is no more 16 page contiguous chunks available and the bus_dmamem_alloc() fails. FreeBSD does not have a physical memory defragmenter. --Mark Tinguely To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211151703.gAFH3ij16483>