Re: napi_busy_poll

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

 




On 2/13/22 03:51, Olivier Langlois wrote:
On Wed, 2022-02-09 at 11:34 +0800, Hao Xu wrote:
在 2022/2/9 上午1:05, Jens Axboe 写道:
On 2/8/22 7:58 AM, Olivier Langlois wrote:
Hi,

I was wondering if integrating the NAPI busy poll for socket fds
into
io_uring like how select/poll/epoll are doing has ever been
considered?

It seems to me that it could be an awesome feature when used
along with
a io_qpoll thread and something not too difficult to add...
Should be totally doable and it's been brought up before, just
needs
someone to actually do it... Would love to see it.

We've done some investigation before, would like to have a try.

Hao,

Let me know if I can help you with coding or testing. I have done very
preliminary investigation too. It doesn't seem like it would be very
hard to implement but I get confused with small details.

For instance, the epoll implementation, unless there is something that
I don't understand, appears to have a serious limitation. It seems like
it would not work correctly if there are sockets associated to more
than 1 NAPI device in the fd set. As far as I am concerned, that

Yes, it seems that epoll_wait only does busy polling for 1 NAPI.

I think it is because the busy polling there is just an optimization

(doing some polling before trapping into sleep) not a must have,

so it's kind of trade-off between polling and reacting to other events

I guess. Not very sure about this too..

The iouring implementation I'm thinking of in my mind is polling for every

NAPI involved.


Regards,

Hao

limitation would be ok since in my setup I only use 1 device but if it
was necessary to be better than the epoll implementation, I am not sure
at all how this could be addressed. I do not have enough kernel dev
experience to find easy solutions to those type of issues...

Worse case scenario, I guess that I could give it a shot creating a
good enough implementation for my needs and show it to the list to get
feedback...

Greetings,
Olivier



[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