ublk: add comment clarifying use of SQPOLL for ctrl ring

We need to use SQPOLL on the ctrl ring for now, due to
a bug in kernels <= 6.1.  This ring is used very
infrequently, so the workaround has no real effect
on performance.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia5e65a6edb7b1b6c4c945ebda8941f98c2bcdb07
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16620
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Jim Harris 2023-01-26 15:22:00 +00:00 committed by Tomasz Zawadzki
parent addc545773
commit 3052809a3d

View File

@ -344,6 +344,9 @@ ublk_open(void)
return -rc;
}
/* We need to set SQPOLL for kernels 6.1 and earlier, since they would not defer ublk ctrl
* ring processing to a workqueue. Ctrl ring processing is minimal, so SQPOLL is fine.
*/
rc = ublk_setup_ring(UBLK_CTRL_RING_DEPTH, &g_ublk_tgt.ctrl_ring,
IORING_SETUP_SQE128 | IORING_SETUP_SQPOLL);
if (rc < 0) {