All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Roland Dreier <rdreier@cisco.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	venkatesh.pallipadi@intel.com, rdreier@cisco.com,
	suresh.b.siddha@intel.com, tglx@linutronix.de, rolandd@cisco.com,
	mingo@elte.hu
Subject: [tip:x86/urgent] x86: Reduce verbosity of "PAT enabled" kernel message
Date: Thu, 24 Sep 2009 09:37:43 GMT	[thread overview]
Message-ID: <tip-e23a8b6a8f319c0f08b6ccef2dccbb37e7603dc2@git.kernel.org> (raw)
In-Reply-To: <adavdj92sso.fsf@cisco.com>

Commit-ID:  e23a8b6a8f319c0f08b6ccef2dccbb37e7603dc2
Gitweb:     http://git.kernel.org/tip/e23a8b6a8f319c0f08b6ccef2dccbb37e7603dc2
Author:     Roland Dreier <rdreier@cisco.com>
AuthorDate: Wed, 23 Sep 2009 15:35:35 -0700
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 24 Sep 2009 11:35:19 +0200

x86: Reduce verbosity of "PAT enabled" kernel message

On modern systems, the kernel prints the message

    x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106

once for every CPU.

This gets kind of ridiculous on huge systems; for example, on a
64-thread system I was lucky enough to get:

    dmesg| grep 'PAT enabled' | wc
         64     704    5174

There is already a BUG() if non-boot CPUs have PAT capabilities
that don't match the boot CPU, so just print the message on the
boot CPU. (I kept the print after the wrmsrl() that enables PAT,
so that the log output continues to mean that the system survived
enabling PAT on the boot CPU)

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
LKML-Reference: <adavdj92sso.fsf@cisco.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 arch/x86/mm/pat.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index 7257cf3..e78cd0e 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -81,6 +81,7 @@ enum {
 void pat_init(void)
 {
 	u64 pat;
+	bool boot_cpu = !boot_pat_state;
 
 	if (!pat_enabled)
 		return;
@@ -122,8 +123,10 @@ void pat_init(void)
 		rdmsrl(MSR_IA32_CR_PAT, boot_pat_state);
 
 	wrmsrl(MSR_IA32_CR_PAT, pat);
-	printk(KERN_INFO "x86 PAT enabled: cpu %d, old 0x%Lx, new 0x%Lx\n",
-	       smp_processor_id(), boot_pat_state, pat);
+
+	if (boot_cpu)
+		printk(KERN_INFO "x86 PAT enabled: cpu %d, old 0x%Lx, new 0x%Lx\n",
+		       smp_processor_id(), boot_pat_state, pat);
 }
 
 #undef PAT

      parent reply	other threads:[~2009-09-24  9:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-23 22:35 [PATCH 2/2] x86: Reduce verbosity of "PAT enabled" kernel message Roland Dreier
2009-09-23 22:47 ` Roland Dreier
2009-09-24  9:38   ` Ingo Molnar
2009-09-24 21:07     ` [PATCH] hrtimer: Remove overly verbose "switch to high res mode" message Roland Dreier
2009-09-24 21:12       ` Joe Perches
2009-09-24 21:15         ` Roland Dreier
2009-09-24 21:20           ` Joe Perches
2009-09-25  2:42           ` Valdis.Kletnieks
2009-09-27  6:10       ` [tip:timers/urgent] " tip-bot for Roland Dreier
2009-09-24  9:37 ` tip-bot for Roland Dreier [this message]

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-e23a8b6a8f319c0f08b6ccef2dccbb37e7603dc2@git.kernel.org \
    --to=rdreier@cisco.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=rolandd@cisco.com \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    --cc=venkatesh.pallipadi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.