0

I am customizing the linux nvme driver to take QID and submit the IO command to that particular QID in the ioctl command NVME_IOCTL_SUBMIT_IO. I am using Kernel6.5(ubuntu 22).

The call is like this: nvme_ioctl -> nvme_ns_ioctl -> nvme_submit_io -> nvme_submit_user_cmd_qid(modified) -> n vme_alloc_user_request_qid(modified)

This will call req = blk_mq_alloc_request_hctx(q, (nvme_req_op(cmd) | rq_flags), (blk_flags | BLK_MQ_REQ_NOWAIT | BLK_MQ_REQ_RESERVED), qid - 1); function finally with the QID passed from user.

In the queue init, nvme_alloc_io_tag_set I have set set->reserved_tags = set->nr_hw_queues; after set->nr_hw_queues = ctrl->queue_count - 1;.

I am able to do IO with this setting, and I am seeing the same QID in the trace point also.

Is my configuration correct in setting the reserved_tags and calling blk_mq_alloc_request_hctx() function?

I am trying to do this for 2 reasons:

  1. I need to control the QID to stress (customer requirement)
  2. Improve the performance(processing more and more commands). By default per CPU, one QUE is allocated, not all the queues are used eventhough there are multiple queues. Here we can assign different commands to different queues by qid/

All the answers will help me a lot to progress in my work.

1
  • Anybody has any comment on this. Commented Aug 21 at 11:18

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.