@@ -63,6 +63,11 @@ static struct passwd *ltpuser;
static int *nodes, nodeA, nodeB;
static int num_nodes;
+static const char * const save_restore[] = {
+ "?/proc/sys/kernel/numa_balancing",
+ NULL,
+};
+
static void print_mem_stats(pid_t pid, int node)
{
char s[64];
@@ -295,6 +300,7 @@ static void setup(void)
else if (tst_kvercmp(2, 6, 18) < 0)
tst_brk(TCONF, "2.6.18 or greater kernel required");
+ FILE_PRINTF("/proc/sys/kernel/numa_balancing", "0");
/*
* find 2 nodes, which can hold NODE_MIN_FREEMEM bytes
* The reason is that:
@@ -345,6 +351,7 @@ static struct tst_test test = {
.forks_child = 1,
.test_all = run,
.setup = setup,
+ .save_restore = save_restore,
};
#else
TST_TEST_TCONF(NUMA_ERROR_MSG);
Fixes: #407 Signed-off-by: Jan Stancek <jstancek@redhat.com> --- testcases/kernel/syscalls/migrate_pages/migrate_pages02.c | 7 +++++++ 1 file changed, 7 insertions(+)