All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Wei Liu" <wei.liu2@citrix.com>,
	"Jan Beulich" <JBeulich@suse.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: [PATCH 2/2] x86/mpparse: Don't print "limit reached" for every subsequent processor
Date: Fri, 17 May 2019 19:58:44 +0100	[thread overview]
Message-ID: <1558119524-318-2-git-send-email-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <1558119524-318-1-git-send-email-andrew.cooper3@citrix.com>

When you boot Xen with the default 256 NR_CPUS, on a box with rather more
processors, the resulting spew is unnecesserily verbose.  Instead, print the
message once, e.g:

 (XEN) ACPI: X2APIC (apic_id[0x115] uid[0x115] enabled)
 (XEN) WARNING: NR_CPUS limit of 256 reached - ignoring further processors
 (XEN) ACPI: X2APIC (apic_id[0x119] uid[0x119] enabled)
 (XEN) ACPI: X2APIC (apic_id[0x11d] uid[0x11d] enabled)
 (XEN) ACPI: X2APIC (apic_id[0x121] uid[0x121] enabled)

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/arch/x86/mpparse.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/mpparse.c b/xen/arch/x86/mpparse.c
index 16c93a9..f057d91 100644
--- a/xen/arch/x86/mpparse.c
+++ b/xen/arch/x86/mpparse.c
@@ -157,15 +157,16 @@ static int MP_processor_info_x(struct mpc_config_processor *m,
 	set_apicid(apicid, &phys_cpu_present_map);
 
 	if (num_processors >= nr_cpu_ids) {
-		printk(KERN_WARNING "WARNING: NR_CPUS limit of %u reached."
-			"  Processor ignored.\n", nr_cpu_ids);
+		printk_once(XENLOG_WARNING
+			    "WARNING: NR_CPUS limit of %u reached - ignoring further processors\n",
+			    nr_cpu_ids);
 		return -ENOSPC;
 	}
 
 	if (num_processors >= 8 && hotplug
 	    && genapic.name == apic_default.name) {
-		printk(KERN_WARNING "WARNING: CPUs limit of 8 reached."
-			" Processor ignored.\n");
+		printk_once(XENLOG_WARNING
+			    "WARNING: CPUs limit of 8 reached - ignoring futher processors\n");
 		return -ENOSPC;
 	}
 
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

WARNING: multiple messages have this Message-ID (diff)
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Wei Liu" <wei.liu2@citrix.com>,
	"Jan Beulich" <JBeulich@suse.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: [Xen-devel] [PATCH 2/2] x86/mpparse: Don't print "limit reached" for every subsequent processor
Date: Fri, 17 May 2019 19:58:44 +0100	[thread overview]
Message-ID: <1558119524-318-2-git-send-email-andrew.cooper3@citrix.com> (raw)
Message-ID: <20190517185844.6DM6w7NZ85QEn1fQXcQLffZf71-W_A9hYcYeixe-KMc@z> (raw)
In-Reply-To: <1558119524-318-1-git-send-email-andrew.cooper3@citrix.com>

When you boot Xen with the default 256 NR_CPUS, on a box with rather more
processors, the resulting spew is unnecesserily verbose.  Instead, print the
message once, e.g:

 (XEN) ACPI: X2APIC (apic_id[0x115] uid[0x115] enabled)
 (XEN) WARNING: NR_CPUS limit of 256 reached - ignoring further processors
 (XEN) ACPI: X2APIC (apic_id[0x119] uid[0x119] enabled)
 (XEN) ACPI: X2APIC (apic_id[0x11d] uid[0x11d] enabled)
 (XEN) ACPI: X2APIC (apic_id[0x121] uid[0x121] enabled)

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/arch/x86/mpparse.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/mpparse.c b/xen/arch/x86/mpparse.c
index 16c93a9..f057d91 100644
--- a/xen/arch/x86/mpparse.c
+++ b/xen/arch/x86/mpparse.c
@@ -157,15 +157,16 @@ static int MP_processor_info_x(struct mpc_config_processor *m,
 	set_apicid(apicid, &phys_cpu_present_map);
 
 	if (num_processors >= nr_cpu_ids) {
-		printk(KERN_WARNING "WARNING: NR_CPUS limit of %u reached."
-			"  Processor ignored.\n", nr_cpu_ids);
+		printk_once(XENLOG_WARNING
+			    "WARNING: NR_CPUS limit of %u reached - ignoring further processors\n",
+			    nr_cpu_ids);
 		return -ENOSPC;
 	}
 
 	if (num_processors >= 8 && hotplug
 	    && genapic.name == apic_default.name) {
-		printk(KERN_WARNING "WARNING: CPUs limit of 8 reached."
-			" Processor ignored.\n");
+		printk_once(XENLOG_WARNING
+			    "WARNING: CPUs limit of 8 reached - ignoring futher processors\n");
 		return -ENOSPC;
 	}
 
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-05-17 18:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-17 18:58 [PATCH 1/2] xen/lib: Introduce printk_once() and replace some opencoded examples Andrew Cooper
2019-05-17 18:58 ` [Xen-devel] " Andrew Cooper
2019-05-17 18:58 ` Andrew Cooper [this message]
2019-05-17 18:58   ` [Xen-devel] [PATCH 2/2] x86/mpparse: Don't print "limit reached" for every subsequent processor Andrew Cooper
2019-05-20  8:26   ` Jan Beulich
2019-05-20  8:26     ` [Xen-devel] " Jan Beulich
2019-05-20  8:24 ` [PATCH 1/2] xen/lib: Introduce printk_once() and replace some opencoded examples Jan Beulich
2019-05-20  8:24   ` [Xen-devel] " Jan Beulich
2019-05-31 17:20 ` Julien Grall
2019-05-31 17:20   ` [Xen-devel] " Julien Grall

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=1558119524-318-2-git-send-email-andrew.cooper3@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=roger.pau@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.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 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.