Re: [PATCH v10 2/5] io-uring: add napi busy poll support

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

 



Jens Axboe <axboe@xxxxxxxxx> writes:

> On 4/26/23 7:41?PM, Jens Axboe wrote:
>
> I'd probably also do this:
>
>
> diff --git a/io_uring/napi.c b/io_uring/napi.c
> index ca12ff5f5611..35a29fd9afbc 100644
> --- a/io_uring/napi.c
> +++ b/io_uring/napi.c
> @@ -95,12 +95,17 @@ static bool io_napi_busy_loop_should_end(void *p, unsigned long start_time)
>  {
>  	struct io_wait_queue *iowq = p;
>
> -	return signal_pending(current) ||
> -	       io_should_wake(iowq) ||
> -	       io_napi_busy_loop_timeout(start_time, iowq->napi_busy_poll_to);
> +	if (signal_pending(current))
> +		return true;
> +	if (io_should_wake(iowq))
> +		return true;
> +	if (io_napi_busy_loop_timeout(start_time, iowq->napi_busy_poll_to))
> +		return true;
> +	return false;
>  }
>
> as that is easier to read.
>
Will be changed in the next version.



[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