Re: How to get the physical page addresses from a kernel virtual address for DMA SG List?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux