Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhul
criu
Commits
2df39a4b
Commit
2df39a4b
authored
Aug 11, 2013
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stats: Account for time to fork tasks on restore
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
c65f0684
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
3 deletions
+17
-3
cr-restore.c
cr-restore.c
+7
-2
stats.h
include/stats.h
+2
-0
stats.proto
protobuf/stats.proto
+2
-0
stats.c
stats.c
+6
-1
No files found.
cr-restore.c
View file @
2df39a4b
...
...
@@ -1324,13 +1324,18 @@ static int restore_root_task(struct pstree_item *init)
if
(
ret
)
goto
out
;
timing_start
(
TIME_FORK
);
__restore_switch_stage
(
CR_STATE_FORKING
);
pr_info
(
"Wait until all tasks are forked
\n
"
);
ret
=
restore_
switch_stage
(
CR_STATE_RESTORE_PGID
);
if
(
ret
<
0
)
ret
=
restore_
wait_inprogress_tasks
(
);
if
(
ret
)
goto
out
;
timing_stop
(
TIME_FORK
);
__restore_switch_stage
(
CR_STATE_RESTORE_PGID
);
pr_info
(
"Wait until all tasks restored pgid
\n
"
);
ret
=
restore_switch_stage
(
CR_STATE_RESTORE
);
...
...
include/stats.h
View file @
2df39a4b
...
...
@@ -12,6 +12,8 @@ enum {
};
enum
{
TIME_FORK
,
RESTORE_TIME_NS_STATS
,
};
...
...
protobuf/stats.proto
View file @
2df39a4b
...
...
@@ -13,6 +13,8 @@ message dump_stats_entry {
message
restore_stats_entry
{
required
uint64
pages_compared
=
1
;
required
uint64
pages_skipped_cow
=
2
;
required
uint32
forking_time
=
3
;
}
message
stats_entry
{
...
...
stats.c
View file @
2df39a4b
...
...
@@ -97,7 +97,10 @@ void show_stats(int fd)
static
void
encode_time
(
int
t
,
u_int32_t
*
to
)
{
*
to
=
dstats
->
timings
[
t
].
total
.
tv_sec
*
USEC_PER_SEC
+
dstats
->
timings
[
t
].
total
.
tv_usec
;
struct
timing
*
tm
;
tm
=
get_timing
(
t
);
*
to
=
tm
->
total
.
tv_sec
*
USEC_PER_SEC
+
tm
->
total
.
tv_usec
;
}
void
write_stats
(
int
what
)
...
...
@@ -128,6 +131,8 @@ void write_stats(int what)
rs_entry
.
pages_compared
=
atomic_get
(
&
rstats
->
counts
[
CNT_PAGES_COMPARED
]);
rs_entry
.
pages_skipped_cow
=
atomic_get
(
&
rstats
->
counts
[
CNT_PAGES_SKIPPED_COW
]);
encode_time
(
TIME_FORK
,
&
rs_entry
.
forking_time
);
name
=
"restore"
;
}
else
return
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment