public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: x86@kernel.org
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Update cacheline size on X86_GENERIC
Date: Thu, 9 Oct 2008 13:14:53 -0400	[thread overview]
Message-ID: <20081009171453.GA15321@redhat.com> (raw)

I just noticed that configuring a kernel to use CONFIG_X86_GENERIC
(as is typical for a distro kernel) configures it to use a 128 byte cacheline size.
This made sense when that was commonplace (P4 era) but current
Intel, AMD and VIA cpus use 64 byte cachelines.

Signed-off-by: Dave Jones <davej@redhat.com>

--- linux-2.6.26.noarch/arch/x86/Kconfig.cpu~	2008-10-09 12:59:56.000000000 -0400
+++ linux-2.6.26.noarch/arch/x86/Kconfig.cpu	2008-10-09 13:11:32.000000000 -0400
@@ -301,8 +301,8 @@ config X86_CPU
 # Define implied options from the CPU selection here
 config X86_L1_CACHE_BYTES
 	int
-	default "128" if GENERIC_CPU || MPSC
-	default "64" if MK8 || MCORE2
+	default "128" if MPENTIUM4 || MPSC
+	default "64" if MK8 || MCORE2 || GENERIC_CPU
 	depends on X86_64
 
 config X86_INTERNODE_CACHE_BYTES
@@ -316,10 +316,10 @@ config X86_CMPXCHG
 
 config X86_L1_CACHE_SHIFT
 	int
-	default "7" if MPENTIUM4 || X86_GENERIC || GENERIC_CPU || MPSC
+	default "7" if MPENTIUM4 || MPSC
 	default "4" if X86_ELAN || M486 || M386 || MGEODEGX1
 	default "5" if MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX
-	default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MVIAC7
+	default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MVIAC7 || X86_GENERIC || GENERIC_CPU
 
 config X86_XADD
 	def_bool y

-- 
http://www.codemonkey.org.uk

             reply	other threads:[~2008-10-09 17:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-09 17:14 Dave Jones [this message]
2008-10-10  3:28 ` Update cacheline size on X86_GENERIC Nick Piggin
2008-10-10  7:46   ` Andi Kleen
2008-10-10  8:45     ` Nick Piggin
2008-10-10 10:22       ` Andi Kleen
2008-10-11  3:59         ` Nick Piggin
2008-10-11  8:08           ` Andi Kleen
2008-10-11  8:29             ` Nick Piggin
2008-10-11 11:22               ` Andi Kleen
2008-10-11 11:27                 ` Rafael J. Wysocki
2008-10-11 11:42                 ` Nick Piggin
2008-10-11 13:11                   ` Andi Kleen
2008-10-11 13:48                     ` Nick Piggin
2008-10-11 14:01                       ` Andi Kleen
2008-10-12  5:56                         ` Nick Piggin
2008-10-10 18:26   ` H. Peter Anvin
2008-10-11  3:56     ` Nick Piggin

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=20081009171453.GA15321@redhat.com \
    --to=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.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