Re: [PATCH v12 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:

>
> I mentioned this in our out-of-band discussions on this patch set, and
> we cannot call napi_busy_loop() under rcu_read_lock() if loop_end and
> loop_end_arg is set AND loop_end() doesn't always return true. Because
> otherwise we can end up with napi_busy_loop() doing:
>
> 	if (unlikely(need_resched())) {
> 		if (napi_poll)
> 			busy_poll_stop(napi, have_poll_lock, prefer_busy_poll, budget);
> 		preempt_enable();
> 		rcu_read_unlock();
> 		cond_resched();
> 		if (loop_end(loop_end_arg, start_time))
> 			return;
> 		goto restart;
> 	}
>
> and hence we're now scheduling with rcu read locking disabled. So we
> need to handle that case appropriately as well.

I'll have a look.



[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