demand driven memory allocation

From: Sanka Piyaratna
Date: Thu Jan 07 2010 - 08:10:17 EST


Hi,

I have implemented a PCIe device using an Xilinx Virtex 5 device. I have an A/D controller sampling an RF signal based on the incoming signal level. These samples are transferred to the computer via the FPGA. I have implemented scatter-gather DMA using a DMA parameter (Page address and size) FIFO where a page table can be programmed where the incoming data would go. The device supports a programmable interrupt period where, once N number of pages are filled in the PC memory, an interrupt would be triggered and the new DMA parameters could be loaded in to the free memory in the FIFO. I can allocate a large enough number of pages in the kernel for the signal to be captured. I would like to create a pointer that the user mode programs can access using the pages that has got all the received signal. I want to have the user mode application progressing this data buffer while the next set of pages from my kernel page pool is getting filled.

I am wondering if anyone could suggest me the best way to address this situation. I have implemented the mmap(). However, as I understand it, the length of the memory block need to be known to call mmap().

Thanks and regards,

Sanka Piyaratna



__________________________________________________________________________________
See what's on at the movies in your area. Find out now: http://au.movies.yahoo.com/session-times/
--
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/