From: tip-bot for Ingo Molnar <mingo@kernel.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
a.p.zijlstra@chello.nl, torvalds@linux-foundation.org,
riel@redhat.com, akpm@linux-foundation.org, aarcange@redhat.com,
tglx@linutronix.de
Subject: [tip:numa/core] sched, numa: Add NUMA_MIGRATION feature flag
Date: Tue, 23 Oct 2012 03:59:21 -0700 [thread overview]
Message-ID: <tip-496a3089b908c8c0beea77df9e753d24b1fa2237@git.kernel.org> (raw)
Commit-ID: 496a3089b908c8c0beea77df9e753d24b1fa2237
Gitweb: http://git.kernel.org/tip/496a3089b908c8c0beea77df9e753d24b1fa2237
Author: Ingo Molnar <mingo@kernel.org>
AuthorDate: Sat, 20 Oct 2012 22:20:19 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 23 Oct 2012 11:53:46 +0200
sched, numa: Add NUMA_MIGRATION feature flag
After this patch, doing:
# echo NO_NUMA_MIGRATION > /sys/kernel/debug/sched_features
Will turn off the NUMA placement logic/policy - but keeps the
working set sampling faults in place.
This allows the debugging of the WSS facility, by using it
but keeping vanilla, non-NUMA CPU and memory placement
policies.
Default enabled. Generates on extra code on !CONFIG_SCHED_DEBUG.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Link: http://lkml.kernel.org/n/tip-xjt7bqjlphxRfjXxasqm4cdv@git.kernel.org
---
kernel/sched/core.c | 3 +++
kernel/sched/features.h | 3 +++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index ef24c7b..67221c0 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6002,6 +6002,9 @@ void sched_setnode(struct task_struct *p, int node)
int on_rq, running;
struct rq *rq;
+ if (!sched_feat(NUMA_MIGRATION))
+ return;
+
rq = task_rq_lock(p, &flags);
on_rq = p->on_rq;
running = task_current(rq, p);
diff --git a/kernel/sched/features.h b/kernel/sched/features.h
index f8a7aeb..1d11f6c 100644
--- a/kernel/sched/features.h
+++ b/kernel/sched/features.h
@@ -63,7 +63,10 @@ SCHED_FEAT(RT_RUNTIME_SHARE, true)
SCHED_FEAT(LB_MIN, false)
#ifdef CONFIG_SCHED_NUMA
+/* Do the working set probing faults: */
SCHED_FEAT(NUMA, true)
+/* Do actual migration/placement based on the working set information: */
+SCHED_FEAT(NUMA_MIGRATION, true)
SCHED_FEAT(NUMA_HOT, true)
SCHED_FEAT(NUMA_TTWU_BIAS, false)
SCHED_FEAT(NUMA_TTWU_TO, false)
next reply other threads:[~2012-10-23 10:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-23 10:59 tip-bot for Ingo Molnar [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-10-21 12:57 tip-bot for Ingo Molnar
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-496a3089b908c8c0beea77df9e753d24b1fa2237@git.kernel.org \
--to=mingo@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=riel@redhat.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/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
Powered by JetHome