Skip to content

Commit

Permalink
cgroup,cleaner: wait on level-triggered transitions
Browse files Browse the repository at this point in the history
The old code used edge-triggered transitions for epoll_wait on the
cgroup.events file, which meant we were losing some events if we weren't
fast enough to process them. This, in turn, caused the unlucky cleaner
processes to hang on an epoll_wait, unable to clean up the unpopulated
cgroup.

With this commit, we now operate on level-triggered transitions, which
allows cleaners to do their jobs properly.
  • Loading branch information
Snaipe committed Feb 6, 2024
1 parent a9ab558 commit b79ab6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ static void run_cleaner_child(int lock, int parentfd, const char *name)
}

struct epoll_event event = {
.events = EPOLLET,
.events = 0,
};

int epollfd = epoll_create1(0);
Expand Down

0 comments on commit b79ab6f

Please sign in to comment.