Skip to content

linux: disable SQPOLL io_uring by default#4492

Merged
santigimeno merged 1 commit intolibuv:v1.xfrom
santigimeno:santi/use_io_uring_sqpoll
Aug 6, 2024
Merged

linux: disable SQPOLL io_uring by default#4492
santigimeno merged 1 commit intolibuv:v1.xfrom
santigimeno:santi/use_io_uring_sqpoll

Conversation

@santigimeno
Copy link
Copy Markdown
Member

The SQPOLL io_uring instance wasn't providing consistent behaviour to users depending on kernel versions, load shape, ... creating issues difficult to track and fix. Don't use this ring by default but allow enabling it by calling uv_loop_configure() with
UV_LOOP_ENABLE_IO_URING_SQPOLL.
Refs: #4421 (comment)

The SQPOLL io_uring instance wasn't providing consistent behaviour to
users depending on kernel versions, load shape, ... creating issues
difficult to track and fix. Don't use this ring by default but allow
enabling it by calling `uv_loop_configure()` with
`UV_LOOP_ENABLE_IO_URING_SQPOLL`.
@santigimeno santigimeno force-pushed the santi/use_io_uring_sqpoll branch from 4447f50 to 4119567 Compare August 6, 2024 19:54
@santigimeno santigimeno merged commit e78e29c into libuv:v1.x Aug 6, 2024
@santigimeno santigimeno deleted the santi/use_io_uring_sqpoll branch August 6, 2024 20:10
@santigimeno
Copy link
Copy Markdown
Member Author

BTW, in hindsight, Colin's idea, at least for io_uring, wasn't that far fetched.

@ronag
Copy link
Copy Markdown

ronag commented Sep 9, 2024

@santigimeno Is this a problem even on recent Linux kernels?

@santigimeno
Copy link
Copy Markdown
Member Author

@santigimeno Is this a problem even on recent Linux kernels?

I haven't tested, but I don't think it matters. For a general purpose library using SQPOLL by default is most probably not a good idea as there are specific loads that can make the SQPOLL thread never to be idle (#4308 (comment)). So better let the embedder decide when to enable it.

@ronag
Copy link
Copy Markdown

ronag commented Sep 9, 2024

How does the embedder (e.g. Node) know whether or not to enable this?

@bnoordhuis
Copy link
Copy Markdown
Member

You probably don't. Best to leave that up to the user/administrator, through a flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants