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

liburing zero copy #1273

Merged
merged 11 commits into from
Dec 22, 2023
4 changes: 2 additions & 2 deletions worker/src/DepLibUring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,15 +313,15 @@ DepLibUring::LibUring::LibUring()

if (err < 0)
{
int errno = -err;
int errno = -1 * err;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem here seems the variable name. It's not a good idea using errno as a local variable as the compiler threats it specially (see the compiling errors.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this file is using -err in other places for logging purposes, so this change is generating an inconsistency across the file.

Copy link
Member

@ibc ibc Dec 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes done to make it consistent.


if (errno == ENOMEM)
{
this->zeroCopyEnabled = false;

MS_WARN_TAG(
info,
"io_uring_register_buffers() failed due to low memlock limit (ulimit -l), disabling zero copy",
"io_uring_register_buffers() failed due to low memlock limit (ulimit -l), disabling zero copy: %s",
std::strerror(errno));
}
else
Expand Down