Skip to content

Commit

Permalink
linux: disable io_uring on hppa below kernel 6.1.51 (libuv#4224)
Browse files Browse the repository at this point in the history
First kernel with support is 6.1, was only fully functional from .51
onwards: https://lore.kernel.org/all/[email protected]/

Co-authored-by: matoro <[email protected]>
  • Loading branch information
matoro and matoro authored Nov 15, 2023
1 parent 35da5de commit f144429
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/unix/linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,16 @@ static int uv__use_io_uring(void) {
use = atomic_load_explicit(&use_io_uring, memory_order_relaxed);

if (use == 0) {
use = uv__kernel_version() >=
#if defined(__hppa__)
/* io_uring first supported on parisc in 6.1, functional in .51 */
/* https://lore.kernel.org/all/[email protected]/ */
/* 6.1.51 */ 0x060133
#else
/* Older kernels have a bug where the sqpoll thread uses 100% CPU. */
use = uv__kernel_version() >= /* 5.10.186 */ 0x050ABA ? 1 : -1;
/* 5.10.186 */ 0x050ABA
#endif
? 1 : -1;

/* But users can still enable it if they so desire. */
val = getenv("UV_USE_IO_URING");
Expand Down

0 comments on commit f144429

Please sign in to comment.