Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New features to support TigerBeetle #2072

Merged
merged 6 commits into from
Oct 7, 2024
Merged

Conversation

francescolavra
Copy link
Member

This change set implements new features that allow running TigerBeetle (https://github.com/tigerbeetle/tigerbeetle) on Nanos:

  • io_uring supports accept, openat, statx, send and recv operations
  • setrlimit() and prlimit64() allow changing the process stack limit
  • file permissions returned by stat() and similar syscalls are retrieved from file metadata

Socket read/write operations can be trigggered asynchronously, e.g.
via io_uring; thus, the context to be associated to the blockq for
a read/write operation may not be the current context; instead,
this context must be retrieved from the closure that is created
when triggering the operation.
In addition, in the blockq_check_timeout() function the
`blocked_on` field of the unix_context struct must be set
regardless of whether the operation is synchronous.
Change the prototype of the accept4, sendto and recvfrom callback
functions in the socket structure (and their implementation in the
network, Unix, netlink and vsock socket types) to take additional
parameters that will allow these functions to be called when
triggering an asynchronous operation (e.g. via io_uring).
This function will be reused when implementing non-read/write
asynchronous operations.
The newly added rlimit_stack field in the process struct holds the
current value of the stack limit.
Instead of hardcoding file permission bits, retrieve them from the
file metadata.
With this change, the execute permission bit is set when the user
program invokes stat() on the executable file; this is required in
order to avoid "BinaryNotMarkedExecutable" errors when running
tigerbeetle (https://github.com/tigerbeetle/tigerbeetle).
@francescolavra francescolavra merged commit d8b0be8 into master Oct 7, 2024
7 checks passed
@francescolavra francescolavra deleted the feature/io_uring branch October 7, 2024 06:30
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.

1 participant