Re: [PATCH 1/2] io_uring: kill sqo_dead and sqo submission halting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/1/21 6:02 AM, Pavel Begunkov wrote:
> @@ -8697,19 +8691,6 @@ static void io_uring_cancel_files(struct io_ring_ctx *ctx,
>  	}
>  }
>  
> -static void io_disable_sqo_submit(struct io_ring_ctx *ctx)
> -{
> -	mutex_lock(&ctx->uring_lock);
> -	ctx->sqo_dead = 1;
> -	if (ctx->flags & IORING_SETUP_R_DISABLED)
> -		io_sq_offload_start(ctx);
> -	mutex_unlock(&ctx->uring_lock);
> -
> -	/* make sure callers enter the ring to get error */
> -	if (ctx->rings)
> -		io_ring_set_wakeup_flag(ctx);
> -}

We need to retain the offload start here for IORING_SETUP_R_DISABLED, or
we'll potentially hang when:

> @@ -8722,7 +8703,6 @@ static void io_uring_cancel_task_requests(struct io_ring_ctx *ctx,
>  	bool did_park = false;
>  
>  	if ((ctx->flags & IORING_SETUP_SQPOLL) && ctx->sq_data) {
> -		io_disable_sqo_submit(ctx);
>  		did_park = io_sq_thread_park(ctx->sq_data);
>  		if (did_park) {
>  			task = ctx->sq_data->thread;

we try and park right here. Maybe we can just do that in
cancel_sqpoll(), will double check.

-- 
Jens Axboe




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux