Date: Fri, 15 Nov 2002 08:48:13 -0800 From: Chuck Tuffli <chuck_tuffli@agilent.com> To: mark tinguely <tinguely@web.cs.ndsu.nodak.edu> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: bus_dmamem_alloc failing Message-ID: <20021115164813.GB19814@cre85086tuf.rose.agilent.com> In-Reply-To: <200211151636.gAFGaIP16259@web.cs.ndsu.nodak.edu> References: <20021115141048.GA367@thegrail.rose.agilent.com> <200211151636.gAFGaIP16259@web.cs.ndsu.nodak.edu>
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. > > You may need to rethink your allocation strategy, such as > hold some memory allocations static between unloads and loads > if your device can take non-physical contiguous memory chunks, > use another allocation technique > or other imaginative tricks. For the final driver, this shouldn't be a big deal. But during my current development while I'm loading/unloading the driver repeatedly, it's a minor pain. Mostly I wanted to see if I was using the bus_*() incorrectly. When the driver frees the memory with bus_dmamem_free(), can other drivers or the kernel not use this memory? -- Chuck Tuffli <chuck_tuffli AT NO_SPAM agilent DOT com> Agilent Technologies, Storage and Networking 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?20021115164813.GB19814>