Is there any way for ioctl() in linux to specify submission queue ID for a nvme IO request

戏子无情 提交于 2020-01-03 05:07:46

问题


I am working on a testing tool for nvme-cli(written in c and can run on linux).

For SSD validation purpose, we are actually looking for sending I/O commands to a particular Submission queue(IO Queue pair). We needed this because we wanted threading, but for threading to happen we need to send I/O requests to different queues else the I/O requests would be processed serially.

So is there any way in ioctl() where we can specify the Submission queue IDs?

Here is how a nvme IO is requested with ioctl()

 ioctl(fd, NVME_IOCTL_SUBMIT_IO, &io);

This invokes nvme_ioctl() in the driver here!

nvme_ioctl() intern invokes the nvme_submit_io() Function here!

nvme_submit_io() has the a parameter struct nvme_ns *ns where the structure has a field name queueview here!

I wanted to know if we can invoke ioctl() with a additional new parameter queue_id which is to be assigned to queue field of struct nvme_ns *ns in the nvme_submit_io() function.

Can I know if we can do like this?

If yes, please give me some brief steps. If NO, please suggest me any possible solution.

Since i am new to nvme or ioctl, please correct me if i am wrong.

来源:https://stackoverflow.com/questions/47918060/is-there-any-way-for-ioctl-in-linux-to-specify-submission-queue-id-for-a-nvme

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!