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
5432a964
Commit
5432a964
authored
Aug 13, 2018
by
Mike Rapoport
Committed by
Andrei Vagin
Oct 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lazy-pages: don't mark current stack page as lazy
Signed-off-by:
Mike Rapoport
<
rppt@linux.vnet.ibm.com
>
parent
a97255cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
mem.c
criu/mem.c
+17
-3
No files found.
criu/mem.c
View file @
5432a964
...
@@ -142,6 +142,20 @@ bool page_in_parent(bool dirty)
...
@@ -142,6 +142,20 @@ bool page_in_parent(bool dirty)
return
__page_in_parent
(
dirty
);
return
__page_in_parent
(
dirty
);
}
}
static
bool
is_stack
(
struct
pstree_item
*
item
,
unsigned
long
vaddr
)
{
int
i
;
for
(
i
=
0
;
i
<
item
->
nr_threads
;
i
++
)
{
uint64_t
sp
=
dmpi
(
item
)
->
thread_sp
[
i
];
if
(
!
((
sp
^
vaddr
)
&
PAGE_MASK
))
return
true
;
}
return
false
;
}
/*
/*
* This routine finds out what memory regions to grab from the
* This routine finds out what memory regions to grab from the
* dumpee. The iovs generated are then fed into vmsplice to
* dumpee. The iovs generated are then fed into vmsplice to
...
@@ -151,7 +165,7 @@ bool page_in_parent(bool dirty)
...
@@ -151,7 +165,7 @@ bool page_in_parent(bool dirty)
* the memory contents is present in the pagent image set.
* the memory contents is present in the pagent image set.
*/
*/
static
int
generate_iovs
(
struct
vma_area
*
vma
,
struct
page_pipe
*
pp
,
u64
*
map
,
u64
*
off
,
bool
has_parent
)
static
int
generate_iovs
(
struct
pstree_item
*
item
,
struct
vma_area
*
vma
,
struct
page_pipe
*
pp
,
u64
*
map
,
u64
*
off
,
bool
has_parent
)
{
{
u64
*
at
=
&
map
[
PAGE_PFN
(
*
off
)];
u64
*
at
=
&
map
[
PAGE_PFN
(
*
off
)];
unsigned
long
pfn
,
nr_to_scan
;
unsigned
long
pfn
,
nr_to_scan
;
...
@@ -169,7 +183,7 @@ static int generate_iovs(struct vma_area *vma, struct page_pipe *pp, u64 *map, u
...
@@ -169,7 +183,7 @@ static int generate_iovs(struct vma_area *vma, struct page_pipe *pp, u64 *map, u
vaddr
=
vma
->
e
->
start
+
*
off
+
pfn
*
PAGE_SIZE
;
vaddr
=
vma
->
e
->
start
+
*
off
+
pfn
*
PAGE_SIZE
;
if
(
vma_entry_can_be_lazy
(
vma
->
e
))
if
(
vma_entry_can_be_lazy
(
vma
->
e
)
&&
!
is_stack
(
item
,
vaddr
)
)
ppb_flags
|=
PPB_LAZY
;
ppb_flags
|=
PPB_LAZY
;
/*
/*
...
@@ -358,7 +372,7 @@ static int generate_vma_iovs(struct pstree_item *item, struct vma_area *vma,
...
@@ -358,7 +372,7 @@ static int generate_vma_iovs(struct pstree_item *item, struct vma_area *vma,
return
add_shmem_area
(
item
->
pid
->
real
,
vma
->
e
,
map
);
return
add_shmem_area
(
item
->
pid
->
real
,
vma
->
e
,
map
);
again:
again:
ret
=
generate_iovs
(
vma
,
pp
,
map
,
&
off
,
has_parent
);
ret
=
generate_iovs
(
item
,
vma
,
pp
,
map
,
&
off
,
has_parent
);
if
(
ret
==
-
EAGAIN
)
{
if
(
ret
==
-
EAGAIN
)
{
BUG_ON
(
!
(
pp
->
flags
&
PP_CHUNK_MODE
));
BUG_ON
(
!
(
pp
->
flags
&
PP_CHUNK_MODE
));
...
...
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