有什么方法可以查看内核空间中通过直接I/O(O_Direct)读取的读取数据?

发布于 2025-01-29 11:24:39 字数 431 浏览 3 评论 0原文

我正在使用NVME SSD和NVME驱动程序。我的应用程序通过直接I/O读取(O_Direct)从设备读取数据。

我想检查(通过printk或其他内容)在NVME驱动程序代码中读取数据(例如,nvme_hadle_cqe。这是处理IRQ的函数)。 是否有任何方法可以在不在用户空间中的内核空间中读取的数据?

尽管我使用了直接I/O,但我认为NVME_HANDLE_CQE nvme_handle_cqe whens i/o中断i/o中断磁盘I/O完成后将被调用。
我了解到,当我使用直接IO时,读取数据将直接从磁盘上复制到用户提供的缓冲区。 但是,如果是这样,谁将读取数据复制到磁盘中用户提供的缓冲区?此过程是由硬件完成的吗?不是内核?如果是这样,我是否可以在内核空间中访问此数据?

I am using NVMe SSD and NVMe driver. My application read data from device by Direct I/O read(O_DIRECT).

I want to check (via printk or something) read data in the NVMe driver code (e.g., nvme_hadle_cqe. this is function which handle irq). Is there any way to check data which is read by Direct I/O in the kernel space not in the user space?

Though I am using Direct I/O, I thought nvme_handle_cqe which handle I/O interrupt will be called when Disk I/O is finished.
I learned that Read data is directly copied from Disk to user-supplied buffer when I used Direct IO. But if so, who copy the read data to user-supplied buffer from DISK? Does this process is done by hardware? not by kernel? If so, do I not have access to this data in kernel space?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文