Tweak performance of nda completions
Use xpt_done_direct in preference to xpt_done when completing a successful I/O. Continue to use xpt_done when there's an error, or for completion of the submission of a CCB. This eliminates a context switch to the cam_doneq thread. Sponsored by: Netflix Suggested by: scottl@
This commit is contained in:
parent
bd290946e9
commit
cfb43eb12e
@ -73,11 +73,13 @@ nvme_sim_nvmeio_done(void *ccb_arg, const struct nvme_completion *cpl)
|
||||
* it means. Make our best guess, though for the status code.
|
||||
*/
|
||||
memcpy(&ccb->nvmeio.cpl, cpl, sizeof(*cpl));
|
||||
if (nvme_completion_is_error(cpl))
|
||||
if (nvme_completion_is_error(cpl)) {
|
||||
ccb->ccb_h.status = CAM_REQ_CMP_ERR;
|
||||
else
|
||||
xpt_done(ccb);
|
||||
} else {
|
||||
ccb->ccb_h.status = CAM_REQ_CMP;
|
||||
xpt_done(ccb);
|
||||
xpt_done_direct(ccb);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user