LWN.net Logo

Driver porting: Zero-copy user-space access

Driver porting: Zero-copy user-space access

Posted Jul 20, 2007 12:43 UTC (Fri) by bartjes (guest, #46350)
Parent article: Driver porting: Zero-copy user-space access

As I am quite new with Linux, searching the entire morning to find a solution for getting data out of my driver to a user application as efficient as possible, I stumble accross deprecanted mechanisms, function prototypes, and sometimes even a bit of explanation.
All this looks very complex to me and I REALLY could use a basic example where a piece of shared memory is allocated, freed, passed from driver to user-spacve or vice versa, and how the driver fills information into the structure and how the user process can read this.

It's sad that while searching all morning, an example is nowhere to be found, or it's way too complicated to understand, does compile with my terminal full of errors.....

Any suggestion would be helpful, Thanks, Bart


(Log in to post comments)

Driver porting: Zero-copy user-space access

Posted Dec 18, 2008 6:37 UTC (Thu) by bmasood (guest, #55659) [Link]

Bart,

I am facing the exact problem that you mentioned: Need to get my data from device to user space as efficiently as possible. I was wondering if you did find any example?

Thanks
Bilal

Driver porting: Zero-copy user-space access

Posted Mar 13, 2009 18:26 UTC (Fri) by will (guest, #46624) [Link]

> For a good example of how to use get_user_pages() in a char driver, see the definition of sgl_map_user_pages() in drivers/scsi/st.c.

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds