Commit 08d98365 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

backout gflag for setting mlock rlimit

Summary:
It is not used, it is not namespaced, and this is best set by the supervisor anyway.

Backout of: D24063687 (https://github.com/facebook/folly/commit/d6ed060efe7f9ea291fc78362d7f83c1c197f219).

Differential Revision: D32787797

fbshipit-source-id: 7231741e3f0b7b098fbfc65acb363ed560b20937
parent 7765d9b4
......@@ -113,12 +113,6 @@ void SignalRegistry::setNotifyFd(int sig, int fd) {
} // namespace
static constexpr int64_t kUnlimitedMlock = -1;
DEFINE_int64(
io_uring_mlock_size,
kUnlimitedMlock,
"Maximum bytes to mlock - use 0 for no changes, -1 for unlimited");
namespace {
class SQGroupInfoRegistry {
private:
......@@ -388,22 +382,6 @@ IoUringBackend::IoUringBackend(Options options)
if (timerFd_ < 0) {
throw std::runtime_error("timerfd_create error");
}
FOLLY_MAYBE_UNUSED static bool sMlockInit = []() {
int ret = 0;
if (FLAGS_io_uring_mlock_size) {
struct rlimit rlim;
if (FLAGS_io_uring_mlock_size == kUnlimitedMlock) {
rlim.rlim_cur = RLIM_INFINITY;
rlim.rlim_max = RLIM_INFINITY;
} else {
rlim.rlim_cur = FLAGS_io_uring_mlock_size;
rlim.rlim_max = FLAGS_io_uring_mlock_size;
}
ret = setrlimit(RLIMIT_MEMLOCK, &rlim); // best effort
}
return ret ? false : true;
}();
::memset(&ioRing_, 0, sizeof(ioRing_));
::memset(&params_, 0, sizeof(params_));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment