On 4/26/22 02:48, Jens Axboe wrote:
Hi, Unless we're using SQPOLL, any task_work queue will result in an IPI to the target task unless it's running in the kernel already. This isn't always needed, particularly not for the common case of not sharing the ring. In certain workloads, this can provide a 5-10% improvement. Some of this is due the cost of the IPI, and some from needlessly interrupting the target task when the work could just get run when completions are being waited for. Patches 1..4 are prep patches, patch 5 is the actual change, and patch 6 adds support for IORING_SQ_TASKRUN so that applications may use this feature and still rely on io_uring_peek_cqe(). v4: - Make SQPOLL incompatible with the IPI flags. It makes no sense for SQPOLL as no IPIs are ever used there anyway, so make that explicit and fail a request to setup a ring like that.
looks good Reviewed-by: Pavel Begunkov <asml.silence@xxxxxxxxx> -- Pavel Begunkov