开发者

Large Data Flow between User and Kernel

What is the best way(performance) to have a bi-directional data flow between user-level and kernel-level ?

I understand that you can open a NETLINK socket and transfer the data through there. But, we have to adopt some other user-kernel interaction(system calls, ioctl) for sending control information across. Is this th开发者_运维问答e most efficient way to transfer large amount of data across user-kernel boundary ?


Passing large buffers of data into the kernel driver/thread/whatever is no problem - the kernel has the privilege to read it, no problem. For returning stuff, the ususal way is to provide the kernel thingy with a sufficiently large user-space buffer, or buffer pool, for it to return data in. That's how its done for the usual stuff - file/network read/write, for example.

What is the problem, more exactly - do you need to transfer the data to/from kernel level on a different machine?

Rgds, Martin

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