Unverified Commit 0842a465 by Wolfgang Bumiller Committed by Stéphane Graber

cgfsng: use EPOLLPRI when polling cgroup.events

EPOLLIN will always be true and therefore end up busy-looping Signed-off-by: 's avatarWolfgang Bumiller <w.bumiller@proxmox.com>
parent 64df0b2f
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <sys/epoll.h>
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
...@@ -1962,7 +1963,7 @@ static int cg_unified_freeze_do(struct cgroup_ops *ops, int timeout, ...@@ -1962,7 +1963,7 @@ static int cg_unified_freeze_do(struct cgroup_ops *ops, int timeout,
/* automatically cleaned up now */ /* automatically cleaned up now */
descr_ptr = &descr; 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) if (ret < 0)
return log_error_errno(-1, errno, "Failed to add cgroup.events fd handler to mainloop"); return log_error_errno(-1, errno, "Failed to add cgroup.events fd handler to mainloop");
} }
......
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