Skip to contentSkip to conversation

Zero copy between ISR, kernel and User

DISCUSSION Wink Saville 2 participants 3 messages Sep 27, 2006 – Sep 28, 2006

lore
Share & tools
lore
#0 lore raw

Hello,

I would like to allow the transferring of data between ISR's, kernel and user code, without requiring copying. I envision allocating buffers in the kernel and then mapping them so that they appear at the same addresses to all code, and never being swapped out of memory.

Is this feasible for all supported Linux architectures and is there existing code that someone could point me towards?

Regards,

Wink Saville

#1 lore raw
Quoted 7 lines · On Tue, 26 Sep 2006 21:01:45 -0700 Wink Saville <[email protected]> wrote:

Hello,

I would like to allow the transferring of data between ISR's, kernel and user code, without requiring copying. I envision allocating buffers in the kernel and then mapping them so that they appear at the same addresses to all code, and never being swapped out of memory.

Quoted 7 lines

Is this feasible for all supported Linux architectures and is there existing code that someone could point me towards?

Regards,

Wink Saville

Your better off having application mmap a device, then transfer the data to there. Something like AF_PACKET.

Signature · 1 line
Stephen Hemminger <[email protected]>
#2 lore raw
Quoted 10 lines · Stephen Hemminger
Quoted 6 lines · On Tue, 26 Sep 2006 21:01:45 -0700 Wink Saville <[email protected]> wrote:

Hello,

I would like to allow the transferring of data between ISR's, kernel and user code, without requiring copying. I envision allocating buffers in the kernel and then mapping them so that they appear at the same addresses to all code, and never being swapped out of memory.

Is this feasible for all supported Linux architectures and is there existing code that someone could point me towards?

Quoted 10 lines
Quoted 5 lines

Regards,

Wink Saville

Your better off having application mmap a device, then transfer the data to there. Something like AF_PACKET.

Is there some reason a kernel module can't mmap first, for instance I assume display drivers might do that? One of the reasons I need it to done in the kernel first is that data could come from the device or other entities before the application is running.

But I will study AF_PACKET handling.

Thanks,

Wink