Revert "mm: sched: numa: Delay PTE scanning until a task is scheduled on a new node"
[firefly-linux-kernel-4.4.55.git] / kernel / sched / fair.c
index 464207fc9eef2970be8122474ed6600ab367f612..49b11faa29618c60f5e9df39459ddfab3d3c7c91 100644 (file)
@@ -900,24 +900,6 @@ void task_numa_work(struct callback_head *work)
        if (p->flags & PF_EXITING)
                return;
 
-       /*
-        * We do not care about task placement until a task runs on a node
-        * other than the first one used by the address space. This is
-        * largely because migrations are driven by what CPU the task
-        * is running on. If it's never scheduled on another node, it'll
-        * not migrate so why bother trapping the fault.
-        */
-       if (mm->first_nid == NUMA_PTE_SCAN_INIT)
-               mm->first_nid = numa_node_id();
-       if (mm->first_nid != NUMA_PTE_SCAN_ACTIVE) {
-               /* Are we running on a new node yet? */
-               if (numa_node_id() == mm->first_nid &&
-                   !sched_feat_numa(NUMA_FORCE))
-                       return;
-
-               mm->first_nid = NUMA_PTE_SCAN_ACTIVE;
-       }
-
        /*
         * Reset the scan period if enough time has gone by. Objective is that
         * scanning will be reduced if pages are properly placed. As tasks