Re: [PATCH 10 of 20] ipath - support for userspace apps using coredriver
From: Bryan O'Sullivan
Date: Thu Mar 16 2006 - 11:50:10 EST
On Wed, 2006-03-15 at 21:38 -0800, Andrew Morton wrote:
> You need to decide who "owns" these pages. Once that's decided, it tells
> you who should release them.
OK, I've made some interesting progress here.
The driver is now doing all of its allocations of DMAable memory using
dma_alloc_coherent. We do a get_page right after the allocation in
every case, and a put_page right before the free. In the cases where
I'm allocating memory that I know or think might be greater than a page
in size, I'm using __GFP_COMP.
The nopage handler always does a get_page.
We now have a rational-looking set of VM_* flags, instead of a random
heap of whatever seemed to work. And we're not touching PG_reserved.
And now everything works. I have yet to examine /proc/meminfo in
microscopic detail after 100,000 runs to be sure we don't have a leak of
some kind, but I no longer get oopses or crashes after 20 repeated runs,
where before I didn't survive even one.
Whew! What a relief.
Hugh, Andrew, Linus and Roland: thanks very much. This has been a
tremendous help.
<b
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/