aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/nodejs/nodejs/0002-Revert-io_uring-changes-from-libuv-1.45.0.patch
blob: 77cd53b759ad52f9a74a1660795d08c7071f9d0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
From 6d2ef4c8ba2304ee4941a6719b3ad9bd63e415a9 Mon Sep 17 00:00:00 2001
From: Martin Jansa <martin.jansa@gmail.com>
Date: Wed, 18 Oct 2023 21:09:44 +0200
Subject: [PATCH] Revert io_uring changes from libuv-1.45.0

This reverts https://github.com/libuv/libuv/pull/3952/commits/26c79a942b92573a1388c0ee8a6ad4397f009318

Included in nodejs-20.3.0 with the libuv upgrade to 1.45.0 in:
https://github.com/nodejs/node/commit/bfcb3d1d9a876f399013d326bd65804f9eda77e4

Reverted libuv commits:
Revert "linux: fix WRITEV with lots of bufs using io_uring (#4004)"
This reverts commit ef6a9a624df0a00687037474025a3608472f722a.
Revert "linux: work around EOWNERDEAD io_uring kernel bug (#4002)"
This reverts commit d23a20f62cc50b9fd7694992263f1d296d8f5cb4.
Revert "unix: handle CQ overflow in iou ring (#3991)"
This reverts commit 30fc896cc1b5822e9f1eb462587fe4b368a6215c.
Revert "unix: constrained_memory should return UINT64_MAX (#3753)"
This reverts commit 6ad347fae4520f39520d34bd7c7f5ddafab13a69.
Revert "linux: use io_uring to batch epoll_ctl calls (#3979)"
This reverts commit 6e073ef5daf93b708a654008959b823b58029e88.
Revert "linux: fix logic bug in sqe ring space check (#3980)"
This reverts commit f27208224084fc972b9d2802486d97ef31b51a39.
Revert "src: fix events/events_waiting metrics counter (#3957)"
This reverts commit e02642cf3b768b2c58a41f97fa38507e032ae415.
Revert "linux: remove bug workaround for obsolete kernels (#3965)"
This reverts commit 1c935a34454167b23f8eef7f0f63d7119f0de747.
Revert "linux: add IORING_OP_CLOSE support (#3964)"
This reverts commit dfae365f844e127621128a76bce7165e3f99a8d9.
Revert "linux: add IORING_OP_OPENAT support (#3963)"
This reverts commit 5ca5e475bb1711e65323ef1594a31818e5a1a9eb.
Revert "linux: fix academic valgrind warning (#3960)"
This reverts commit a7ff759ca1deacb2e0e6ae3c2d3dce91cc637dfe.
Revert "linux: introduce io_uring support (#3952)"
This reverts commit d2c31f429b87b476a7f1344d145dad4752a406d4.

Dropped deps/uv/docs deps/uv/test changes as these dirs aren't included
in nodejs tarballs.

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
Upstream-Status: Inappropriate [OE specific]

 deps/uv/docs/src/fs.rst               |   6 -
 deps/uv/docs/src/misc.rst             |   5 +-
 deps/uv/src/threadpool.c              |  21 -
 deps/uv/src/unix/aix.c                |  11 +-
 deps/uv/src/unix/fs.c                 |  57 +-
 deps/uv/src/unix/internal.h           |  23 -
 deps/uv/src/unix/kqueue.c             |  10 +-
 deps/uv/src/unix/linux.c              | 998 +++-----------------------
 deps/uv/src/unix/os390.c              |  11 +-
 deps/uv/src/unix/posix-poll.c         |  11 +-
 deps/uv/src/uv-common.h               |  28 -
 deps/uv/src/win/core.c                |  20 +-
 deps/uv/test/test-fs.c                |  33 -
 deps/uv/test/test-list.h              |   4 -
 deps/uv/test/test-metrics.c           | 151 ----
 deps/uv/test/test-threadpool-cancel.c |  34 +-
 16 files changed, 138 insertions(+), 1285 deletions(-)

diff --git a/deps/uv/src/threadpool.c b/deps/uv/src/threadpool.c
index 51962bf0021..a3da53026f9 100644
--- a/deps/uv/src/threadpool.c
+++ b/deps/uv/src/threadpool.c
@@ -275,13 +275,9 @@ void uv__work_submit(uv_loop_t* loop,
 }
 
 
