Skip to content

Commit

Permalink
mem: add dump state of THP_DISABLED prctl
Browse files Browse the repository at this point in the history
Acked-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
  • Loading branch information
rppt authored and avagin committed Sep 16, 2017
1 parent 5480a2a commit bbbd597
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions criu/cr-dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,9 @@ static int dump_task_mm(pid_t pid, const struct proc_pid_stat *stat,
mme.dumpable = misc->dumpable;
mme.has_dumpable = true;

mme.thp_disabled = misc->thp_disabled;
mme.has_thp_disabled = true;

mme.n_mm_saved_auxv = AT_VECTOR_SIZE;
mme.mm_saved_auxv = xmalloc(pb_repeated_size(&mme, mm_saved_auxv));
if (!mme.mm_saved_auxv)
Expand Down
1 change: 1 addition & 0 deletions criu/include/parasite.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ struct parasite_dump_misc {
u32 umask;

int dumpable;
int thp_disabled;
};

/*
Expand Down
1 change: 1 addition & 0 deletions criu/pie/parasite.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ static int dump_misc(struct parasite_dump_misc *args)
args->umask = sys_umask(0);
sys_umask(args->umask); /* never fails */
args->dumpable = sys_prctl(PR_GET_DUMPABLE, 0, 0, 0, 0);
args->thp_disabled = sys_prctl(PR_GET_THP_DISABLE, 0, 0, 0, 0);

return 0;
}
Expand Down
1 change: 1 addition & 0 deletions images/mm.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ message mm_entry {

optional int32 dumpable = 15;
repeated aio_ring_entry aios = 16;
optional bool thp_disabled = 17;
}

0 comments on commit bbbd597

Please sign in to comment.