- 11 Jan, 2012 7 commits
-
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
Some process can share one struct file-s, we may find them by "object IDs". A file descriptor is opened in one process and send to other via unix socket. The procedure of restoring files contains four stages. * Collect data about all file's descriptors On this stage we find process which will restore a file descriptor and create a list of processes, who should get this descriptor. * Create datagrams unix sockets If a file descriptor should be received, a unix socket is created instead of it. * Open file descriptors A process with the least pid opens a file and sends this file descriptors to all one who wait it. * Receive file descriptors. When we were thinking up this algoritm, we wanted to minimize a number of context switches. A number of context switches is proportional of a number of processes. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Remove excessive checks and keep it a pointer. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
The mmap hint is always NULL. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
The last one is always CR_FD_PAGES. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Introduce a helper for walking the list and sending signals. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 10 Jan, 2012 14 commits
-
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
To include dgram bound && connected sockets, for example CR_FD_UNIXSK: /home/cyrill/crtools/unixsk-2813.img ---------------------------------------- fd 3 type 1 state 1 namelen 0 backlog 0 id 19505 peer 19506 fd 4 type 1 state 1 namelen 0 backlog 0 id 19506 peer 19505 fd 5 type 2 state 7 namelen 0 backlog 0 id 19507 peer 0 fd 6 type 2 state 7 namelen 18 backlog 18 id 19508 peer 0 --> test-socket-bound fd 7 type 2 state 7 namelen 0 backlog 0 id 19509 peer 19510 fd 8 type 2 state 7 namelen 17 backlog 17 id 19510 peer 0 --> test-socket-conn fd 9 type 2 state 7 namelen 23 backlog 23 id 19511 peer 19511 --> test-socket-bound-conn ---------------------------------------- The last one is bound and connected. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Use same format as we do for VMA names. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
And add some comments. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
This code opens a log file and duplicates the descriptor to logfd, but forgets to close the first one. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 04 Jan, 2012 16 commits
-
-
Cyrill Gorcunov authored
Restorer does really restore shared memory (including page contents restore) only on master process, while all other processes do open such memory area via map_files/ procfs entry so that we might have a situation when shared VMA is present in some particular core-%d.img file but it's not listed in collected shmems array and find_shmem_by_pid will return NULL. This is perfectly fine, be ready for that. Another issue is that shared memory might look like CR_FD_SHMEM: /home/cyrill/projects/kernel/crtools/shmem-2641.img ---------------------------------------- 0x7f2200775000-0x7f2200776000 id 19664 0x7f2200776000-0x7f2200777000 id 19663 ---------------------------------------- So vma area is [x;y) range and we should distinguish two shmem lookup cases - one when we search for page in shmem area - second when we lookup shmem area in collected ranges They both have a different lookup conditions so single find_shmem splitted into two helpers find_shmem and find_shmem_page as appropriate. This patch finally fixes the three process asynchronious shared memory updates test-case. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
We might be needing to close the shmems file descriptor. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Just in a sake of consistency Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Style tuning, no func change Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Dumping procedure does check for VMA_ANON_SHARED so the same should be done at restore time. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
The remapping of /proc path to shmem should be done with pid of process which did mmap() call initially. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Also add a few more comments. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
And use SHMEMS_SIZE constant as well. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
In commit 99eb3d09 we started to use self-contained shared memory region but it revealed the problem that anonymous sgared mappings might be parsed by parse_maps incorrectly, so fix it and be ready to get anon-shared mappings. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 30 Dec, 2011 3 commits
-
-
Cyrill Gorcunov authored
Also make output a bit more fancy, as CR_FD_UNIXSK: unixsk-2440.img ---------------------------------------- fd 3 type 1 state 1 namelen 0 id 19406 peer 19407 fd 4 type 1 state 1 namelen 0 id 19407 peer 19406 fd 5 type 2 state 7 namelen 7 id 19408 peer 0 ---> [tst-sk] fd 6 type 2 state 7 namelen 0 id 19409 peer 0 fd 7 type 2 state 7 namelen 0 id 19410 peer 19411 fd 8 type 2 state 7 namelen 8 id 19411 peer 0 ---> [tst-sk1] ---------------------------------------- Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
It also tests for possible dup() call error. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-