在发送文件期间调用 csum_partial_copy_from_user() 时
这是我在谷歌上搜索的内容:
sendfile()
类似于 write()
,只是直接从描述符到套接字。这就消除了将数据从缓冲区高速缓存复制到用户空间中的缓冲区的情况。
当前的 NIC 可以进行分散-收集 I/O,即它们可以从内核缓冲区获取数据包标头,但从缓冲区高速缓存获取数据包内容(来自用户的 csum 部分副本)。
结果称为零复制 TCP,它是最终目标。
我的问题是:
csum_partial_copy_from_user()
的目的是什么以及何时调用它?我跟踪了sendfile的流程直到dev_queue_xmit()
,但是没有找到它在哪里被调用。谢谢
Here is something I googled:
sendfile()
is like write()
, only directly from descriptor to a socket. That eliminates copying the data from the buffer cache to a buffer in user space.
Current NICs can do scatter-gather I/O
, i.e. they can take the packet header from a kernel buffer, but the packet contents from the buffer cache(csum partial copy from user).
The result is called Zero Copy TCP and it is the ultimate goal.
My question is:
What is the purpose of csum_partial_copy_from_user()
and when it is called? I followed the process of sendfile until dev_queue_xmit()
, but I didn't find where it is called. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论