Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1179811

[PATCH] sched/numa: Restore sched feature NUMA to its earlier avatar.

From Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject [PATCH] sched/numa: Restore sched feature NUMA to its earlier avatar.
Date 2015-07-08 15:30 +0200
Message-ID <pJXAd-3fG-17@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


In commit:8a9e62a "sched/numa: Prefer NUMA hotness over cache hotness"
sched feature NUMA was always set to true. However this sched feature was
suppose to be enabled on NUMA boxes only thro set_numabalancing_state().

To get back to the above behaviour, bring back NUMA_FAVOUR_HIGHER feature.
Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 587a2f6..aea72d5 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5676,10 +5676,10 @@ static int migrate_degrades_locality(struct task_struct *p, struct lb_env *env)
 	unsigned long src_faults, dst_faults;
 	int src_nid, dst_nid;
 
-	if (!p->numa_faults || !(env->sd->flags & SD_NUMA))
+	if (!sched_feat(NUMA) || !sched_feat(NUMA_FAVOUR_HIGHER))
 		return -1;
 
-	if (!sched_feat(NUMA))
+	if (!p->numa_faults || !(env->sd->flags & SD_NUMA))
 		return -1;
 
 	src_nid = cpu_to_node(env->src_cpu);
diff --git a/kernel/sched/features.h b/kernel/sched/features.h
index 83a50e7..d4d4726 100644
--- a/kernel/sched/features.h
+++ b/kernel/sched/features.h
@@ -79,12 +79,13 @@ SCHED_FEAT(LB_MIN, false)
  * numa_balancing=
  */
 #ifdef CONFIG_NUMA_BALANCING
+SCHED_FEAT(NUMA,	false)
 
 /*
- * NUMA will favor moving tasks towards nodes where a higher number of
- * hinting faults are recorded during active load balancing. It will
- * resist moving tasks towards nodes where a lower number of hinting
- * faults have been recorded.
+ * NUMA_FAVOUR_HIGHER will favor moving tasks towards nodes where a
+ * higher number of hinting faults are recorded during active load
+ * balancing. It will resist moving tasks towards nodes where a lower
+ * number of hinting faults have been recorded.
  */
-SCHED_FEAT(NUMA,	true)
+SCHED_FEAT(NUMA_FAVOUR_HIGHER, true)
 #endif

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] sched/numa: Restore sched feature NUMA to its earlier avatar. Srikar Dronamraju <srikar@linux.vnet.ibm.com> - 2015-07-08 15:30 +0200
  Re: [PATCH] sched/numa: Restore sched feature NUMA to its earlier  avatar. Rik van Riel <riel@redhat.com> - 2015-07-08 16:00 +0200
  Re: [PATCH] sched/numa: Restore sched feature NUMA to its earlier  avatar. Ingo Molnar <mingo@kernel.org> - 2015-07-08 16:00 +0200
    Re: [PATCH] sched/numa: Restore sched feature NUMA to its earlier  avatar. Ingo Molnar <mingo@kernel.org> - 2015-07-09 10:10 +0200
      Re: [PATCH] sched/numa: Restore sched feature NUMA to its earlier  avatar. Srikar Dronamraju <srikar@linux.vnet.ibm.com> - 2015-07-10 19:30 +0200
        Re: [PATCH] sched/numa: Restore sched feature NUMA to its earlier  avatar. Ingo Molnar <mingo@kernel.org> - 2015-07-11 11:00 +0200

csiph-web