Commit 43ebecdf authored by Chen, You's avatar Chen, You Committed by Tomasz Zawadzki
Browse files

lib/idxd: break spdk_idxd_process_events loop after processing DESC_PER_BATCH ops



To prevent the processing of outstanding commands from starving the rest of the system

Fixes: #2586

Signed-off-by: default avatarChen, You <you.chen@intel.com>
Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Change-Id: I392db2359408cdef32cc1f46b76ecd94f0c3332c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13685


Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarDong Yi <dongx.yi@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 2508d170
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1397,6 +1397,10 @@ spdk_idxd_process_events(struct spdk_idxd_io_channel *chan)

		/* reset the status */
		status = 0;
		/* break the processing loop to prevent from starving the rest of the system */
		if (rc > DESC_PER_BATCH) {
			break;
		}
	}

	/* Submit any built-up batch */