- 14 Mar, 2013 2 commits
-
-
Pavel Emelyanov authored
We'll send them over network soon, so prepare abstraction layer for this. Shmem is not on this scheme yet. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Since now we drain pages out of parasite, we can invent any format for page dumps. Let is be ... prorobuf one! :) Another thing to keep in mind, is that we're about to use splices and implement iterative migration, so it's better to have actual pages be page-aligned in the image. And -- backward compatibility. That said the new format is: 1. pagemap-... file which contains a header (currently with a ID of the image with pages, see below) and an array of <nr_pages:vaddr> pairs. The first value means "how many pages to take from the file with pages (see below)" and the second -- where in the task address space to put them. Simple. 2. pages-... file which containes only pages one by one (thus aligned as we want). This patch breaks backward compatibility (old images with pages wil be restored and then crash). Need to do it before v0.5 release. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 05 Mar, 2013 8 commits
-
-
Andrey Vagin authored
Generate random data only for buffers with sizes less than FAST_SIZE If a size of buffer is more that FAST_SIZE, the first FAST_SIZE bytes are filled by random generator and then this chunk is used as pattern for all other chunks. With out this patch: $ time bash -x test/zdtm.sh static/maps04 real 0m16.777s user 0m0.054s sys 0m0.724s With this patch: $ time bash -x test/zdtm.sh static/maps04 real 0m1.865s user 0m0.128s sys 0m0.745s Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Otherwise | 11:03:13.524: 19446: ERR: ipc_namespace.c:212: Can't write 0 into /proc/sys/fs/mqueue/msg_max (errno = 22 (Invalid argument)) | 11:03:13.524: 19446: ERR: ipc_namespace.c:273: Failed to randomize ipc namespace tunables (errno = 22 (Invalid argument)) | 11:03:13.524: 19446: ERR: ipc_namespace.c:336: Failed to randomize ipc ns before migration (errno = 22 (Invalid argument)) | 11:03:13.527: 19445: ERR: test.c:298: Test exited with unexpectedly with code 1 (errno = 4 (Interrupted system call)) https://bugzilla.openvz.org/show_bug.cgi?id=2530Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
A signal can be handled by non-leader thread and sigsuspend will not be woken up. kill can send signals to a specified thread, so a futex is used for synchronization. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
It's leftover from early times. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This allows to reuse magic numbers outside of crtools code. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Unused Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
The ARM parasite head uses a pad of 228 bytes to make the offset of the symbol __export_parasite_stack representable in the ARM instruction set. This value needs to be changed every time the value of the macro PARASITE_STACK_SIZE changes. This patch makes this manual interference redundant. Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 01 Mar, 2013 9 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Currently we dump pages directly from parasite into image files. This is bad for several reasons: 1. We cannot use any more-or-less custom format for pages easily, since parasite code cannot be linked with any libraries; 2. We will not be able to optimize migration with preliminary memory migration (a.k.a. iterative migration) with it -- if we send pages from parasite over network we are not able to let the task we dump continue running. That said, what is done is -- pages from target task are put into a page-pipe in one go, then (not in this patch) parasite can be released and we can do with pages whatever we want. For now pages are just spliced from pipe into image file. Some numbers: In order to drain 1Gb of memory from task we need 1.5M of shared map in args (for iovecs) and 4 pipes (8 descriptors) each referencing 128Mb of pages, which int turn requires 4 x 640K chunks of sequential kernel memory (for pipe_buffer). Not that big I guess. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The page-pipe is an object, that can accumulate pages inside it. It consists of list of page-pipe-bufs, which in turn has a pipa, an array of iovecs that describe the pages' locations and some stats. Users of it are supposed to vmsplice pages into pipes to accumulate then for later use, and vmsplice them from pipes when required. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
I will have to push some sort of map of pages to dump into parasite. For this, I need to have estimation of how much memory I'd need for than in parasite args. These two values will help with it. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Right now when we collect list of vmas we need to know the number of elements in it. In the future I will need to know more, so it makes sense to create a vmas-list object for it. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Just make use of previous patch. The creds dumping args are tuned to fit one page (minimal static args size). Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Sometimes we don't know the exact amount of data we would want to send to parasite via args area (e.g. -- while draining fds). Fix this, by moving the args area behind the parasite blob and mmap-ing it with the run-time calculated size. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 27 Feb, 2013 5 commits
-
-
Cyrill Gorcunov authored
This prints more detailed error report. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Convenient for debugging Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
PIE code can't use glibc helpers so instead of passing CR_NOGLIBC macro in every source file pie code uses just pass it in pie/Makefile. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This makes it suitable to use in PIE code. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
We will need futexes to use in PIE code but futex.h uses BUG_ON helper, so to diet inclusions move BUG_ONs code to include/bug.h. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 22 Feb, 2013 7 commits
-
-
Cyrill Gorcunov authored
CFLAGS can be overriden, we need own flags here. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Tested-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
PIE code use own handmade stack so we need -fno-stack-protector option to eliminate compilation warning if -fstack-protector passed in command line CFLAGS. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Tested-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
It's already defined in general Makefile Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Tested-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
In case if CFLAGS is overriden from command line we don't see our headers anymore. So provide mandatory options in ccflags-y variable to fix that. https://bugzilla.openvz.org/show_bug.cgi?id=2521Reported-by:
Jan Engelhardt <jengelh@inai.de> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Tested-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
| cr-check.c: In function ‘check_unaligned_vmsplice’: | cr-check.c:372:2: error: ignoring return value of ‘pipe’, declared with attribute warn_unused_result [-Werror=unused-result] Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This facrots out common core members freeing into pstree.c helper. Per-arch freeing helpers are now symmetrical to the allocating ones. This is a merge of two Cyrill's patches. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
- For NT_X86_XSTATE we need a system elf.h - Drop duplicated parasite-syscall.h - Organize headers in the way - system headers - asm headers - regular headers - protobuf stuff Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 20 Feb, 2013 7 commits
-
-
Pavel Emelyanov authored
This is the first release, that actually doesn't require a custom kernel in order to make all the tool features to work. Just take the v3.8 (with proper config) and that's it :) Another coolness about this release is the ARM port. In this case, however, one does require a custom kernel, since the kcmp system call is not wired into the ARM table in the upstream kernel :( What else? Quite a lot, actually: * C/R ability of a LOT of new stuff * Remote syscall execution * Deprecation of --namespace option * Build system rework * Ability to collect gcov info Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Alexander Kartashov authored
The constant 4294967295 isn't replaced with 0xFFFFFFFF in a generated source. Signed-off-by:
Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
Currently the mainstream-kernel tests list is equal to cr test list. Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The v3.8 is out, so we should exptect these to be in kernel. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 19 Feb, 2013 2 commits
-
-
Pavel Emelyanov authored
It's nicer to have them there. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
In case if here is a fast cpu and make is done in parallel we may have the following error | GEN arch/x86/sys-exec-tbl.c | GEN arch/x86/syscalls.S | CC arch/x86/crtools.o | CC arch/x86/cpu.o | CC arch/x86/syscalls.o | LINK arch/x86/syscalls.built-in.o | In file included from include/restorer.h:12:0, | from arch/x86/crtools.c:19: | include/lock.h: In function ‘futex_set_and_wake’: | include/lock.h:56:2: error: implicit declaration of function ‘sys_futex’ [-Werror=implicit-function-declaration] | cc1: all warnings being treated as errors | make[1]: *** [arch/x86/crtools.o] Error 1 | make: *** [arch/x86] Error 2 This is because crtools.c includes syscall.h but this header is generated by a special script. So use $(deps-after) feature provided by our make engine making sure the header is generated before the deps are started to build. Reported-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Tested-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-