我尝试使用struct bio的 – > bi_next字段来链接我编写的多个struct bios,从而创建struct bios的链接列表.当我打电话submit_bio()提交生物块设备层的I / O,this BUG_ON()被触发,因为代码期望生物> bi_next变为NulL.
有没有办法将几个struct bios链接到单个struct请求,然后再将它发送到较低层进行维护?
解决方法 我不确定如何将多个struct bio串在一起,但是你可能想看一下 libsas中的“任务收集器”实现和 aic94xx驱动程序的替代方法.文档不多,但libsas documentation将其描述为Some harDWare (e.g. aic94xx) has the capability to DMA more
than one task at a time (interrupt) from host memory. Task
Collector Mode is an optional feature for HAs which support
this in their harDWare. (Again,it is completely optional
even if your harDWare supports it.)In Task Collector Mode,the SAS Layer would do natural
coalescing of tasks and at the appropriate moment it would
call your driver to DMA more than one task in a single HA
interrupt. DMBS may want to use this by insmod/modprobe
setting the lldd_max_execute_num to something greater than 1.
实际上,这使得阻止层(a.k.a.BIO)保持不变,但是多个请求在驱动程序层累积并一起提交.
总结以上是内存溢出为你收集整理的linux – 如何将多个struct BIO组合成单个struct请求?全部内容,希望文章能够帮你解决linux – 如何将多个struct BIO组合成单个struct请求?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)