[CRIU] [PATCH 2/4] lazy-pages: make epollfd part of global daemon state

Mike Rapoport rppt at linux.vnet.ibm.com
Wed Apr 5 05:28:39 PDT 2017


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 at linux.vnet.ibm.com>
---
 criu/uffd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/criu/uffd.c b/criu/uffd.c
index 021c07b..f8767de 100644
--- a/criu/uffd.c
+++ b/criu/uffd.c
@@ -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;
-- 
1.9.1



More information about the CRIU mailing list