No description
Find a file
Dmitry Safonov e98d16e77d arm: Workaround shmat() page coloring alignment
Please, see incode comment about the issue.
There was an attempt to fix this feature in kernel:
  http://www.spinics.net/lists/arm-kernel/msg258870.html

I'll send a patch for kernel with a correct justification.
Still it's worth to workaround this on older kernels.
mremap() after shmat() makes it possible to C/R shmem between ARMv7 CPUs.
Without it C/R will fail even on the same platform.

That is possible that this workaround changes *restore failure* to
*corruption* in shared memory after restore.
Still, I think it's worth to be applied by the following reasons:
1. All ARMv7 CPUs do not have VIPT aliasing data cache.
   And ARMv6 CPUs may have any, but they are not popular because of UMP.
2. SysV IPC shmem should be writable and SHMLBA unaligned
   (if it's only readable, then it's OK).
3. For the data corruption we need to migrate from non-VIPT cached CPUs
   to VIPT aliasing.
4. As this is shmem migration between platforms - quite likely we have
   it`s copy (in case of whole IPC namespace dump - in images).
5. C/R before on the same CPU may fail (quite likely, more than 50% of
   zdtm/transition/ipc failed while I've test it).

So, I think it's very unlikely that someone uses CRIU to migrate
from ARMv7 to ARMv6 unaligned writable shmem, but if he is - here is
a BIG WARNING on restore.

And after all: we've restored application as it was on checkpoint,
we can't reliably tell that shmem needs align on the target platform,
but we warned on restoring.

I wanted to test the cpuid for VIPT caching firstly, but it's in cp15
coprocessor, which means it's unavailable from userspace. Only one
reliable way to tell is to check couple of first boot lines in dmesg:
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache

Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-04-17 18:39:32 +03:00
compel arm/compel: add generated headers to .gitignore 2017-04-17 18:35:58 +03:00
contrib scripts/install-debian-packages: add libnet-dev 2017-01-16 11:04:49 +03:00
coredump python: specify python2 as .py interpreter 2017-04-17 18:35:58 +03:00
crit python: specify python2 as .py interpreter 2017-04-17 18:35:58 +03:00
criu arm: Workaround shmat() page coloring alignment 2017-04-17 18:39:32 +03:00
Documentation .gitignore: update to recent changes 2017-03-14 21:03:22 +03:00
images crit: Beautify unix names recode 2017-04-11 09:01:11 +03:00
include/common x86/asm: move user code selector values to common 2017-03-15 00:06:17 +03:00
lib python: specify python2 as .py interpreter 2017-04-17 18:35:58 +03:00
scripts python: specify python2 as .py interpreter 2017-04-17 18:35:58 +03:00
soccr soccr: Print errors in send_fin (v2) 2017-04-11 08:59:16 +03:00
test python: specify python2 as .py interpreter 2017-04-17 18:35:58 +03:00
.gitignore .gitignore: remove a leftover 2017-04-02 18:12:10 +03:00
.mailmap repo: Add mailmap file 2012-03-25 23:31:20 +04:00
.travis.yml travis: run tests with asan 2017-04-11 09:00:49 +03:00
COPYING COPYING: fix a typo in a preamble 2016-08-11 16:18:43 +03:00
CREDITS Add the CREDITS file 2012-07-30 13:52:37 +04:00
INSTALL.md Makefile.install: rm unused vars/target 2017-02-06 13:48:49 +03:00
Makefile Makefiles: protect from % rules, don't rebuild 2017-03-15 09:36:08 +03:00
Makefile.compel compel: make plugins .a archives 2017-04-02 18:12:10 +03:00
Makefile.config Makefiles: nuke $(SRC_DIR) 2017-03-15 09:36:08 +03:00
Makefile.install Makefiles: remove @true 2017-03-15 09:36:08 +03:00
Makefile.versions compel: build -- Add @sublevel 2017-03-14 23:58:08 +03:00
README.md Add ascciinema tour on basic criu features. 2016-06-16 16:37:06 +03:00

CRIU (Checkpoint and Restore in Userspace)

An utility to checkpoint/restore tasks. Using this tool, you can freeze a running application (or part of it) and checkpoint it to a hard drive as a collection of files. You can then use the files to restore and run the application from the point it was frozen at. The distinctive feature of the CRIU project is that it is mainly implemented in user space.

The project home is at http://criu.org.

Pages worth starting with are:

A video tour on basic CRIU features

CRIU introduction

How to contribute