Unverified 提交 a90d0da0 authored 作者: José Luis Millán's avatar José Luis Millán 提交者: GitHub

liburing: print RLIMIT_MEMLOCK values upon ENOMEM (#1331)

liburing: print RLIMIT_MEMLOCK values upon ENOMEM
上级 595bffe1
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "MediaSoupErrors.hpp" #include "MediaSoupErrors.hpp"
#include "Utils.hpp" #include "Utils.hpp"
#include <sys/eventfd.h> #include <sys/eventfd.h>
#include <sys/resource.h>
#include <sys/utsname.h> #include <sys/utsname.h>
/* Static variables. */ /* Static variables. */
...@@ -330,10 +331,25 @@ DepLibUring::LibUring::LibUring() ...@@ -330,10 +331,25 @@ DepLibUring::LibUring::LibUring()
{ {
this->zeroCopyEnabled = false; this->zeroCopyEnabled = false;
MS_WARN_TAG( struct rlimit l = {};
info,
"io_uring_register_buffers() failed due to low memlock limit (ulimit -l), disabling zero copy: %s", if (getrlimit(RLIMIT_MEMLOCK, std::addressof(l)) == -1)
std::strerror(error)); {
MS_WARN_TAG(info, "getrlimit() failed: %s", std::strerror(errno));
MS_WARN_TAG(
info,
"io_uring_register_buffers() failed due to low RLIMIT_MEMLOCK, disabling zero copy: %s",
std::strerror(error));
}
else
{
MS_WARN_TAG(
info,
"io_uring_register_buffers() failed due to low RLIMIT_MEMLOCK (soft:%lu, hard:%lu), disabling zero copy: %s",
l.rlim_cur,
l.rlim_max,
std::strerror(error));
}
} }
else else
{ {
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论