[CRIU] [PATCHv2 0/9] Large pages support for aarch64/ppc64
Mike Rapoport
rppt at linux.vnet.ibm.com
Thu Mar 29 17:20:04 MSK 2018
On Wed, Mar 28, 2018 at 05:19:44PM +0100, Dmitry Safonov wrote:
> v2 Changes:
> o Add patches for global variables in PIEs
> o Simplify ARCH_HAS_LONG_PAGES
> o cache PAGE_SIZE and PAGE_SHIFT values
> (as nitpicked by Mike)
>
> Adrian, I've removed your Tested-by, as the set differs a bit from
> the previous version. Mind to check that everything still works in v2?
>
> TLDR; CRIU doesn't work if:
> on aarch64 it's when PAGE_SIZE!=4K,
> on ppc64 it's when PAGE_SIZE!=64K
>
> Cc: Adrian Reber <areber at redhat.com>
> Cc: Mike Rapoport <rppt at linux.vnet.ibm.com>
>
> Dmitry Safonov (9):
> criu: Remove PAGE_IMAGE_SIZE
> parasite: Rename misnamed nr_pages
> criu/dump: Fix size of personality buffer
> criu/log: Define log buffer length without PAGE_SIZE
> criu/proc: Define BUF_SIZE without PAGE_SIZE dependency
There's one more [PAGE_SIZE] array in mem.c:
>From 0a0a1418900677820a5396b9f58352368122a784 Mon Sep 17 00:00:00 2001
From: Mike Rapoport <rppt at linux.vnet.ibm.com>
Date: Thu, 29 Mar 2018 17:13:26 +0300
Subject: [CRIU][PATCH 5.5/9] criu/mem: use alloca() to allocate the buffer for
page-read
For variable PAGE_SIZE using alloca() is better than variable length array
and the actual effect will be the same.
Signed-off-by: Mike Rapoport <rppt at linux.vnet.ibm.com>
---
criu/mem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/criu/mem.c b/criu/mem.c
index 9ee5029..14b22b5 100644
--- a/criu/mem.c
+++ b/criu/mem.c
@@ -907,6 +907,7 @@ static int restore_priv_vma_content(struct pstree_item *t, struct page_read *pr)
int ret = 0;
struct list_head *vmas = &rsti(t)->vmas.h;
struct list_head *vma_io = &rsti(t)->vma_io;
+ unsigned char *buf = alloca(PAGE_SIZE);
unsigned int nr_restored = 0;
unsigned int nr_shared = 0;
@@ -948,7 +949,6 @@ static int restore_priv_vma_content(struct pstree_item *t, struct page_read *pr)
}
for (i = 0; i < nr_pages; i++) {
- unsigned char buf[PAGE_SIZE];
void *p;
/*
--
2.7.4
> make: Compile with -fno-common everything (criu/pie/etc)
> compel: Show descriptive error on common symbols
> compel/criu: Add ARCH_HAS_LONG_PAGES to PIE binaries
> ppc64/aarch64: Dynamically define PAGE_SIZE
>
> Makefile | 1 +
> compel/include/rpc-pie-priv.h | 3 +++
> compel/plugins/std/infect.c | 8 ++++++
> compel/src/lib/handle-elf.c | 8 ++++++
> compel/src/lib/infect.c | 3 +++
> criu/arch/aarch64/crtools.c | 3 +++
> criu/arch/ppc64/crtools.c | 3 +++
> criu/cr-dump.c | 3 ++-
> criu/cr-restore.c | 3 +++
> criu/crtools.c | 1 -
> criu/include/image.h | 5 ----
> criu/include/restorer.h | 3 +++
> criu/log.c | 3 ++-
> criu/pie/parasite.c | 10 ++++----
> criu/pie/restorer.c | 4 +++
> criu/proc_parse.c | 6 ++---
> include/common/arch/aarch64/asm/page.h | 44 ++++++++++++++++++++++++--------
> include/common/arch/ppc64/asm/page.h | 46 +++++++++++++++++++++++-----------
> 18 files changed, 116 insertions(+), 41 deletions(-)
>
> --
> 2.13.6
>
--
Sincerely yours,
Mike.
More information about the CRIU
mailing list