From: Wolfgang Bumiller Date: Fri, 15 May 2020 13:07:35 +0000 (+0200) Subject: cgfsng: use EPOLLPRI when polling cgroup.events X-Git-Tag: lxc-5.0.0~435^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=385e58e8a8664d43175f64b8d44900ff651cec0f;p=thirdparty%2Flxc.git cgfsng: use EPOLLPRI when polling cgroup.events EPOLLIN will always be true and therefore end up busy-looping Signed-off-by: Wolfgang Bumiller --- 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"); }