scatter/gather list代码分析和理解

相关的理论和背景

scatter/gather方式是与block dma方式相对应的一种dma方式。
在dma传输数据的过程中,要求源物理地址和目标物理地址必须是连续的。但在有的计算机体系中,如IA,连续的存储器地址在物理上不一定是连续的,则dma传输要分成多次完成。
如果传输完一块物理连续的数据后发起一次中断,同时主机进行下一块物理连续的传输,则这种方式即为block dma方式。
scatter/gather方式则不同,它是用一个链表描述物理不连续的存储器,然后把链表首地址告诉dma master。
dma master传输完一块物理连续的数据后,就不用再发中断了,而是根据链表传输下一块物理连续的数据,最后发起一次中断。 很显然scatter/gather方式比block dma方式效率高。

Linux Kernel代码分析

TODO

参考

https://blog.csdn.net/shenjin_s/article/details/80855762
https://blog.csdn.net/scarecrow_byr/article/details/79676482
http://www.wowotech.net/memory_management/scatterlist.html (重点参考)
https://blog.csdn.net/weixin_36145588/article/details/72900367
https://blog.csdn.net/zhanghaiyang9999/article/details/81586385 (关于BIO结构分析)
https://blog.csdn.net/ZHONGkunjia/article/details/79596503 (块设备剖析之BIO)
https://www.cnblogs.com/luxiaodai/p/9266317.html (bio,request,sg list图示)
https://www.cnblogs.com/muahao/p/9236112.html (bio,request以及block层的基础知识)
http://sundayhut.is-programmer.com/posts/62921.html (bio,request,request_queue的学习)
https://blog.csdn.net/flyingcloud_2008/article/details/5818995 (request_queue, request, bio 关系一句话描述)
https://blog.csdn.net/jasonLee_lijiaqi/article/details/82850689 (bio,request,request_queue的关系)
https://blog.csdn.net/weixin_36145588/article/details/72935032 (bio与request(io合并与request))
https://www.lenzhao.com/topic/5a2f3ecd2e95f0fd0a9818ac

原文地址:https://www.cnblogs.com/powerrailgun/p/13202938.html