lazy-pages: make epollfd part of global daemon state

We only use one epoll instance to manage lazy-pages related I/O. Making
epollfd file-visible will allow cleaner implementation of the restored
process exit() calls tracking.

Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Mike Rapoport 2017-04-05 15:28:39 +03:00 committed by Andrei Vagin
parent 6b1dbb1e63
commit 4c0d56f4e7

View file

@ -92,9 +92,11 @@ struct lazy_pages_info {
void *buf;
};
/* global lazy-pages daemon state */
static LIST_HEAD(lpis);
static LIST_HEAD(exiting_lpis);
static LIST_HEAD(pending_lpis);
static int epollfd;
static int handle_uffd_event(struct epoll_rfd *lpfd);
@ -1119,7 +1121,6 @@ close_uffd:
int cr_lazy_pages(bool daemon)
{
struct epoll_event *events;
int epollfd;
int nr_fds;
int lazy_sk;
int ret;