72332c
From 9457b3169d9c09b4255322c588c59df402fe3196 Mon Sep 17 00:00:00 2001
72332c
From: Dmitry Safonov <dima@arista.com>
72332c
Date: Thu, 10 May 2018 19:14:47 +0100
72332c
Subject: [PATCH 7/8] criu/proc: Define BUF_SIZE without PAGE_SIZE dependency
72332c
72332c
PAGE_SIZE will be a variable value on platforms where it can be
72332c
different due to large pages.
72332c
And looks like (c) there is no reason for BUF_SIZE == PAGE_SIZE,
72332c
so let's keep it as it was, rather than complicating it with dynamic
72332c
allocation for the buffer.
72332c
72332c
Signed-off-by: Dmitry Safonov <dima@arista.com>
72332c
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
72332c
---
72332c
 criu/proc_parse.c | 6 +++---
72332c
 1 file changed, 3 insertions(+), 3 deletions(-)
72332c
72332c
diff --git a/criu/proc_parse.c b/criu/proc_parse.c
72332c
index 27719416a..edc56bb99 100644
72332c
--- a/criu/proc_parse.c
72332c
+++ b/criu/proc_parse.c
72332c
@@ -61,16 +61,16 @@
72332c
 #define SIGEV_THREAD_ID 4       /* deliver to thread */
72332c
 #endif
72332c
 
72332c
+#define BUF_SIZE	4096	/* Good enough value - can be changed */
72332c
+
72332c
 struct buffer {
72332c
-	char buf[PAGE_SIZE];
72332c
+	char buf[BUF_SIZE];
72332c
 	char end; /* '\0' */
72332c
 };
72332c
 
72332c
 static struct buffer __buf;
72332c
 static char *buf = __buf.buf;
72332c
 
72332c
-#define BUF_SIZE sizeof(__buf.buf)
72332c
-
72332c
 /*
72332c
  * This is how AIO ring buffers look like in proc
72332c
  */
72332c
-- 
72332c
2.17.0
72332c