From 385e58e8a8664d43175f64b8d44900ff651cec0f Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Fri, 15 May 2020 15:07:35 +0200 Subject: [PATCH] cgfsng: use EPOLLPRI when polling cgroup.events EPOLLIN will always be true and therefore end up busy-looping Signed-off-by: Wolfgang Bumiller --- src/lxc/cgroups/cgfsng.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index 7136d27a8..f7af7c0a5 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -2076,7 +2077,7 @@ static int cg_unified_freeze_do(struct cgroup_ops *ops, int timeout, /* automatically cleaned up now */ descr_ptr = &descr; - ret = lxc_mainloop_add_handler(&descr, fd, freezer_cgroup_events_cb, INT_TO_PTR(state_num)); + ret = lxc_mainloop_add_handler_events(&descr, fd, EPOLLPRI, freezer_cgroup_events_cb, INT_TO_PTR(state_num)); if (ret < 0) return log_error_errno(-1, errno, "Failed to add cgroup.events fd handler to mainloop"); } -- 2.47.2