-/* TODO(bnoordhuis) teach libuv how to cancel file operations
- * that go through io_uring instead of the thread pool.
- */
 static int uv__work_cancel(uv_loop_t* loop, uv_req_t* req, struct uv__work* w) {
   int cancelled;
 
-  uv_once(&once, init_once);  /* Ensure |mutex| is initialized. */
   uv_mutex_lock(&mutex);
   uv_mutex_lock(&w->loop->wq_mutex);
 
@@ -311,15 +307,12 @@ void uv__work_done(uv_async_t* handle) {
   QUEUE* q;
   QUEUE wq;
   int err;
-  int nevents;
 
   loop = container_of(handle, uv_loop_t, wq_async);
   uv_mutex_lock(&loop->wq_mutex);
   QUEUE_MOVE(&loop->wq, &wq);
   uv_mutex_unlock(&loop->wq_mutex);
 
-  nevents = 0;
-
   while (!QUEUE_EMPTY(&wq)) {
     q = QUEUE_HEAD(&wq);
     QUEUE_REMOVE(q);
@@ -327,20 +320,6 @@ void uv__work_done(uv_async_t* handle) {
     w = container_of(q, struct uv__work, wq);
     err = (w->work == uv__cancelled) ? UV_ECANCELED : 0;
     w->done(w, err);
-    nevents++;
-  }
-
-  /* This check accomplishes 2 things:
-   * 1. Even if the queue was empty, the call to uv__work_done() should count
-   *    as an event. Which will have been added by the event loop when
-   *    calling this callback.
-   * 2. Prevents accidental wrap around in case nevents == 0 events == 0.
-   */
-  if (nevents > 1) {
-    /* Subtract 1 to counter the call to uv__work_done(). */
-    uv__metrics_inc_events(loop, nevents - 1);
-    if (uv__get_internal_fields(loop)->current_timeout == 0)
-      uv__metrics_inc_events_waiting(loop, nevents - 1);
   }
 }
 
diff --git a/deps/uv/src/unix/aix.c b/deps/uv/src/unix/aix.c
index f1afbed49ec..b855282ebc8 100644
--- a/deps/uv/src/unix/aix.c
+++ b/deps/uv/src/unix/aix.c
@@ -131,7 +131,6 @@ int uv__io_check_fd(uv_loop_t* loop, int fd) {
 
 
 void uv__io_poll(uv_loop_t* loop, int timeout) {
-  uv__loop_internal_fields_t* lfields;
   struct pollfd events[1024];
   struct pollfd pqry;
   struct pollfd* pe;
@@ -155,8 +154,6 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
     return;
   }
 
-  lfields = uv__get_internal_fields(loop);
-
   while (!QUEUE_EMPTY(&loop->watcher_queue)) {
     q = QUEUE_HEAD(&loop->watcher_queue);
     QUEUE_REMOVE(q);
@@ -220,7 +217,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
   base = loop->time;
   count = 48; /* Benchmarks suggest this gives the best throughput. */
 
-  if (lfields->flags & UV_METRICS_IDLE_TIME) {
+  if (uv__get_internal_fields(loop)->flags & UV_METRICS_IDLE_TIME) {
     reset_timeout = 1;
     user_timeout = timeout;
     timeout = 0;
@@ -235,12 +232,6 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
     if (timeout != 0)
       uv__metrics_set_provider_entry_time(loop);
 
-    /* Store the current timeout in a location that's globally accessible so
-     * other locations like uv__work_done() can determine whether the queue
-     * of events in the callback were waiting when poll was called.
-     */
-    lfields->current_timeout = timeout;
-
     nfds = pollset_poll(loop->backend_fd,
                         events,
                         ARRAY_SIZE(events),
diff --git a/deps/uv/src/unix/fs.c b/deps/uv/src/unix/fs.c
index 00d385c24b7..c696a8d5500 100644
--- a/deps/uv/src/unix/fs.c
+++ b/deps/uv/src/unix/fs.c
@@ -61,11 +61,10 @@
 #endif
 
 #if defined(__linux__)
-# include <sys/sendfile.h>
-# include <sys/utsname.h>
+# include "sys/utsname.h"
 #endif
 
-#if defined(__sun)
+#if defined(__linux__) || defined(__sun)
 # include <sys/sendfile.h>
 # include <sys/sysmacros.h>
 #endif
@@ -1554,7 +1553,26 @@ static int uv__fs_statx(int fd,
     return UV_ENOSYS;
   }
 
-  uv__statx_to_stat(&statxbuf, buf);
+  buf->st_dev = makedev(statxbuf.stx_dev_major, statxbuf.stx_dev_minor);
+  buf->st_mode = statxbuf.stx_mode;
+  buf->st_nlink = statxbuf.stx_nlink;
+  buf->st_uid = statxbuf.stx_uid;
+  buf->st_gid = statxbuf.stx_gid;
+  buf->st_rdev = makedev(statxbuf.stx_rdev_major, statxbuf.stx_rdev_minor);
+  buf->st_ino = statxbuf.stx_ino;
+  buf->st_size = statxbuf.stx_size;
+  buf->st_blksize = statxbuf.stx_blksize;
+  buf->st_blocks = statxbuf.stx_blocks;
+  buf->st_atim.tv_sec = statxbuf.stx_atime.tv_sec;
+  buf->st_atim.tv_nsec = statxbuf.stx_atime.tv_nsec;
+  buf->st_mtim.tv_sec = statxbuf.stx_mtime.tv_sec;
+  buf->st_mtim.tv_nsec = statxbuf.stx_mtime.tv_nsec;
+  buf->st_ctim.tv_sec = statxbuf.stx_ctime.tv_sec;
+  buf->st_ctim.tv_nsec = statxbuf.stx_ctime.tv_nsec;
+  buf->st_birthtim.tv_sec = statxbuf.stx_btime.tv_sec;
+  buf->st_birthtim.tv_nsec = statxbuf.stx_btime.tv_nsec;
+  buf->st_flags = 0;
+  buf->st_gen = 0;
 
   return 0;
 #else
@@ -1798,9 +1816,6 @@ int uv_fs_chown(uv_loop_t* loop,
 int uv_fs_close(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) {
   INIT(CLOSE);
   req->file = file;
-  if (cb != NULL)
-    if (uv__iou_fs_close(loop, req))
-      return 0;
   POST;
 }
 
@@ -1848,9 +1863,6 @@ int uv_fs_lchown(uv_loop_t* loop,
 int uv_fs_fdatasync(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) {
   INIT(FDATASYNC);
   req->file = file;
-  if (cb != NULL)
-    if (uv__iou_fs_fsync_or_fdatasync(loop, req, /* IORING_FSYNC_DATASYNC */ 1))
-      return 0;
   POST;
 }
 
@@ -1858,9 +1870,6 @@ int uv_fs_fdatasync(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) {
 int uv_fs_fstat(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) {
   INIT(FSTAT);
   req->file = file;
-  if (cb != NULL)
-    if (uv__iou_fs_statx(loop, req, /* is_fstat */ 1, /* is_lstat */ 0))
-      return 0;
   POST;
 }
 
@@ -1868,9 +1877,6 @@ int uv_fs_fstat(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) {
 int uv_fs_fsync(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) {
   INIT(FSYNC);
   req->file = file;
-  if (cb != NULL)
-    if (uv__iou_fs_fsync_or_fdatasync(loop, req, /* no flags */ 0))
-      return 0;
   POST;
 }
 
@@ -1917,9 +1923,6 @@ int uv_fs_lutime(uv_loop_t* loop,
 int uv_fs_lstat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) {
   INIT(LSTAT);
   PATH;
-  if (cb != NULL)
-    if (uv__iou_fs_statx(loop, req, /* is_fstat */ 0, /* is_lstat */ 1))
-      return 0;
   POST;
 }
 
@@ -1981,9 +1984,6 @@ int uv_fs_open(uv_loop_t* loop,
   PATH;
   req->flags = flags;
   req->mode = mode;
-  if (cb != NULL)
-    if (uv__iou_fs_open(loop, req))
-      return 0;
   POST;
 }
 
@@ -2012,11 +2012,6 @@ int uv_fs_read(uv_loop_t* loop, uv_fs_t* req,
   memcpy(req->bufs, bufs, nbufs * sizeof(*bufs));
 
   req->off = off;
-
-  if (cb != NULL)
-    if (uv__iou_fs_read_or_write(loop, req, /* is_read */ 1))
-      return 0;
-
   POST;
 }
 
@@ -2124,9 +2119,6 @@ int uv_fs_sendfile(uv_loop_t* loop,
 int uv_fs_stat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb) {
   INIT(STAT);
   PATH;
-  if (cb != NULL)
-    if (uv__iou_fs_statx(loop, req, /* is_fstat */ 0, /* is_lstat */ 0))
-      return 0;
   POST;
 }
 
@@ -2190,11 +2182,6 @@ int uv_fs_write(uv_loop_t* loop,
   memcpy(req->bufs, bufs, nbufs * sizeof(*bufs));
 
   req->off = off;
-
-  if (cb != NULL)
-    if (uv__iou_fs_read_or_write(loop, req, /* is_read */ 0))
-      return 0;
-
   POST;
 }
 
diff --git a/deps/uv/src/unix/internal.h b/deps/uv/src/unix/internal.h
index 6c5822e6a0d..d439ae6dd3d 100644
--- a/deps/uv/src/unix/internal.h
+++ b/deps/uv/src/unix/internal.h
@@ -329,28 +329,6 @@ int uv__random_getentropy(void* buf, size_t buflen);
 int uv__random_readpath(const char* path, void* buf, size_t buflen);
 int uv__random_sysctl(void* buf, size_t buflen);
 
-/* io_uring */
-#ifdef __linux__
-int uv__iou_fs_close(uv_loop_t* loop, uv_fs_t* req);
-int uv__iou_fs_fsync_or_fdatasync(uv_loop_t* loop,
-                                  uv_fs_t* req,
-                                  uint32_t fsync_flags);
-int uv__iou_fs_open(uv_loop_t* loop, uv_fs_t* req);
-int uv__iou_fs_read_or_write(uv_loop_t* loop,
-                             uv_fs_t* req,
-                             int is_read);
-int uv__iou_fs_statx(uv_loop_t* loop,
-                     uv_fs_t* req,
-                     int is_fstat,
-                     int is_lstat);
-#else
-#define uv__iou_fs_close(loop, req) 0
-#define uv__iou_fs_fsync_or_fdatasync(loop, req, fsync_flags) 0
-#define uv__iou_fs_open(loop, req) 0
-#define uv__iou_fs_read_or_write(loop, req, is_read) 0
-#define uv__iou_fs_statx(loop, req, is_fstat, is_lstat) 0
-#endif
-
 #if defined(__APPLE__)
 int uv___stream_fd(const uv_stream_t* handle);
 #define uv__stream_fd(handle) (uv___stream_fd((const uv_stream_t*) (handle)))
@@ -427,7 +405,6 @@ int uv__statx(int dirfd,
               int flags,
               unsigned int mask,
               struct uv__statx* statxbuf);
-void uv__statx_to_stat(const struct uv__statx* statxbuf, uv_stat_t* buf);
 ssize_t uv__getrandom(void* buf, size_t buflen, unsigned flags);
 #endif
 
diff --git a/deps/uv/src/unix/kqueue.c b/deps/uv/src/unix/kqueue.c
index 82916d65933..deb486bae7a 100644
--- a/deps/uv/src/unix/kqueue.c
+++ b/deps/uv/src/unix/kqueue.c
@@ -127,7 +127,6 @@ static void uv__kqueue_delete(int kqfd, const struct kevent *ev) {
 
 
 void uv__io_poll(uv_loop_t* loop, int timeout) {
-  uv__loop_internal_fields_t* lfields;
   struct kevent events[1024];
   struct kevent* ev;
   struct timespec spec;
@@ -156,7 +155,6 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
     return;
   }
 
-  lfields = uv__get_internal_fields(loop);
   nevents = 0;
 
   while (!QUEUE_EMPTY(&loop->watcher_queue)) {
@@ -224,7 +222,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
   base = loop->time;
   count = 48; /* Benchmarks suggest this gives the best throughput. */
 
-  if (lfields->flags & UV_METRICS_IDLE_TIME) {
+  if (uv__get_internal_fields(loop)->flags & UV_METRICS_IDLE_TIME) {
     reset_timeout = 1;
     user_timeout = timeout;
     timeout = 0;
@@ -247,12 +245,6 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
     if (pset != NULL)
       pthread_sigmask(SIG_BLOCK, pset, NULL);
 
-    /* Store the current timeout in a location that's globally accessible so
-     * other locations like uv__work_done() can determine whether the queue
-     * of events in the callback were waiting when poll was called.
-     */
-    lfields->current_timeout = timeout;
-
     nfds = kevent(loop->backend_fd,
                   events,
                   nevents,
diff --git a/deps/uv/src/unix/linux.c b/deps/uv/src/unix/linux.c
index 5f84ad0eea3..343e37f2527 100644
--- a/deps/uv/src/unix/linux.c
+++ b/deps/uv/src/unix/linux.c
@@ -27,8 +27,6 @@
 #include "internal.h"
 
 #include <inttypes.h>
-#include <stdatomic.h>
-#include <stddef.h>  /* offsetof */
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -40,29 +38,15 @@
 #include <net/if.h>
 #include <sys/epoll.h>
 #include <sys/inotify.h>
-#include <sys/mman.h>
 #include <sys/param.h>
 #include <sys/prctl.h>
 #include <sys/stat.h>
 #include <sys/syscall.h>
 #include <sys/sysinfo.h>
-#include <sys/sysmacros.h>
 #include <sys/types.h>
 #include <time.h>
 #include <unistd.h>
 
-#ifndef __NR_io_uring_setup
-# define __NR_io_uring_setup 425
-#endif
-
-#ifndef __NR_io_uring_enter
-# define __NR_io_uring_enter 426
-#endif
-
-#ifndef __NR_io_uring_register
-# define __NR_io_uring_register 427
-#endif
-
 #ifndef __NR_copy_file_range
 # if defined(__x86_64__)
 #  define __NR_copy_file_range 326
@@ -132,129 +116,6 @@
 # include <netpacket/packet.h>
 #endif /* HAVE_IFADDRS_H */
 
-enum {
-  UV__IORING_SETUP_SQPOLL = 2u,
-};
-
-enum {
-  UV__IORING_FEAT_SINGLE_MMAP = 1u,
-  UV__IORING_FEAT_NODROP = 2u,
-  UV__IORING_FEAT_RSRC_TAGS = 1024u,  /* linux v5.13 */
-};
-
-enum {
-  UV__IORING_OP_READV = 1,
-  UV__IORING_OP_WRITEV = 2,
-  UV__IORING_OP_FSYNC = 3,
-  UV__IORING_OP_OPENAT = 18,
-  UV__IORING_OP_CLOSE = 19,
-  UV__IORING_OP_STATX = 21,
-  UV__IORING_OP_EPOLL_CTL = 29,
-};
-
-enum {
-  UV__IORING_ENTER_GETEVENTS = 1u,
-  UV__IORING_ENTER_SQ_WAKEUP = 2u,
-};
-
-enum {
-  UV__IORING_SQ_NEED_WAKEUP = 1u,
-  UV__IORING_SQ_CQ_OVERFLOW = 2u,
-};
-
-struct uv__io_cqring_offsets {
-  uint32_t head;
-  uint32_t tail;
-  uint32_t ring_mask;
-  uint32_t ring_entries;
-  uint32_t overflow;
-  uint32_t cqes;
-  uint64_t reserved0;
-  uint64_t reserved1;
-};
-
-STATIC_ASSERT(40 == sizeof(struct uv__io_cqring_offsets));
-
-struct uv__io_sqring_offsets {
-  uint32_t head;
-  uint32_t tail;
-  uint32_t ring_mask;
-  uint32_t ring_entries;
-  uint32_t flags;
-  uint32_t dropped;
-  uint32_t array;
-  uint32_t reserved0;
-  uint64_t reserved1;
-};
-
-STATIC_ASSERT(40 == sizeof(struct uv__io_sqring_offsets));
-
-struct uv__io_uring_cqe {
-  uint64_t user_data;
-  int32_t res;
-  uint32_t flags;
-};
-
-STATIC_ASSERT(16 == sizeof(struct uv__io_uring_cqe));
-
-struct uv__io_uring_sqe {
-  uint8_t opcode;
-  uint8_t flags;
-  uint16_t ioprio;
-  int32_t fd;
-  union {
-    uint64_t off;
-    uint64_t addr2;
-  };
-  union {
-    uint64_t addr;
-  };
-  uint32_t len;
-  union {
-    uint32_t rw_flags;
-    uint32_t fsync_flags;
-    uint32_t open_flags;
-    uint32_t statx_flags;
-  };
-  uint64_t user_data;
-  union {
-    uint16_t buf_index;
-    uint64_t pad[3];
-  };
-};
-
-STATIC_ASSERT(64 == sizeof(struct uv__io_uring_sqe));
-STATIC_ASSERT(0 == offsetof(struct uv__io_uring_sqe, opcode));
-STATIC_ASSERT(1 == offsetof(struct uv__io_uring_sqe, flags));
-STATIC_ASSERT(2 == offsetof(struct uv__io_uring_sqe, ioprio));
-STATIC_ASSERT(4 == offsetof(struct uv__io_uring_sqe, fd));
-STATIC_ASSERT(8 == offsetof(struct uv__io_uring_sqe, off));
-STATIC_ASSERT(16 == offsetof(struct uv__io_uring_sqe, addr));
-STATIC_ASSERT(24 == offsetof(struct uv__io_uring_sqe, len));
-STATIC_ASSERT(28 == offsetof(struct uv__io_uring_sqe, rw_flags));
-STATIC_ASSERT(32 == offsetof(struct uv__io_uring_sqe, user_data));
-STATIC_ASSERT(40 == offsetof(struct uv__io_uring_sqe, buf_index));
-
-struct uv__io_uring_params {
-  uint32_t sq_entries;
-  uint32_t cq_entries;
-  uint32_t flags;
-  uint32_t sq_thread_cpu;
-  uint32_t sq_thread_idle;
-  uint32_t features;
-  uint32_t reserved[4];
-  struct uv__io_sqring_offsets sq_off;  /* 40 bytes */
-  struct uv__io_cqring_offsets cq_off;  /* 40 bytes */
-};
-
-STATIC_ASSERT(40 + 40 + 40 == sizeof(struct uv__io_uring_params));
-STATIC_ASSERT(40 == offsetof(struct uv__io_uring_params, sq_off));
-STATIC_ASSERT(80 == offsetof(struct uv__io_uring_params, cq_off));
-
-STATIC_ASSERT(EPOLL_CTL_ADD < 4);
-STATIC_ASSERT(EPOLL_CTL_DEL < 4);
-STATIC_ASSERT(EPOLL_CTL_MOD < 4);
-
 struct watcher_list {
   RB_ENTRY(watcher_list) entry;
   QUEUE watchers;
@@ -276,17 +137,6 @@ static int compare_watchers(const struct watcher_list* a,
 static void maybe_free_watcher_list(struct watcher_list* w,
                                     uv_loop_t* loop);
 
-static void uv__epoll_ctl_flush(int epollfd,
-                                struct uv__iou* ctl,
-                                struct epoll_event (*events)[256]);
-
-static void uv__epoll_ctl_prep(int epollfd,
-                               struct uv__iou* ctl,
-                               struct epoll_event (*events)[256],
-                               int op,
-                               int fd,
-                               struct epoll_event* e);
-
 RB_GENERATE_STATIC(watcher_root, watcher_list, entry, compare_watchers)
 
 
@@ -356,187 +206,7 @@ ssize_t uv__getrandom(void* buf, size_t buflen, unsigned flags) {
 }
 
 
-int uv__io_uring_setup(int entries, struct uv__io_uring_params* params) {
-  return syscall(__NR_io_uring_setup, entries, params);
-}
-
-
-int uv__io_uring_enter(int fd,
-                       unsigned to_submit,
-                       unsigned min_complete,
-                       unsigned flags) {
-  /* io_uring_enter used to take a sigset_t but it's unused
-   * in newer kernels unless IORING_ENTER_EXT_ARG is set,
-   * in which case it takes a struct io_uring_getevents_arg.
-   */
-  return syscall(__NR_io_uring_enter,
-                 fd,
-                 to_submit,
-                 min_complete,
-                 flags,
-                 NULL,
-                 0L);
-}
-
-
-int uv__io_uring_register(int fd, unsigned opcode, void* arg, unsigned nargs) {
-  return syscall(__NR_io_uring_register, fd, opcode, arg, nargs);
-}
-
-
-static int uv__use_io_uring(void) {
-  /* Ternary: unknown=0, yes=1, no=-1 */
-  static _Atomic int use_io_uring;
-  char* val;
-  int use;
-
-  use = atomic_load_explicit(&use_io_uring, memory_order_relaxed);
-
-  if (use == 0) {
-    val = getenv("UV_USE_IO_URING");
-    use = val == NULL || atoi(val) ? 1 : -1;
-    atomic_store_explicit(&use_io_uring, use, memory_order_relaxed);
-  }
-
-  return use > 0;
-}
-
-
-static void uv__iou_init(int epollfd,
-                         struct uv__iou* iou,
-                         uint32_t entries,
-                         uint32_t flags) {
-  struct uv__io_uring_params params;
-  struct epoll_event e;
-  size_t cqlen;
-  size_t sqlen;
-  size_t maxlen;
-  size_t sqelen;
-  uint32_t i;
-  char* sq;
-  char* sqe;
-  int ringfd;
-
-  sq = MAP_FAILED;
-  sqe = MAP_FAILED;
-
-  if (!uv__use_io_uring())
-    return;
-
-  /* SQPOLL required CAP_SYS_NICE until linux v5.12 relaxed that requirement.
-   * Mostly academic because we check for a v5.13 kernel afterwards anyway.
-   */
-  memset(&params, 0, sizeof(params));
-  params.flags = flags;
-
-  if (flags & UV__IORING_SETUP_SQPOLL)
-    params.sq_thread_idle = 10;  /* milliseconds */
-
-  /* Kernel returns a file descriptor with O_CLOEXEC flag set. */
-  ringfd = uv__io_uring_setup(entries, &params);
-  if (ringfd == -1)
-    return;
-
-  /* IORING_FEAT_RSRC_TAGS is used to detect linux v5.13 but what we're
-   * actually detecting is whether IORING_OP_STATX works with SQPOLL.
-   */
-  if (!(params.features & UV__IORING_FEAT_RSRC_TAGS))
-    goto fail;
-
-  /* Implied by IORING_FEAT_RSRC_TAGS but checked explicitly anyway. */
-  if (!(params.features & UV__IORING_FEAT_SINGLE_MMAP))
-    goto fail;
-
-  /* Implied by IORING_FEAT_RSRC_TAGS but checked explicitly anyway. */
-  if (!(params.features & UV__IORING_FEAT_NODROP))
-    goto fail;
-
-  sqlen = params.sq_off.array + params.sq_entries * sizeof(uint32_t);
-  cqlen =
-      params.cq_off.cqes + params.cq_entries * sizeof(struct uv__io_uring_cqe);
-  maxlen = sqlen < cqlen ? cqlen : sqlen;
-  sqelen = params.sq_entries * sizeof(struct uv__io_uring_sqe);
-
-  sq = mmap(0,
-            maxlen,
-            PROT_READ | PROT_WRITE,
-            MAP_SHARED | MAP_POPULATE,
-            ringfd,
-            0);  /* IORING_OFF_SQ_RING */
-
-  sqe = mmap(0,
-             sqelen,
-             PROT_READ | PROT_WRITE,
-             MAP_SHARED | MAP_POPULATE,
-             ringfd,
-             0x10000000ull);  /* IORING_OFF_SQES */
-
-  if (sq == MAP_FAILED || sqe == MAP_FAILED)
-    goto fail;
-
-  if (flags & UV__IORING_SETUP_SQPOLL) {
-    /* Only interested in completion events. To get notified when
-     * the kernel pulls items from the submission ring, add POLLOUT.
-     */
-    memset(&e, 0, sizeof(e));
-    e.events = POLLIN;
-    e.data.fd = ringfd;
-
-    if (epoll_ctl(epollfd, EPOLL_CTL_ADD, ringfd, &e))
-      goto fail;
-  }
-
-  iou->sqhead = (uint32_t*) (sq + params.sq_off.head);
-  iou->sqtail = (uint32_t*) (sq + params.sq_off.tail);
-  iou->sqmask = *(uint32_t*) (sq + params.sq_off.ring_mask);
-  iou->sqarray = (uint32_t*) (sq + params.sq_off.array);
-  iou->sqflags = (uint32_t*) (sq + params.sq_off.flags);
-  iou->cqhead = (uint32_t*) (sq + params.cq_off.head);
-  iou->cqtail = (uint32_t*) (sq + params.cq_off.tail);
-  iou->cqmask = *(uint32_t*) (sq + params.cq_off.ring_mask);
-  iou->sq = sq;
-  iou->cqe = sq + params.cq_off.cqes;
-  iou->sqe = sqe;
-  iou->sqlen = sqlen;
-  iou->cqlen = cqlen;
-  iou->maxlen = maxlen;
-  iou->sqelen = sqelen;
-  iou->ringfd = ringfd;
-  iou->in_flight = 0;
-
-  for (i = 0; i <= iou->sqmask; i++)
-    iou->sqarray[i] = i;  /* Slot -> sqe identity mapping. */
-
-  return;
-
-fail:
-  if (sq != MAP_FAILED)
-    munmap(sq, maxlen);
-
-  if (sqe != MAP_FAILED)
-    munmap(sqe, sqelen);
-
-  uv__close(ringfd);
-}
-
-
-static void uv__iou_delete(struct uv__iou* iou) {
-  if (iou->ringfd != -1) {
-    munmap(iou->sq, iou->maxlen);
-    munmap(iou->sqe, iou->sqelen);
-    uv__close(iou->ringfd);
-    iou->ringfd = -1;
-  }
-}
-
-
 int uv__platform_loop_init(uv_loop_t* loop) {
-  uv__loop_internal_fields_t* lfields;
-
-  lfields = uv__get_internal_fields(loop);
-  lfields->ctl.ringfd = -1;
-  lfields->iou.ringfd = -1;
-
   loop->inotify_watchers = NULL;
   loop->inotify_fd = -1;
   loop->backend_fd = epoll_create1(O_CLOEXEC);
@@ -544,9 +214,6 @@ int uv__platform_loop_init(uv_loop_t* loop) {
   if (loop->backend_fd == -1)
     return UV__ERR(errno);
 
-  uv__iou_init(loop->backend_fd, &lfields->iou, 64, UV__IORING_SETUP_SQPOLL);
-  uv__iou_init(loop->backend_fd, &lfields->ctl, 256, 0);
-
   return 0;
 }
 
@@ -559,8 +226,6 @@ int uv__io_fork(uv_loop_t* loop) {
 
   uv__close(loop->backend_fd);
   loop->backend_fd = -1;
-
-  /* TODO(bnoordhuis) Loses items from the submission and completion rings. */
   uv__platform_loop_delete(loop);
 
   err = uv__platform_loop_init(loop);
@@ -572,62 +237,42 @@ int uv__io_fork(uv_loop_t* loop) {
 
 
 void uv__platform_loop_delete(uv_loop_t* loop) {
-  uv__loop_internal_fields_t* lfields;
-
-  lfields = uv__get_internal_fields(loop);
-  uv__iou_delete(&lfields->ctl);
-  uv__iou_delete(&lfields->iou);
-
-  if (loop->inotify_fd != -1) {
-    uv__io_stop(loop, &loop->inotify_read_watcher, POLLIN);
-    uv__close(loop->inotify_fd);
-    loop->inotify_fd = -1;
-  }
+  if (loop->inotify_fd == -1) return;
+  uv__io_stop(loop, &loop->inotify_read_watcher, POLLIN);
+  uv__close(loop->inotify_fd);
+  loop->inotify_fd = -1;
 }
 
 
-struct uv__invalidate {
-  struct epoll_event (*prep)[256];
-  struct epoll_event* events;
-  int nfds;
-};
-
-
 void uv__platform_invalidate_fd(uv_loop_t* loop, int fd) {
-  uv__loop_internal_fields_t* lfields;
-  struct uv__invalidate* inv;
+  struct epoll_event* events;
   struct epoll_event dummy;
-  int i;
+  uintptr_t i;
+  uintptr_t nfds;
 
-  lfields = uv__get_internal_fields(loop);
-  inv = lfields->inv;
+  assert(loop->watchers != NULL);
+  assert(fd >= 0);
 
-  /* Invalidate events with same file descriptor */
-  if (inv != NULL)
-    for (i = 0; i < inv->nfds; i++)
-      if (inv->events[i].data.fd == fd)
-        inv->events[i].data.fd = -1;
+  events = (struct epoll_event*) loop->watchers[loop->nwatchers];
+  nfds = (uintptr_t) loop->watchers[loop->nwatchers + 1];
+  if (events != NULL)
+    /* Invalidate events with same file descriptor */
+    for (i = 0; i < nfds; i++)
+      if (events[i].data.fd == fd)
+        events[i].data.fd = -1;
 
   /* Remove the file descriptor from the epoll.
    * This avoids a problem where the same file description remains open
    * in another process, causing repeated junk epoll events.
    *
    * We pass in a dummy epoll_event, to work around a bug in old kernels.
-   *
-   * Work around a bug in kernels 3.10 to 3.19 where passing a struct that
-   * has the EPOLLWAKEUP flag set generates spurious audit syslog warnings.
    */
-  memset(&dummy, 0, sizeof(dummy));
-
-  if (inv == NULL) {
+  if (loop->backend_fd >= 0) {
+    /* Work around a bug in kernels 3.10 to 3.19 where passing a struct that
+     * has the EPOLLWAKEUP flag set generates spurious audit syslog warnings.
+     */
+    memset(&dummy, 0, sizeof(dummy));
     epoll_ctl(loop->backend_fd, EPOLL_CTL_DEL, fd, &dummy);
-  } else {
-    uv__epoll_ctl_prep(loop->backend_fd,
-                       &lfields->ctl,
-                       inv->prep,
-                       EPOLL_CTL_DEL,
-                       fd,
-                       &dummy);
   }
 }
 
@@ -653,454 +298,27 @@ int uv__io_check_fd(uv_loop_t* loop, int fd) {
 }
 
 
-/* Caller must initialize SQE and call uv__iou_submit(). */
-static struct uv__io_uring_sqe* uv__iou_get_sqe(struct uv__iou* iou,
-                                                uv_loop_t* loop,
-                                                uv_fs_t* req) {
-  struct uv__io_uring_sqe* sqe;
-  uint32_t head;
-  uint32_t tail;
-  uint32_t mask;
-  uint32_t slot;
-
-  if (iou->ringfd == -1)
-    return NULL;
-
-  head = atomic_load_explicit((_Atomic uint32_t*) iou->sqhead,
-                              memory_order_acquire);
-  tail = *iou->sqtail;
-  mask = iou->sqmask;
-
-  if ((head & mask) == ((tail + 1) & mask))
-    return NULL;  /* No room in ring buffer. TODO(bnoordhuis) maybe flush it? */
-
-  slot = tail & mask;
-  sqe = iou->sqe;
-  sqe = &sqe[slot];
-  memset(sqe, 0, sizeof(*sqe));
-  sqe->user_data = (uintptr_t) req;
-
-  /* Pacify uv_cancel(). */
-  req->work_req.loop = loop;
-  req->work_req.work = NULL;
-  req->work_req.done = NULL;
-  QUEUE_INIT(&req->work_req.wq);
-
-  uv__req_register(loop, req);
-  iou->in_flight++;
-
-  return sqe;
-}
-
-
-static void uv__iou_submit(struct uv__iou* iou) {
-  uint32_t flags;
-
-  atomic_store_explicit((_Atomic uint32_t*) iou->sqtail,
-                        *iou->sqtail + 1,
-                        memory_order_release);
-
-  flags = atomic_load_explicit((_Atomic uint32_t*) iou->sqflags,
-                               memory_order_acquire);
-
-  if (flags & UV__IORING_SQ_NEED_WAKEUP)
-    if (uv__io_uring_enter(iou->ringfd, 0, 0, UV__IORING_ENTER_SQ_WAKEUP))
-      if (errno != EOWNERDEAD)  /* Kernel bug. Harmless, ignore. */
-        perror("libuv: io_uring_enter(wakeup)");  /* Can't happen. */
-}
-
-
-int uv__iou_fs_close(uv_loop_t* loop, uv_fs_t* req) {
-  struct uv__io_uring_sqe* sqe;
-  struct uv__iou* iou;
-
-  iou = &uv__get_internal_fields(loop)->iou;
-
-  sqe = uv__iou_get_sqe(iou, loop, req);
-  if (sqe == NULL)
-    return 0;
-
-  sqe->fd = req->file;
-  sqe->opcode = UV__IORING_OP_CLOSE;
-
-  uv__iou_submit(iou);
-
-  return 1;
-}
-
-
-int uv__iou_fs_fsync_or_fdatasync(uv_loop_t* loop,
-                                  uv_fs_t* req,
-                                  uint32_t fsync_flags) {
-  struct uv__io_uring_sqe* sqe;
-  struct uv__iou* iou;
-
-  iou = &uv__get_internal_fields(loop)->iou;
-
-  sqe = uv__iou_get_sqe(iou, loop, req);
-  if (sqe == NULL)
-    return 0;
-
-  /* Little known fact: setting seq->off and seq->len turns
-   * it into an asynchronous sync_file_range() operation.
-   */
-  sqe->fd = req->file;
-  sqe->fsync_flags = fsync_flags;
-  sqe->opcode = UV__IORING_OP_FSYNC;
-
-  uv__iou_submit(iou);
-
-  return 1;
-}
-
-
-int uv__iou_fs_open(uv_loop_t* loop, uv_fs_t* req) {
-  struct uv__io_uring_sqe* sqe;
-  struct uv__iou* iou;
-
-  iou = &uv__get_internal_fields(loop)->iou;
-
-  sqe = uv__iou_get_sqe(iou, loop, req);
-  if (sqe == NULL)
-    return 0;
-
-  sqe->addr = (uintptr_t) req->path;
-  sqe->fd = AT_FDCWD;
-  sqe->len = req->mode;
-  sqe->opcode = UV__IORING_OP_OPENAT;
-  sqe->open_flags = req->flags | O_CLOEXEC;
-
-  uv__iou_submit(iou);
-
-  return 1;
-}
-
-
-int uv__iou_fs_read_or_write(uv_loop_t* loop,
-                             uv_fs_t* req,
-                             int is_read) {
-  struct uv__io_uring_sqe* sqe;
-  struct uv__iou* iou;
-
-  /* For the moment, if iovcnt is greater than IOV_MAX, fallback to the
-   * threadpool. In the future we might take advantage of IOSQE_IO_LINK. */
-  if (req->nbufs > IOV_MAX)
-    return 0;
-
-  iou = &uv__get_internal_fields(loop)->iou;
-
-  sqe = uv__iou_get_sqe(iou, loop, req);
-  if (sqe == NULL)
-    return 0;
-
-  sqe->addr = (uintptr_t) req->bufs;
-  sqe->fd = req->file;
-  sqe->len = req->nbufs;
-  sqe->off = req->off < 0 ? -1 : req->off;
-  sqe->opcode = is_read ? UV__IORING_OP_READV : UV__IORING_OP_WRITEV;
-
-  uv__iou_submit(iou);
-
-  return 1;
-}
-
-
-int uv__iou_fs_statx(uv_loop_t* loop,
-                     uv_fs_t* req,
-                     int is_fstat,
-                     int is_lstat) {
-  struct uv__io_uring_sqe* sqe;
-  struct uv__statx* statxbuf;
-  struct uv__iou* iou;
-
-  statxbuf = uv__malloc(sizeof(*statxbuf));
-  if (statxbuf == NULL)
-    return 0;
-
-  iou = &uv__get_internal_fields(loop)->iou;
-
-  sqe = uv__iou_get_sqe(iou, loop, req);
-  if (sqe == NULL) {
-    uv__free(statxbuf);
-    return 0;
-  }
-
-  req->ptr = statxbuf;
-
-  sqe->addr = (uintptr_t) req->path;
-  sqe->addr2 = (uintptr_t) statxbuf;
-  sqe->fd = AT_FDCWD;
-  sqe->len = 0xFFF; /* STATX_BASIC_STATS + STATX_BTIME */
-  sqe->opcode = UV__IORING_OP_STATX;
-
-  if (is_fstat) {
-    sqe->addr = (uintptr_t) "";
-    sqe->fd = req->file;
-    sqe->statx_flags |= 0x1000; /* AT_EMPTY_PATH */
-  }
-
-  if (is_lstat)
-    sqe->statx_flags |= AT_SYMLINK_NOFOLLOW;
-
-  uv__iou_submit(iou);
-
-  return 1;
-}
-
-
-void uv__statx_to_stat(const struct uv__statx* statxbuf, uv_stat_t* buf) {
-  buf->st_dev = makedev(statxbuf->stx_dev_major, statxbuf->stx_dev_minor);
-  buf->st_mode = statxbuf->stx_mode;
-  buf->st_nlink = statxbuf->stx_nlink;
-  buf->st_uid = statxbuf->stx_uid;
-  buf->st_gid = statxbuf->stx_gid;
-  buf->st_rdev = makedev(statxbuf->stx_rdev_major, statxbuf->stx_rdev_minor);
-  buf->st_ino = statxbuf->stx_ino;
-  buf->st_size = statxbuf->stx_size;
-  buf->st_blksize = statxbuf->stx_blksize;
-  buf->st_blocks = statxbuf->stx_blocks;
-  buf->st_atim.tv_sec = statxbuf->stx_atime.tv_sec;
-  buf->st_atim.tv_nsec = statxbuf->stx_atime.tv_nsec;
-  buf->st_mtim.tv_sec = statxbuf->stx_mtime.tv_sec;
-  buf->st_mtim.tv_nsec = statxbuf->stx_mtime.tv_nsec;
-  buf->st_ctim.tv_sec = statxbuf->stx_ctime.tv_sec;
-  buf->st_ctim.tv_nsec = statxbuf->stx_ctime.tv_nsec;
-  buf->st_birthtim.tv_sec = statxbuf->stx_btime.tv_sec;
-  buf->st_birthtim.tv_nsec = statxbuf->stx_btime.tv_nsec;
-  buf->st_flags = 0;
-  buf->st_gen = 0;
-}
-
-
-static void uv__iou_fs_statx_post(uv_fs_t* req) {
-  struct uv__statx* statxbuf;
-  uv_stat_t* buf;
-
-  buf = &req->statbuf;
-  statxbuf = req->ptr;
-  req->ptr = NULL;
-
-  if (req->result == 0) {
-    uv__msan_unpoison(statxbuf, sizeof(*statxbuf));
-    uv__statx_to_stat(statxbuf, buf);
-    req->ptr = buf;
-  }
-
-  uv__free(statxbuf);
-}
-
-
-static void uv__poll_io_uring(uv_loop_t* loop, struct uv__iou* iou) {
-  struct uv__io_uring_cqe* cqe;
-  struct uv__io_uring_cqe* e;
-  uv_fs_t* req;
-  uint32_t head;
-  uint32_t tail;
-  uint32_t mask;
-  uint32_t i;
-  uint32_t flags;
-  int nevents;
-  int rc;
-
-  head = *iou->cqhead;
-  tail = atomic_load_explicit((_Atomic uint32_t*) iou->cqtail,
-                              memory_order_acquire);
-  mask = iou->cqmask;
-  cqe = iou->cqe;
-  nevents = 0;
-
-  for (i = head; i != tail; i++) {
-    e = &cqe[i & mask];
-
-    req = (uv_fs_t*) (uintptr_t) e->user_data;
-    assert(req->type == UV_FS);
-
-    uv__req_unregister(loop, req);
-    iou->in_flight--;
-
-    /* io_uring stores error codes as negative numbers, same as libuv. */
-    req->result = e->res;
-
-    switch (req->fs_type) {
-      case UV_FS_FSTAT:
-      case UV_FS_LSTAT:
-      case UV_FS_STAT:
-        uv__iou_fs_statx_post(req);
-        break;
-      default:  /* Squelch -Wswitch warnings. */
-        break;
-    }
-
-    uv__metrics_update_idle_time(loop);
-    req->cb(req);
-    nevents++;
-  }
-
-  atomic_store_explicit((_Atomic uint32_t*) iou->cqhead,
-                        tail,
-                        memory_order_release);
-
-  /* Check whether CQE's overflowed, if so enter the kernel to make them
-   * available. Don't grab them immediately but in the next loop iteration to
-   * avoid loop starvation. */
-  flags = atomic_load_explicit((_Atomic uint32_t*) iou->sqflags,
-                               memory_order_acquire);
-
-  if (flags & UV__IORING_SQ_CQ_OVERFLOW) {
-    do
-      rc = uv__io_uring_enter(iou->ringfd, 0, 0, UV__IORING_ENTER_GETEVENTS);
-    while (rc == -1 && errno == EINTR);
-
-    if (rc < 0)
-      perror("libuv: io_uring_enter(getevents)");  /* Can't happen. */
-  }
-
-  uv__metrics_inc_events(loop, nevents);
-  if (uv__get_internal_fields(loop)->current_timeout == 0)
-    uv__metrics_inc_events_waiting(loop, nevents);
-}
-
-
-static void uv__epoll_ctl_prep(int epollfd,
-                               struct uv__iou* ctl,
-                               struct epoll_event (*events)[256],
-                               int op,
-                               int fd,
-                               struct epoll_event* e) {
-  struct uv__io_uring_sqe* sqe;
-  struct epoll_event* pe;
-  uint32_t mask;
-  uint32_t slot;
-
-  if (ctl->ringfd == -1) {
-    if (!epoll_ctl(epollfd, op, fd, e))
-      return;
-
-    if (op == EPOLL_CTL_DEL)
-      return;  /* Ignore errors, may be racing with another thread. */
-
-    if (op != EPOLL_CTL_ADD)
-      abort();
-
-    if (errno != EEXIST)
-      abort();
-
-    /* File descriptor that's been watched before, update event mask. */
-    if (!epoll_ctl(epollfd, EPOLL_CTL_MOD, fd, e))
-      return;
-
-    abort();
-  } else {
-    mask = ctl->sqmask;
-    slot = (*ctl->sqtail)++ & mask;
-
-    pe = &(*events)[slot];
-    *pe = *e;
-
-    sqe = ctl->sqe;
-    sqe = &sqe[slot];
-
-    memset(sqe, 0, sizeof(*sqe));
-    sqe->addr = (uintptr_t) pe;
-    sqe->fd = epollfd;
-    sqe->len = op;
-    sqe->off = fd;
-    sqe->opcode = UV__IORING_OP_EPOLL_CTL;
-    sqe->user_data = op | slot << 2 | (int64_t) fd << 32;
-
-    if ((*ctl->sqhead & mask) == (*ctl->sqtail & mask))
-      uv__epoll_ctl_flush(epollfd, ctl, events);
-  }
-}
-
-
-static void uv__epoll_ctl_flush(int epollfd,
-                                struct uv__iou* ctl,
-                                struct epoll_event (*events)[256]) {
-  struct epoll_event oldevents[256];
-  struct uv__io_uring_cqe* cqe;
-  uint32_t oldslot;
-  uint32_t slot;
-  uint32_t n;
-  int fd;
-  int op;
-  int rc;
-
-  STATIC_ASSERT(sizeof(oldevents) == sizeof(*events));
-  assert(ctl->ringfd != -1);
-  assert(*ctl->sqhead != *ctl->sqtail);
-
-  n = *ctl->sqtail - *ctl->sqhead;
-  do
-    rc = uv__io_uring_enter(ctl->ringfd, n, n, UV__IORING_ENTER_GETEVENTS);
-  while (rc == -1 && errno == EINTR);
-
-  if (rc < 0)
-    perror("libuv: io_uring_enter(getevents)");  /* Can't happen. */
-
-  if (rc != (int) n)
-    abort();
-
-  assert(*ctl->sqhead == *ctl->sqtail);
-
-  memcpy(oldevents, *events, sizeof(*events));
-
-  /* Failed submissions are either EPOLL_CTL_DEL commands for file descriptors
-   * that have been closed, or EPOLL_CTL_ADD commands for file descriptors
-   * that we are already watching. Ignore the former and retry the latter
-   * with EPOLL_CTL_MOD.
-   */
-  while (*ctl->cqhead != *ctl->cqtail) {
-    slot = (*ctl->cqhead)++ & ctl->cqmask;
-
-    cqe = ctl->cqe;
-    cqe = &cqe[slot];
-
-    if (cqe->res == 0)
-      continue;
-
-    fd = cqe->user_data >> 32;
-    op = 3 & cqe->user_data;
-    oldslot = 255 & (cqe->user_data >> 2);
-
-    if (op == EPOLL_CTL_DEL)
-      continue;
-
-    if (op != EPOLL_CTL_ADD)
-      abort();
-
-    if (cqe->res != -EEXIST)
-      abort();
-
-    uv__epoll_ctl_prep(epollfd,
-                       ctl,
-                       events,
-                       EPOLL_CTL_MOD,
-                       fd,
-                       &oldevents[oldslot]);
-  }
-}
-
-
 void uv__io_poll(uv_loop_t* loop, int timeout) {
-  uv__loop_internal_fields_t* lfields;
+  /* A bug in kernels < 2.6.37 makes timeouts larger than ~30 minutes
+   * effectively infinite on 32 bits architectures.  To avoid blocking
+   * indefinitely, we cap the timeout and poll again if necessary.
+   *
+   * Note that "30 minutes" is a simplification because it depends on
+   * the value of CONFIG_HZ.  The magic constant assumes CONFIG_HZ=1200,
+   * that being the largest value I have seen in the wild (and only once.)
+   */
+  static const int max_safe_timeout = 1789569;
   struct epoll_event events[1024];
-  struct epoll_event prep[256];
-  struct uv__invalidate inv;
   struct epoll_event* pe;
   struct epoll_event e;
-  struct uv__iou* ctl;
-  struct uv__iou* iou;
   int real_timeout;
   QUEUE* q;
   uv__io_t* w;
   sigset_t* sigmask;
   sigset_t sigset;
   uint64_t base;
-  int have_iou_events;
   int have_signals;
   int nevents;
-  int epollfd;
   int count;
   int nfds;
   int fd;
@@ -1109,9 +327,47 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
   int user_timeout;
   int reset_timeout;
 
-  lfields = uv__get_internal_fields(loop);
-  ctl = &lfields->ctl;
-  iou = &lfields->iou;
+  if (loop->nfds == 0) {
+    assert(QUEUE_EMPTY(&loop->watcher_queue));
+    return;
+  }
+
+  memset(&e, 0, sizeof(e));
+
+  while (!QUEUE_EMPTY(&loop->watcher_queue)) {
+    q = QUEUE_HEAD(&loop->watcher_queue);
+    QUEUE_REMOVE(q);
+    QUEUE_INIT(q);
+
+    w = QUEUE_DATA(q, uv__io_t, watcher_queue);
+    assert(w->pevents != 0);
+    assert(w->fd >= 0);
+    assert(w->fd < (int) loop->nwatchers);
+
+    e.events = w->pevents;
+    e.data.fd = w->fd;
+
+    if (w->events == 0)
+      op = EPOLL_CTL_ADD;
+    else
+      op = EPOLL_CTL_MOD;
+
+    /* XXX Future optimization: do EPOLL_CTL_MOD lazily if we stop watching
+     * events, skip the syscall and squelch the events after epoll_wait().
+     */
+    if (epoll_ctl(loop->backend_fd, op, w->fd, &e)) {
+      if (errno != EEXIST)
+        abort();
+
+      assert(op == EPOLL_CTL_ADD);
+
+      /* We've reactivated a file descriptor that's been watched before. */
+      if (epoll_ctl(loop->backend_fd, EPOLL_CTL_MOD, w->fd, &e))
+        abort();
+    }
+
+    w->events = w->pevents;
+  }
 
   sigmask = NULL;
   if (loop->flags & UV_LOOP_BLOCK_SIGPROF) {
@@ -1125,7 +381,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
   count = 48; /* Benchmarks suggest this gives the best throughput. */
   real_timeout = timeout;
 
-  if (lfields->flags & UV_METRICS_IDLE_TIME) {
+  if (uv__get_internal_fields(loop)->flags & UV_METRICS_IDLE_TIME) {
     reset_timeout = 1;
     user_timeout = timeout;
     timeout = 0;
@@ -1134,56 +390,24 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
     user_timeout = 0;
   }
 
-  epollfd = loop->backend_fd;
-
-  memset(&e, 0, sizeof(e));
-
-  while (!QUEUE_EMPTY(&loop->watcher_queue)) {
-    q = QUEUE_HEAD(&loop->watcher_queue);
-    w = QUEUE_DATA(q, uv__io_t, watcher_queue);
-    QUEUE_REMOVE(q);
-    QUEUE_INIT(q);
-
-    op = EPOLL_CTL_MOD;
-    if (w->events == 0)
-      op = EPOLL_CTL_ADD;
-
-    w->events = w->pevents;
-    e.events = w->pevents;
-    e.data.fd = w->fd;
-
-    uv__epoll_ctl_prep(epollfd, ctl, &prep, op, w->fd, &e);
-  }
-
-  inv.events = events;
-  inv.prep = &prep;
-  inv.nfds = -1;
-
   for (;;) {
-    if (loop->nfds == 0)
-      if (iou->in_flight == 0)
-        break;
-
-    /* All event mask mutations should be visible to the kernel before
-     * we enter epoll_pwait().
-     */
-    if (ctl->ringfd != -1)
-      while (*ctl->sqhead != *ctl->sqtail)
-        uv__epoll_ctl_flush(epollfd, ctl, &prep);
-
     /* Only need to set the provider_entry_time if timeout != 0. The function
      * will return early if the loop isn't configured with UV_METRICS_IDLE_TIME.
      */
     if (timeout != 0)
       uv__metrics_set_provider_entry_time(loop);
 
-    /* Store the current timeout in a location that's globally accessible so
-     * other locations like uv__work_done() can determine whether the queue
-     * of events in the callback were waiting when poll was called.
+    /* See the comment for max_safe_timeout for an explanation of why
+     * this is necessary.  Executive summary: kernel bug workaround.
      */
-    lfields->current_timeout = timeout;
+    if (sizeof(int32_t) == sizeof(long) && timeout >= max_safe_timeout)
+      timeout = max_safe_timeout;
 
-    nfds = epoll_pwait(epollfd, events, ARRAY_SIZE(events), timeout, sigmask);
+    nfds = epoll_pwait(loop->backend_fd,
+                       events,
+                       ARRAY_SIZE(events),
+                       timeout,
+                       sigmask);
 
     /* Update loop->time unconditionally. It's tempting to skip the update when
      * timeout == 0 (i.e. non-blocking poll) but there is no guarantee that the
@@ -1203,7 +427,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
         continue;
 
       if (timeout == 0)
-        break;
+        return;
 
       /* We may have been inside the system call for longer than |timeout|
        * milliseconds so we need to update the timestamp to avoid drift.
@@ -1224,18 +448,27 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
         continue;
 
       if (timeout == 0)
-        break;
+        return;
 
       /* Interrupted by a signal. Update timeout and poll again. */
       goto update_timeout;
     }
 
-    have_iou_events = 0;
     have_signals = 0;
     nevents = 0;
 
-    inv.nfds = nfds;
-    lfields->inv = &inv;
+    {
+      /* Squelch a -Waddress-of-packed-member warning with gcc >= 9. */
+      union {
+        struct epoll_event* events;
+        uv__io_t* watchers;
+      } x;
+
+      x.events = events;
+      assert(loop->watchers != NULL);
+      loop->watchers[loop->nwatchers] = x.watchers;
+      loop->watchers[loop->nwatchers + 1] = (void*) (uintptr_t) nfds;
+    }
 
     for (i = 0; i < nfds; i++) {
       pe = events + i;
@@ -1245,12 +478,6 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
       if (fd == -1)
         continue;
 
-      if (fd == iou->ringfd) {
-        uv__poll_io_uring(loop, iou);
-        have_iou_events = 1;
-        continue;
-      }
-
       assert(fd >= 0);
       assert((unsigned) fd < loop->nwatchers);
 
@@ -1262,7 +489,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
          * Ignore all errors because we may be racing with another thread
          * when the file descriptor is closed.
          */
-        uv__epoll_ctl_prep(epollfd, ctl, &prep, EPOLL_CTL_DEL, fd, pe);
+        epoll_ctl(loop->backend_fd, EPOLL_CTL_DEL, fd, pe);
         continue;
       }
 
@@ -1319,13 +546,11 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
       loop->signal_io_watcher.cb(loop, &loop->signal_io_watcher, POLLIN);
     }
 
-    lfields->inv = NULL;
-
-    if (have_iou_events != 0)
-      break;  /* Event loop should cycle now so don't poll again. */
+    loop->watchers[loop->nwatchers] = NULL;
+    loop->watchers[loop->nwatchers + 1] = NULL;
 
     if (have_signals != 0)
-      break;  /* Event loop should cycle now so don't poll again. */
+      return;  /* Event loop should cycle now so don't poll again. */
 
     if (nevents != 0) {
       if (nfds == ARRAY_SIZE(events) && --count != 0) {
@@ -1333,11 +558,11 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
         timeout = 0;
         continue;
       }
-      break;
+      return;
     }
 
     if (timeout == 0)
-      break;
+      return;
 
     if (timeout == -1)
       continue;
@@ -1347,14 +572,10 @@ update_timeout:
 
     real_timeout -= (loop->time - base);
     if (real_timeout <= 0)
-      break;
+      return;
 
     timeout = real_timeout;
   }
-
-  if (ctl->ringfd != -1)
-    while (*ctl->sqhead != *ctl->sqtail)
-      uv__epoll_ctl_flush(epollfd, ctl, &prep);
 }
 
 uint64_t uv__hrtime(uv_clocktype_t type) {
@@ -1867,7 +1088,7 @@ static uint64_t uv__read_uint64(const char* filename) {
   if (0 == uv__slurp(filename, buf, sizeof(buf)))
     if (1 != sscanf(buf, "%" PRIu64, &rc))
       if (0 == strcmp(buf, "max\n"))
-        rc = UINT64_MAX;
+        rc = ~0ull;
 
   return rc;
 }
@@ -1903,7 +1124,6 @@ static void uv__get_cgroup1_memory_limits(char buf[static 1024], uint64_t* high,
   char filename[4097];
   char* p;
   int n;
-  uint64_t cgroup1_max;
 
   /* Find out where the controller is mounted. */
   p = uv__cgroup1_find_memory_controller(buf, &n);
@@ -1920,22 +1140,12 @@ static void uv__get_cgroup1_memory_limits(char buf[static 1024], uint64_t* high,
      * as indicated by uv__read_uint64 returning 0.
      */
      if (*high != 0 && *max != 0)
-       goto update_limits;
+       return;
   }
 
   /* Fall back to the limits of the global memory controller. */
   *high = uv__read_uint64("/sys/fs/cgroup/memory/memory.soft_limit_in_bytes");
   *max = uv__read_uint64("/sys/fs/cgroup/memory/memory.limit_in_bytes");
-
-  /* uv__read_uint64 detects cgroup2's "max", so we need to separately detect
-   * cgroup1's maximum value (which is derived from LONG_MAX and PAGE_SIZE).
-   */
-update_limits:
-  cgroup1_max = LONG_MAX & ~(sysconf(_SC_PAGESIZE) - 1);
-  if (*high == cgroup1_max)
-    *high = UINT64_MAX;
-  if (*max == cgroup1_max)
-    *max = UINT64_MAX;
 }
 
 static void uv__get_cgroup2_memory_limits(char buf[static 1024], uint64_t* high,
diff --git a/deps/uv/src/unix/os390.c b/deps/uv/src/unix/os390.c
index a87c2d77faf..3954b2c2753 100644
--- a/deps/uv/src/unix/os390.c
+++ b/deps/uv/src/unix/os390.c
@@ -808,7 +808,6 @@ static int os390_message_queue_handler(uv__os390_epoll* ep) {
 
 void uv__io_poll(uv_loop_t* loop, int timeout) {
   static const int max_safe_timeout = 1789569;
-  uv__loop_internal_fields_t* lfields;
   struct epoll_event events[1024];
   struct epoll_event* pe;
   struct epoll_event e;
@@ -831,8 +830,6 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
     return;
   }
 
-  lfields = uv__get_internal_fields(loop);
-
   while (!QUEUE_EMPTY(&loop->watcher_queue)) {
     uv_stream_t* stream;
 
@@ -880,7 +877,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
   int nevents = 0;
   have_signals = 0;
 
-  if (lfields->flags & UV_METRICS_IDLE_TIME) {
+  if (uv__get_internal_fields(loop)->flags & UV_METRICS_IDLE_TIME) {
     reset_timeout = 1;
     user_timeout = timeout;
     timeout = 0;
@@ -899,12 +896,6 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
     if (sizeof(int32_t) == sizeof(long) && timeout >= max_safe_timeout)
       timeout = max_safe_timeout;
 
-    /* Store the current timeout in a location that's globally accessible so
-     * other locations like uv__work_done() can determine whether the queue
-     * of events in the callback were waiting when poll was called.
-     */
-    lfields->current_timeout = timeout;
-
     nfds = epoll_wait(loop->ep, events,
                       ARRAY_SIZE(events), timeout);
 
diff --git a/deps/uv/src/unix/posix-poll.c b/deps/uv/src/unix/posix-poll.c
index 7e7de86845d..711780ece8d 100644
--- a/deps/uv/src/unix/posix-poll.c
+++ b/deps/uv/src/unix/posix-poll.c
@@ -132,7 +132,6 @@ static void uv__pollfds_del(uv_loop_t* loop, int fd) {
 
 
 void uv__io_poll(uv_loop_t* loop, int timeout) {
-  uv__loop_internal_fields_t* lfields;
   sigset_t* pset;
   sigset_t set;
   uint64_t time_base;
@@ -153,8 +152,6 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
     return;
   }
 
-  lfields = uv__get_internal_fields(loop);
-
   /* Take queued watchers and add their fds to our poll fds array.  */
   while (!QUEUE_EMPTY(&loop->watcher_queue)) {
     q = QUEUE_HEAD(&loop->watcher_queue);
@@ -182,7 +179,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
   assert(timeout >= -1);
   time_base = loop->time;
 
-  if (lfields->flags & UV_METRICS_IDLE_TIME) {
+  if (uv__get_internal_fields(loop)->flags & UV_METRICS_IDLE_TIME) {
     reset_timeout = 1;
     user_timeout = timeout;
     timeout = 0;
@@ -201,12 +198,6 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
     if (timeout != 0)
       uv__metrics_set_provider_entry_time(loop);
 
-    /* Store the current timeout in a location that's globally accessible so
-     * other locations like uv__work_done() can determine whether the queue
-     * of events in the callback were waiting when poll was called.
-     */
-    lfields->current_timeout = timeout;
-
     if (pset != NULL)
       if (pthread_sigmask(SIG_BLOCK, pset, NULL))
         abort();
diff --git a/deps/uv/src/uv-common.h b/deps/uv/src/uv-common.h
index decde5362c8..2720121addc 100644
--- a/deps/uv/src/uv-common.h
+++ b/deps/uv/src/uv-common.h
@@ -396,37 +396,9 @@ struct uv__loop_metrics_s {
 void uv__metrics_update_idle_time(uv_loop_t* loop);
 void uv__metrics_set_provider_entry_time(uv_loop_t* loop);
 
-#ifdef __linux__
-struct uv__iou {
-  uint32_t* sqhead;
-  uint32_t* sqtail;
-  uint32_t* sqarray;
-  uint32_t sqmask;
-  uint32_t* sqflags;
-  uint32_t* cqhead;
-  uint32_t* cqtail;
-  uint32_t cqmask;
-  void* sq;   /* pointer to munmap() on event loop teardown */
-  void* cqe;  /* pointer to array of struct uv__io_uring_cqe */
-  void* sqe;  /* pointer to array of struct uv__io_uring_sqe */
-  size_t sqlen;
-  size_t cqlen;
-  size_t maxlen;
-  size_t sqelen;
-  int ringfd;
-  uint32_t in_flight;
-};
-#endif  /* __linux__ */
-
 struct uv__loop_internal_fields_s {
   unsigned int flags;
   uv__loop_metrics_t loop_metrics;
-  int current_timeout;
-#ifdef __linux__
-  struct uv__iou ctl;
-  struct uv__iou iou;
-  void* inv;  /* used by uv__platform_invalidate_fd() */
-#endif  /* __linux__ */
 };
 
 #endif /* UV_COMMON_H_ */
diff --git a/deps/uv/src/win/core.c b/deps/uv/src/win/core.c
index 9a3be58849a..e4041ec86a6 100644
--- a/deps/uv/src/win/core.c
+++ b/deps/uv/src/win/core.c
@@ -424,7 +424,6 @@ int uv_backend_timeout(const uv_loop_t* loop) {
 
 
 static void uv__poll_wine(uv_loop_t* loop, DWORD timeout) {
-  uv__loop_internal_fields_t* lfields;
   DWORD bytes;
   ULONG_PTR key;
   OVERLAPPED* overlapped;
@@ -434,10 +433,9 @@ static void uv__poll_wine(uv_loop_t* loop, DWORD timeout) {
   uint64_t user_timeout;
   int reset_timeout;
 
-  lfields = uv__get_internal_fields(loop);
   timeout_time = loop->time + timeout;
 
-  if (lfields->flags & UV_METRICS_IDLE_TIME) {
+  if (uv__get_internal_fields(loop)->flags & UV_METRICS_IDLE_TIME) {
     reset_timeout = 1;
     user_timeout = timeout;
     timeout = 0;
@@ -452,12 +450,6 @@ static void uv__poll_wine(uv_loop_t* loop, DWORD timeout) {
     if (timeout != 0)
       uv__metrics_set_provider_entry_time(loop);
 
-    /* Store the current timeout in a location that's globally accessible so
-     * other locations like uv__work_done() can determine whether the queue
-     * of events in the callback were waiting when poll was called.
-     */
-    lfields->current_timeout = timeout;
-
     GetQueuedCompletionStatus(loop->iocp,
                               &bytes,
                               &key,
@@ -515,7 +507,6 @@ static void uv__poll_wine(uv_loop_t* loop, DWORD timeout) {
 
 
 static void uv__poll(uv_loop_t* loop, DWORD timeout) {
-  uv__loop_internal_fields_t* lfields;
   BOOL success;
   uv_req_t* req;
   OVERLAPPED_ENTRY overlappeds[128];
@@ -527,10 +518,9 @@ static void uv__poll(uv_loop_t* loop, DWORD timeout) {
   uint64_t actual_timeout;
   int reset_timeout;
 
-  lfields = uv__get_internal_fields(loop);
   timeout_time = loop->time + timeout;
 
-  if (lfields->flags & UV_METRICS_IDLE_TIME) {
+  if (uv__get_internal_fields(loop)->flags & UV_METRICS_IDLE_TIME) {
     reset_timeout = 1;
     user_timeout = timeout;
     timeout = 0;
@@ -547,12 +537,6 @@ static void uv__poll(uv_loop_t* loop, DWORD timeout) {
     if (timeout != 0)
       uv__metrics_set_provider_entry_time(loop);
 
-    /* Store the current timeout in a location that's globally accessible so
-     * other locations like uv__work_done() can determine whether the queue
-     * of events in the callback were waiting when poll was called.
-     */
-    lfields->current_timeout = timeout;
-
     success = pGetQueuedCompletionStatusEx(loop->iocp,
                                            overlappeds,
                                            ARRAY_SIZE(overlappeds),