2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 05:48:05 +00:00

22 Commits

Author SHA1 Message Date
Ruslan Kuprieiev
80559828d6 v2 stats: write stats at work directory
Stats must be in work dir, as logfiles and pidfiles.

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-11-16 00:05:53 +04:00
Cyrill Gorcunov
8f64a14a03 headers: Move fcntl related data to include/fcntl.h
fcntl data is arch independent, so move it out of include/asm/type.h

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-11-14 22:13:10 +04:00
Andrey Vagin
a434e7f075 crtools: move pid_rst_prio to pid.h
crtools.h is too heavy to be included in many sources

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-11-06 18:18:12 +04:00
Andrey Vagin
f41255f00b crtools: don't include lock.h in crtools.h
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-11-06 15:42:10 +04:00
Andrey Vagin
07fc6cf394 crtools: don't include image.h in crtools.h
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-11-06 15:42:09 +04:00
Pavel Emelyanov
b18fb09eb9 show: Replace one-line show_foo calls with args array
We have generic do_pb_show() call and tons of show_foo
routines, that just call one with proper args. Compact
the code by putting the args into array and calling
the do_pb_show() in one place.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-08-24 04:00:32 +04:00
Cyrill Gorcunov
71f7f7546c atomic: Use atomic_read instead of atomic_get
To switch to kernel's style.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-08-16 19:37:06 +04:00
Cyrill Gorcunov
aea8a605f3 atomic -- Switch to linux kernel templates
Use same code as provided in kernel. In first place
we used own prototypes in case of simplicity (they
all were based on "lock xadd" instruction. There is
no more need for that and we can switch to well known
kernel's api.

Because kernel uses plain int type to carry atomic
counters I had to add explicit u32 type for futexes,
as well as a couple of fixes for new api usage.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-08-16 19:37:03 +04:00
Pavel Emelyanov
9b45833b81 stats: Account total time to restore
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-08-11 21:25:42 +04:00
Pavel Emelyanov
2df39a4b47 stats: Account for time to fork tasks on restore
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-08-11 21:22:40 +04:00
Pavel Emelyanov
c65f068489 stats: Add timing stats for restore
This will only work if timiings are reported by a single
task. Collecting them from several tasks is to be done.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-08-11 21:15:58 +04:00
Pavel Emelyanov
e99576f655 rst: Collect stats about checked-vs-cowed pages
On restore we compare pages' contents with memcmp to check which
of them can remain shared. Report this info in restore stats.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-08-11 13:36:24 +04:00
Pavel Emelyanov
729ea690ed stats: Introduce protobuf message for restore stats
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-08-11 13:27:58 +04:00
Pavel Emelyanov
9bb545011c stats: Introduce counters for restore
These are atomic_add-s on shmalloc-ed stats.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-08-11 13:24:13 +04:00
Pavel Emelyanov
d77a05b6dc stats: Rename existing timing and cnt counters into dump_... ones
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-08-11 13:07:21 +04:00
Pavel Emelyanov
8f4c9acda5 stats: Allocate dumping stats dynamically
For restore all this memory would be unused. Plus, we'd need some
sign what stats to collect.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-08-11 13:05:52 +04:00
Pavel Emelyanov
6ac4870181 stats: Prepare for collecting restore stats
Restore stats are difficult -- we have to collect them from several
tasks and thus existing plain variables would not work. We'll need
shared memory with stats, so prepre for allocating one.

Other than this -- put call to write_stats() where appropriate for
restore.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-08-11 13:00:45 +04:00
Pavel Emelyanov
37c137092b mem/stats: Add stats about memory dumping
pages_scanned -- the amount of pages criu looked at for decision
pages_skipped_parent -- the amount of pages that were skipped, due to
                        they are present in parent image
pages_writted -- the amount of pages criu transfered into image

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-05-15 15:46:07 +04:00
Pavel Emelyanov
094330c33b stats: Add writing-memory-image timing
Dumping memory is draining it from parasite, for pre-dump
this time would be reasonably small. _Writing_ the memory
would occur _after_ tasks unseize and resume.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-05-14 11:52:45 +04:00
Pavel Emelyanov
1e18128423 stats: Dump-time statistics
Basic timings for dump (freeze, frozen, mem dump).

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-05-13 13:53:31 +04:00
Pavel Emelyanov
bd1d6186be stats: Write dump stats after dump is finished
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-05-13 13:51:53 +04:00
Pavel Emelyanov
d770f4ef23 stats: Protobuf file introduction introduction
We'll have one more "image" file generated by dump and (surprisingly)
restore commands -- the stats one. It will contain in a single pb
object all the statistics collected by dump/restore.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-05-13 13:50:15 +04:00