mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: "Martin J. Bligh" <mbligh@mbligh.org>
Cc: linux-kernel@vger.kernel.org, Roman Zippel <zippel@linux-m68k.org>
Subject: Re: 2.6.12-rc5-mm1
Date: Wed, 25 May 2005 23:47:17 -0700	[thread overview]
Message-ID: <20050525234717.261beb48.akpm@osdl.org> (raw)
In-Reply-To: <175590000.1117089446@[10.10.2.4]>

"Martin J. Bligh" <mbligh@mbligh.org> wrote:
>
> Build failure on numaq:
>  http://ftp.kernel.org/pub/linux/kernel/people/mbligh/config/abat/numaq
> 
>  In file included from include/linux/sched.h:12,
>                   from arch/i386/kernel/asm-offsets.c:7:
>  include/linux/jiffies.h:42:3: #error You lose.

You lost!  CONFIG_HZ didn't get set.

Something obviously went wrong in the magic in kernel/Kconfig.hz.  Wanna do
`grep HZ .config' and see if you can work out why it broke?

Roman, is there a better way of doing the below?


From: Christoph Lameter <christoph@lameter.com>

Make the timer frequency selectable. The timer interrupt may cause bus
and memory contention in large NUMA systems since the interrupt occurs
on each processor HZ times per second.

Signed-off-by: Christoph Lameter <christoph@lameter.com>
Signed-off-by: Shai Fultheim <shai@scalex86.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 arch/i386/Kconfig          |    2 +
 arch/x86_64/Kconfig        |    2 +
 include/asm-i386/param.h   |    4 ++-
 include/asm-x86_64/param.h |    6 +++--
 kernel/Kconfig.hz          |   46 +++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 57 insertions(+), 3 deletions(-)

diff -puN arch/i386/Kconfig~i386-selectable-frequency-of-the-timer-interrupt arch/i386/Kconfig
--- 25/arch/i386/Kconfig~i386-selectable-frequency-of-the-timer-interrupt	2005-05-23 19:41:04.000000000 -0700
+++ 25-akpm/arch/i386/Kconfig	2005-05-23 19:41:04.000000000 -0700
@@ -1116,6 +1116,8 @@ config APM_REAL_MODE_POWER_OFF
 	  a work-around for a number of buggy BIOSes. Switch this option on if
 	  your computer crashes instead of powering off properly.
 
+source kernel/Kconfig.hz
+
 endmenu
 
 source "arch/i386/kernel/cpu/cpufreq/Kconfig"
diff -puN arch/x86_64/Kconfig~i386-selectable-frequency-of-the-timer-interrupt arch/x86_64/Kconfig
--- 25/arch/x86_64/Kconfig~i386-selectable-frequency-of-the-timer-interrupt	2005-05-23 19:41:04.000000000 -0700
+++ 25-akpm/arch/x86_64/Kconfig	2005-05-23 19:41:04.000000000 -0700
@@ -401,6 +401,8 @@ config SECCOMP
 
 	  If unsure, say Y. Only embedded should say N here.
 
+source kernel/Kconfig.hz
+
 endmenu
 
 #
diff -puN include/asm-i386/param.h~i386-selectable-frequency-of-the-timer-interrupt include/asm-i386/param.h
--- 25/include/asm-i386/param.h~i386-selectable-frequency-of-the-timer-interrupt	2005-05-23 19:41:04.000000000 -0700
+++ 25-akpm/include/asm-i386/param.h	2005-05-23 19:41:04.000000000 -0700
@@ -1,8 +1,10 @@
+#include <linux/config.h>
+
 #ifndef _ASMi386_PARAM_H
 #define _ASMi386_PARAM_H
 
 #ifdef __KERNEL__
-# define HZ		1000		/* Internal kernel timer frequency */
+# define HZ		CONFIG_HZ	/* Internal kernel timer frequency */
 # define USER_HZ	100		/* .. some user interfaces are in "ticks" */
 # define CLOCKS_PER_SEC		(USER_HZ)	/* like times() */
 #endif
diff -puN include/asm-x86_64/param.h~i386-selectable-frequency-of-the-timer-interrupt include/asm-x86_64/param.h
--- 25/include/asm-x86_64/param.h~i386-selectable-frequency-of-the-timer-interrupt	2005-05-23 19:41:04.000000000 -0700
+++ 25-akpm/include/asm-x86_64/param.h	2005-05-23 19:41:04.000000000 -0700
@@ -1,9 +1,11 @@
+#include <linux/config.h>
+
 #ifndef _ASMx86_64_PARAM_H
 #define _ASMx86_64_PARAM_H
 
 #ifdef __KERNEL__
-# define HZ            1000            /* Internal kernel timer frequency */
-# define USER_HZ       100          /* .. some user interfaces are in "ticks */
+# define HZ            CONFIG_HZ	/* Internal kernel timer frequency */
+# define USER_HZ       100		/* .. some user interfaces are in "ticks */
 #define CLOCKS_PER_SEC        (USER_HZ)       /* like times() */
 #endif
 
diff -puN /dev/null kernel/Kconfig.hz
--- /dev/null	2003-09-15 06:40:47.000000000 -0700
+++ 25-akpm/kernel/Kconfig.hz	2005-05-23 19:41:04.000000000 -0700
@@ -0,0 +1,46 @@
+#
+# Timer Interrupt Frequency Configuration
+#
+
+choice
+	prompt "Timer frequency"
+	default HZ_250
+	help
+	 Allows the configuration of the timer frequency. It is customary
+	 to have the timer interrupt run at 1000 HZ but 100 HZ may be more
+	 beneficial for servers and NUMA systems that do not need to have
+	 a fast response for user interaction and that may experience bus
+	 contention and cacheline bounces as a result of timer interrupts.
+	 Note that the timer interrupt occurs on each processor in an SMP
+	 environment leading to NR_CPUS * HZ number of timer interrupts
+	 per second.
+
+
+	config HZ_100
+		bool "100 HZ"
+	help
+	  100 HZ is a typical choice for servers, SMP and NUMA systems
+	  with lots of processors that may show reduced performance if
+	  too many timer interrupts are occurring.
+
+	config HZ_250
+		bool "250 HZ"
+	help
+	 250 HZ is a good compromise choice allowing server performance
+	 while also showing good interactive responsiveness even
+	 on SMP and NUMA systems.
+
+	config HZ_1000
+		bool "1000 HZ"
+	help
+	 1000 HZ is the preferred choice for desktop systems and other
+	 systems requiring fast interactive responses to events.
+
+endchoice
+
+config HZ
+	int
+	default 100 if HZ_100
+	default 250 if HZ_250
+	default 1000 if HZ_1000
+
_


  parent reply	other threads:[~2005-05-26  6:48 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-26  6:37 2.6.12-rc5-mm1 Martin J. Bligh
2005-05-26  6:40 ` 2.6.12-rc5-mm1 Martin J. Bligh
2005-05-26  6:47 ` Andrew Morton [this message]
2005-05-26  7:05   ` 2.6.12-rc5-mm1 Martin J. Bligh
2005-05-26  7:14     ` 2.6.12-rc5-mm1 Martin J. Bligh
2005-05-26  7:23       ` 2.6.12-rc5-mm1 Martin J. Bligh
2005-05-26  7:24       ` 2.6.12-rc5-mm1 Andrew Morton
2005-05-26 11:09         ` 2.6.12-rc5-mm1 Roman Zippel
2005-05-26 14:48         ` 2.6.12-rc5-mm1 Steven Cole
  -- strict thread matches above, loose matches on Subject: below --
2005-05-25 20:49 2.6.12-rc5-mm1 Andrew Morton
2005-05-25 21:37 ` 2.6.12-rc5-mm1 Alexandre Buisse
2005-05-25 21:51 ` 2.6.12-rc5-mm1 Brice Goglin
2005-05-25 21:58 ` 2.6.12-rc5-mm1 Brice Goglin
2005-05-26  5:29   ` 2.6.12-rc5-mm1 Yani Ioannou
2005-05-25 22:57 ` 2.6.12-rc5-mm1 Jesper Juhl
2005-05-26  1:17 ` 2.6.12-rc5-mm1 Matthew Dobson
2005-05-26  2:43 ` 2.6.12-rc5-mm1 Ed Tomlinson
2005-05-26  3:41   ` 2.6.12-rc5-mm1 Andrew Morton
2005-05-26  7:43     ` 2.6.12-rc5-mm1 J.A. Magallon
2005-05-26  7:58       ` 2.6.12-rc5-mm1 Andrew Morton
2005-05-26 13:54         ` 2.6.12-rc5-mm1 Rafael J. Wysocki
2005-05-26 20:45           ` 2.6.12-rc5-mm1 Andrew Morton
2005-05-26 21:04             ` 2.6.12-rc5-mm1 Lee Revell
2005-05-26 21:07             ` 2.6.12-rc5-mm1 Chris Wright
2005-05-27 10:29             ` 2.6.12-rc5-mm1 Rafael J. Wysocki
2005-05-27 17:38               ` 2.6.12-rc5-mm1 Chen, Kenneth W
2005-05-27 22:32                 ` 2.6.12-rc5-mm1 J.A. Magallon
2005-05-26 21:39         ` 2.6.12-rc5-mm1 J.A. Magallon
2005-05-26  7:44 ` 2.6.12-rc5-mm1 J.A. Magallon
2005-05-26  7:52   ` 2.6.12-rc5-mm1 Andrew Morton
2005-05-26  8:57 ` 2.6.12-rc5-mm1 Mikael Pettersson
2005-05-26 13:04   ` 2.6.12-rc5-mm1 Andrea Arcangeli
2005-05-26 19:15     ` 2.6.12-rc5-mm1 Mikael Pettersson
2005-05-26 22:22       ` 2.6.12-rc5-mm1 Andrea Arcangeli
2005-05-27  2:47         ` 2.6.12-rc5-mm1 Andrea Arcangeli
2005-05-27 21:13 ` 2.6.12-rc5-mm1 Arnd Bergmann
2005-05-28  7:07   ` 2.6.12-rc5-mm1 Christoph Hellwig
2005-06-29 13:42     ` 2.6.12-rc5-mm1 Arnd Bergmann
2005-05-30 13:52 ` 2.6.12-rc5-mm1 Stefano Rivoir

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=20050525234717.261beb48.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@mbligh.org \
    --cc=zippel@linux-m68k.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

all inboxes | Powered by JetHome®