Hi Keith, I just came across this piece of code in nvme_process_db() that I found weird:
start_sqs = nvme_cq_full(cq) ? 1 : 0; ... if (start_sqs) { NvmeSQueue *sq; QTAILQ_FOREACH(sq, &cq->sq_list, entry) { timer_mod(sq->timer, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + 500); } timer_mod(cq->timer, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + 500); } The logic seems to be “If CQ is full, schedule SQ timer to produce more completions”. I cannot understand this. I think it would make more sense with “If CQ is NOT full, schedule SQ timer to produce more completions”.Am I missing something? Thanks, Jinhao Fan