mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Peter Zijlstra <a.p.zijlstra@chello.nl>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	a.p.zijlstra@chello.nl, tglx@linutronix.de
Subject: [tip:sched/numa] sched/numa: Introduce alternative wakeup bias
Date: Fri, 12 Oct 2012 04:25:49 -0700	[thread overview]
Message-ID: <tip-q93t6n7j1jaz36yh056msb5d@git.kernel.org> (raw)

Commit-ID:  52a30f1fa3b9f0c0d1270b4e34be865e83b3e31b
Gitweb:     http://git.kernel.org/tip/52a30f1fa3b9f0c0d1270b4e34be865e83b3e31b
Author:     Peter Zijlstra <a.p.zijlstra@chello.nl>
AuthorDate: Fri, 5 Oct 2012 15:57:54 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 12 Oct 2012 12:07:16 +0200

sched/numa: Introduce alternative wakeup bias

Rename NUMA_BIAS to NUMA_TTWU_BIAS to clarify what it does.

Also, disable by default, it seems too agressive. Also provide an
alternative to play with, instead of altering the prev cpu, alter
the waking cpu, maybe that's less agressive.

No clear data either way for the moment.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-q93t6n7j1jaz36yh056msb5d@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/sched/fair.c     |    7 +++++--
 kernel/sched/features.h |    3 ++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index f586f17..62d77ef 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3009,7 +3009,7 @@ select_task_rq_fair(struct task_struct *p, int sd_flag, int wake_flags)
 	}
 
 	rcu_read_lock();
-	if (sched_feat_numa(NUMA_BIAS) && node != -1) {
+	if (sched_feat_numa(NUMA_TTWU_BIAS) && node != -1) {
 		/*
 		 * For fork,exec find the idlest cpu in the home-node.
 		 */
@@ -3031,7 +3031,10 @@ select_task_rq_fair(struct task_struct *p, int sd_flag, int wake_flags)
 			if (node_cpu < 0)
 				goto find_sd;
 
-			prev_cpu = node_cpu;
+			if (sched_feat_numa(NUMA_TTWU_TO))
+				cpu = node_cpu;
+			else
+				prev_cpu = node_cpu;
 		}
 	}
 
diff --git a/kernel/sched/features.h b/kernel/sched/features.h
index 845b838..3293af4 100644
--- a/kernel/sched/features.h
+++ b/kernel/sched/features.h
@@ -66,7 +66,8 @@ SCHED_FEAT(LB_MIN, false)
 SCHED_FEAT(NUMA,           true)
 SCHED_FEAT(NUMA_FORCE_BIG, false)
 SCHED_FEAT(NUMA_HOT,       true)
-SCHED_FEAT(NUMA_BIAS,      true)
+SCHED_FEAT(NUMA_TTWU_BIAS, false)
+SCHED_FEAT(NUMA_TTWU_TO,   false)
 SCHED_FEAT(NUMA_PULL,      true)
 SCHED_FEAT(NUMA_PULL_BIAS, true)
 #endif

                 reply	other threads:[~2012-10-12 11:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-q93t6n7j1jaz36yh056msb5d@git.kernel.org \
    --to=a.p.zijlstra@chello.nl \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®