Re: [PATCH 13/17] io_uring: use persistent request cache

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

 



On 2/9/21 5:03 PM, Pavel Begunkov wrote:
> @@ -1343,10 +1343,7 @@ static struct io_ring_ctx *io_ring_ctx_alloc(struct io_uring_params *p)
>  	INIT_DELAYED_WORK(&ctx->rsrc_put_work, io_rsrc_put_work);
>  	init_llist_head(&ctx->rsrc_put_llist);
>  
> -	submit_state = &ctx->submit_state;
> -	submit_state->comp.nr = 0;
> -	submit_state->file_refs = 0;
> -	submit_state->free_reqs = 0;
> +	INIT_LIST_HEAD(&ctx->submit_state.comp.free_list);
>  	return ctx;
>  err:
>  	kfree(ctx->cancel_hash);

This just needs to be folded into "io_uring: don't reinit submit state every time"
as 'ctx' is zeroed on alloc. Except the list init, of course.

-- 
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