[CRIU] [PATCH v3 4/6] mem: add dump state of THP_DISABLED prctl
Mike Rapoport
rppt at linux.vnet.ibm.com
Wed Jun 21 21:22:44 MSK 2017
Signed-off-by: Mike Rapoport <rppt at linux.vnet.ibm.com>
---
criu/cr-dump.c | 3 +++
criu/include/parasite.h | 1 +
criu/pie/parasite.c | 1 +
images/mm.proto | 1 +
4 files changed, 6 insertions(+)
diff --git a/criu/cr-dump.c b/criu/cr-dump.c
index 9132737..6f28a66 100644
--- a/criu/cr-dump.c
+++ b/criu/cr-dump.c
@@ -507,6 +507,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)
diff --git a/criu/include/parasite.h b/criu/include/parasite.h
index cd6d793..115891f 100644
--- a/criu/include/parasite.h
+++ b/criu/include/parasite.h
@@ -124,6 +124,7 @@ struct parasite_dump_misc {
u32 umask;
int dumpable;
+ int thp_disabled;
};
/*
diff --git a/criu/pie/parasite.c b/criu/pie/parasite.c
index fe08e72..78bbe9e 100644
--- a/criu/pie/parasite.c
+++ b/criu/pie/parasite.c
@@ -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;
}
diff --git a/images/mm.proto b/images/mm.proto
index b372f45..e0f14c6 100644
--- a/images/mm.proto
+++ b/images/mm.proto
@@ -29,4 +29,5 @@ message mm_entry {
optional int32 dumpable = 15;
repeated aio_ring_entry aios = 16;
+ optional bool thp_disabled = 17;
}
--
2.7.4
More information about the CRIU
mailing list