Use a shared memory between user space and kernel space.<div>The same physical memory can be translated as user-space virtual address as well as kernel space.</div><div>See more about mmap, io_remap_pfn_range etc. and you will get an idea.</div>
<div><br></div><div>The main advantage with this u can avoid copying data between two spaces but disadvantage associated is u need to request a fixed memory chunk from kernel for this purpose.</div><div> <br><br><div class="gmail_quote">
On Tue, Jul 12, 2011 at 10:09 AM, Amit Nagal <span dir="ltr"><<a href="mailto:helloin.amit@gmail.com">helloin.amit@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi ,<br>
<br>
Normally we use copy_to_user / copy_from_user api's to transfer data<br>
to/from user space from/to kernel space .<br>
Can i be suggested with any other data transfer mechanism b/w kernel<br>
- user space for a char device ,<br>
which are much faster than copy_xxx ?<br>
Regards<br>
Amit Nagal<br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</blockquote></div><br></div>