* support suspend/resume SQPOLL on inflight io-uring instance
@ 2020-06-05 3:38 陈云星
2020-06-05 13:13 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: 陈云星 @ 2020-06-05 3:38 UTC (permalink / raw)
To: axboe; +Cc: io-uring
io-uring instance can be set flag : IO_URING_SETUP_SQPOLL to enable
kernel thread polling SQ. but some application have random io
behavior, for example:
a). a burst read/write for a while,
b). then many scatter small io operations.
during a) period, use sqpoll will be beneficial to performance.
but during b) period, use sqpoll will waste cpu time for empty busy poll.
If we can have a method to tell kernel start/stop poll sq when we
need, it is good for both of a) and b):
in a) period, io_uring_enter tell kernel. start to poll
after a) , io_uring_enter tell kernel stop polling and.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: support suspend/resume SQPOLL on inflight io-uring instance
2020-06-05 3:38 support suspend/resume SQPOLL on inflight io-uring instance 陈云星
@ 2020-06-05 13:13 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2020-06-05 13:13 UTC (permalink / raw)
To: 陈云星; +Cc: io-uring
On 6/4/20 9:38 PM, 陈云星 wrote:
> io-uring instance can be set flag : IO_URING_SETUP_SQPOLL to enable
> kernel thread polling SQ. but some application have random io
> behavior, for example:
> a). a burst read/write for a while,
> b). then many scatter small io operations.
>
> during a) period, use sqpoll will be beneficial to performance.
> but during b) period, use sqpoll will waste cpu time for empty busy poll.
>
> If we can have a method to tell kernel start/stop poll sq when we
> need, it is good for both of a) and b):
> in a) period, io_uring_enter tell kernel. start to poll
> after a) , io_uring_enter tell kernel stop polling and.
We already have the start side of it, that's io_uring_enter() which should
be done when IORING_SQ_NEED_WAKEUP is set. I do like your suggestion of
making it go to sleep on demand instead of always waiting for the grace
period.
We recently added IORING_CQ_EVENTFD_DISABLED, and we can use the same
area for this as well. Eg add IORING_CQ_SQPOLL_SLEEP or something like
that, and have the sq thread look for it. If set, it'll stop busy looping
and go to sleep.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-05 13:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-05 3:38 support suspend/resume SQPOLL on inflight io-uring instance 陈云星
2020-06-05 13:13 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox