Skip to content

Commit 2840944

Browse files
author
root
committed
*** empty log message ***
1 parent f9dc548 commit 2840944

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

Changes

+8
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,16 @@ TODO: revisit 59.x timer in the light of modern powersaving
44
TODO: maybe use timerfd to detect time jumps on linux
55
TODO: document EV_TSTAMP_T
66

7+
4.31
8+
- handle backends with minimum wait time a bit better by not
9+
waiting in the presence of already-expired timers
10+
(behaviour reported by Felipe Gsper).
11+
12+
4.30 (EV only)
713
- change non-autoconf test for __kernel_rwf_t by testing
814
LINUX_VERSION_CODE, the most direct test I could find.
15+
- fix a bug in the io_uring backend that polled the wrong
16+
backend fd, causing it to not work in many cases.
917

1018
4.29 (EV only)
1119
- add io uring autoconf and non-autoconf detection.

ev.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -3862,8 +3862,8 @@ ev_run (EV_P_ int flags)
38623862

38633863
/* now there are two more special cases left, either we have
38643864
* already-expired timers, so we should not sleep, or we have timers
3865-
* that expire very soon, in which case we need to weait for a minimum
3866-
* amount of time for some event loop backends
3865+
* that expire very soon, in which case we need to wait for a minimum
3866+
* amount of time for some event loop backends.
38673867
*/
38683868
if (ecb_expect_false (waittime < backend_mintime))
38693869
waittime = waittime <= EV_TS_CONST (0.)

ev_iouring.c

+7-7
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ iouring_poll (EV_P_ ev_tstamp timeout)
578578
/* no events, so maybe wait for some */
579579
iouring_tfd_update (EV_A_ timeout);
580580

581-
/* only enter the kernel if we have somethign to submit, or we need to wait */
581+
/* only enter the kernel if we have something to submit, or we need to wait */
582582
if (timeout || iouring_to_submit)
583583
{
584584
int res;
@@ -608,12 +608,6 @@ iouring_init (EV_P_ int flags)
608608
if (!epoll_init (EV_A_ 0))
609609
return 0;
610610

611-
ev_io_init (&iouring_epoll_w, iouring_epoll_cb, backend_fd, EV_READ);
612-
ev_set_priority (&iouring_epoll_w, EV_MAXPRI);
613-
614-
ev_io_init (&iouring_tfd_w, iouring_tfd_cb, iouring_tfd, EV_READ);
615-
ev_set_priority (&iouring_tfd_w, EV_MAXPRI);
616-
617611
iouring_entries = IOURING_INIT_ENTRIES;
618612
iouring_max_entries = 0;
619613

@@ -623,6 +617,12 @@ iouring_init (EV_P_ int flags)
623617
return 0;
624618
}
625619

620+
ev_io_init (&iouring_epoll_w, iouring_epoll_cb, backend_fd, EV_READ);
621+
ev_set_priority (&iouring_epoll_w, EV_MAXPRI);
622+
623+
ev_io_init (&iouring_tfd_w, iouring_tfd_cb, iouring_tfd, EV_READ);
624+
ev_set_priority (&iouring_tfd_w, EV_MAXPRI);
625+
626626
ev_io_start (EV_A_ &iouring_epoll_w);
627627
ev_unref (EV_A); /* watcher should not keep loop alive */
628628

0 commit comments

Comments
 (0)