public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gregory Haskins <ghaskins@novell.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: peterz@infradead.org, Lin Ming <ming.m.lin@intel.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	yanmin_zhang@linux.intel.com, mingo@elte.hu
Subject: [PATCH 1/4] revert "sched: sched_cacheflush is now unused"
Date: Thu, 04 Sep 2008 09:50:18 -0400	[thread overview]
Message-ID: <20080904135018.26109.74483.stgit@dev.haskins.net> (raw)
In-Reply-To: <20080904134959.26109.90529.stgit@dev.haskins.net>

revert c41917df8a1adde34864116ce2231a7fe308d2ff

	Author: Ralf Baechle <ralf@linux-mips.org>
	Date:   Thu Jul 19 21:28:35 2007 +0200

	    [PATCH] sched: sched_cacheflush is now unused

	    Since Ingo's recent scheduler rewrite which was merged as commit
	    0437e109e1841607f2988891eaa36c531c6aa6ac sched_cacheflush is unused.

	    Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
	    Signed-off-by: Ingo Molnar <mingo@elte.hu>

We want to restore sd->cache_hot_time for better migration decisions.

Signed-off-by: Gregory Haskins <ghaskins@novell.com>
---

 arch/ia64/kernel/setup.c    |    9 +++++++++
 include/asm-m32r/system.h   |   10 ++++++++++
 include/asm-mips/system.h   |   10 ++++++++++
 include/asm-parisc/system.h |   11 +++++++++++
 include/asm-x86/system.h    |    9 +++++++++
 5 files changed, 49 insertions(+), 0 deletions(-)

diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index c27d5b2..c0050ab 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -1051,6 +1051,15 @@ cpu_init (void)
 	pm_idle = default_idle;
 }
 
+/*
+ * On SMP systems, when the scheduler does migration-cost autodetection,
+ * it needs a way to flush as much of the CPU's caches as possible.
+ */
+void sched_cacheflush(void)
+{
+	ia64_sal_cache_flush(3);
+}
+
 void __init
 check_bugs (void)
 {
diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h
index 70a57c8..d2f9559 100644
--- a/include/asm-m32r/system.h
+++ b/include/asm-m32r/system.h
@@ -54,6 +54,16 @@
 	); \
 } while(0)
 
+/*
+ * On SMP systems, when the scheduler does migration-cost autodetection,
+ * it needs a way to flush as much of the CPU's caches as possible.
+ *
+ * TODO: fill this in!
+ */
+static inline void sched_cacheflush(void)
+{
+}
+
 /* Interrupt Control */
 #if !defined(CONFIG_CHIP_M32102) && !defined(CONFIG_CHIP_M32104)
 #define local_irq_enable() \
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h
index a944eda..aaba821 100644
--- a/include/asm-mips/system.h
+++ b/include/asm-mips/system.h
@@ -78,6 +78,16 @@ do {									\
 		write_c0_userlocal(current_thread_info()->tp_value);	\
 } while (0)
 
+/*
+ * On SMP systems, when the scheduler does migration-cost autodetection,
+ * it needs a way to flush as much of the CPU's caches as possible.
+ *
+ * TODO: fill this in!
+ */
+static inline void sched_cacheflush(void)
+{
+}
+
 static inline unsigned long __xchg_u32(volatile int * m, unsigned int val)
 {
 	__u32 retval;
diff --git a/include/asm-parisc/system.h b/include/asm-parisc/system.h
index ee80c92..21fbfc5 100644
--- a/include/asm-parisc/system.h
+++ b/include/asm-parisc/system.h
@@ -48,6 +48,17 @@ extern struct task_struct *_switch_to(struct task_struct *, struct task_struct *
 	(last) = _switch_to(prev, next);			\
 } while(0)
 
+/*
+ * On SMP systems, when the scheduler does migration-cost autodetection,
+ * it needs a way to flush as much of the CPU's caches as possible.
+ *
+ * TODO: fill this in!
+ */
+static inline void sched_cacheflush(void)
+{
+}
+
+
 /* interrupt control */
 #define local_save_flags(x)	__asm__ __volatile__("ssm 0, %0" : "=r" (x) : : "memory")
 #define local_irq_disable()	__asm__ __volatile__("rsm %0,%%r0\n" : : "i" (PSW_I) : "memory" )
diff --git a/include/asm-x86/system.h b/include/asm-x86/system.h
index 983ce37..7847702 100644
--- a/include/asm-x86/system.h
+++ b/include/asm-x86/system.h
@@ -306,6 +306,15 @@ void enable_hlt(void);
 
 void cpu_idle_wait(void);
 
+/*
+ * On SMP systems, when the scheduler does migration-cost autodetection,
+ * it needs a way to flush as much of the CPU's caches as possible:
+ */
+static inline void sched_cacheflush(void)
+{
+	wbinvd();
+}
+
 extern unsigned long arch_align_stack(unsigned long sp);
 extern void free_init_pages(char *what, unsigned long begin, unsigned long end);
 


  reply	other threads:[~2008-09-04 13:53 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-04  8:51 oltp ~10% regression with 2.6.27-rc5 on stoakley machine Lin Ming
2008-09-04  9:03 ` Peter Zijlstra
2008-09-04 10:52   ` Lin Ming
2008-09-04 11:06     ` Peter Zijlstra
2008-09-04 12:12       ` Lin Ming
2008-09-04 12:26         ` Peter Zijlstra
2008-09-04 12:42           ` Lin Ming
2008-09-04 13:50       ` Gregory Haskins
2008-09-04 13:50         ` Gregory Haskins [this message]
2008-09-04 13:50         ` [PATCH 2/4] Revert "[PATCH] sched: remove cache_hot_time" Gregory Haskins
2008-09-04 13:50         ` [PATCH 3/4] Revert "sched: zap the migration init / cache-hot balancing code" Gregory Haskins
2008-09-04 13:50         ` [PATCH 4/4] sched: make task_hot() once again use sd->cache_hot_time Gregory Haskins
2008-09-04 11:09     ` oltp ~10% regression with 2.6.27-rc5 on stoakley machine Ingo Molnar
2008-09-04 11:30       ` Lin Ming
2008-09-04 11:35         ` Ingo Molnar
2008-09-04 12:19           ` Lin Ming
2008-09-05  1:26   ` Lin Ming
2008-09-20 21:38 ` Peter Zijlstra
2008-09-26  2:00   ` Lin Ming

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=20080904135018.26109.74483.stgit@dev.haskins.net \
    --to=ghaskins@novell.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.m.lin@intel.com \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=yanmin_zhang@linux.intel.com \
    /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