lkml.org 
[lkml]   [2005]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: How to get the physical page addresses from a kernel virtual address for DMA SG List?
From
Date
On Thu, 2005-08-04 at 15:39 +0200, Clemens Koller wrote:
> Hello, Dick!
>
> Thanks for your help so far!
>
> linux-os (Dick Johnson) wrote:
> >
> > You are trying to do it backwards. You need to have your driver
> > use get_dma_pages() to acquire pages suitable for DMA. Your
> > driver then impliments mmap().
>
> Okay, I have seen that, too. I've seen that some drivers do it the other
> way around as I do, but I still try to follow my idea that the
> application allocs the memory and the dma / the driver fills it up.
> Or are there fundamental problems I get with my approach which I haven't seen yet?

there are some very funamental problems with that;
say the user allocation is only half the page, and he uses the other
half of the page for something else.
during the DMA some other thread calls fork().

Now the stuff under DMA can't COW of course, so only one half gets it.
But.. what to do with the second half of the page?

this is just one of the many fine fundamental issues you'll face ;)


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-04 16:29    [W:0.382 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site