From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leon Romanovsky Subject: Re: [PATCH -next v1] x86/apic: Reduce print level of CPU limit announcement Date: Wed, 27 Mar 2019 11:53:37 +0200 Message-ID: <20190327095337.GP22899@mtr-leonro.mtl.com> References: <20190327090905.5588-1-leon@kernel.org> <20190327093844.GO22899@mtr-leonro.mtl.com> <55774b1a8c82e94b2796c992889929f1da905d9b.camel@perches.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="iAzLNm1y1mIRgolD" Return-path: Content-Disposition: inline In-Reply-To: <55774b1a8c82e94b2796c992889929f1da905d9b.camel@perches.com> Sender: linux-kernel-owner@vger.kernel.org To: Joe Perches Cc: "Rafael J . Wysocki" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86 , "H. Peter Anvin" , linux-pm , LKML List-Id: linux-pm@vger.kernel.org --iAzLNm1y1mIRgolD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Mar 27, 2019 at 02:49:02AM -0700, Joe Perches wrote: > On Wed, 2019-03-27 at 11:38 +0200, Leon Romanovsky wrote: > > On Wed, Mar 27, 2019 at 02:17:40AM -0700, Joe Perches wrote: > > > On Wed, 2019-03-27 at 11:09 +0200, Leon Romanovsky wrote: > > > > Kernel is booted with less possible CPUs (possible_cpus kernel boot > > > > option) than available CPUs will have prints like this: > > > [] > > > > diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c > > > [] > > > > @@ -2305,9 +2305,9 @@ int generic_processor_info(int apicid, int version) > > > > if (num_processors >= nr_cpu_ids) { > > > > int thiscpu = max + disabled_cpus; > > > > > > > > - pr_warning("APIC: NR_CPUS/possible_cpus limit of %i " > > > > - "reached. Processor %d/0x%x ignored.\n", > > > > - max, thiscpu, apicid); > > > > + pr_debug( > > > > + "APIC: NR_CPUS/possible_cpus limit of %i reached. Processor %d/0x%x ignored.\n", > > > > + max, thiscpu, apicid); > > > > > > 2 lines please > > > > > > pr_debug("APIC: etc...", > > > max, thiscpu, ...); > > > > It was two lines before, but I changed for two reasons: > > * It helped me to grep the source code to find the origin of dmesg warning. > > * i got checkpatch warning about spitted string, can you please fix checkpatch do not complain? > > Yes, use > > pr_debug("APIC: NR_CPUS/possible_cpus limit of %i reached. Processor %d/0x%x ignored.\n", > max, thiscpu, apicid); Ahh, I see, I got such change from clang formatter. > > or better > > printk(KERN_DEBUG "APIC: NR_CPUS/possible_cpus limit of %i reached. Processor %d/0x%x ignored.\n", > max, thiscpu, apicid); > > > > And this would probably be better as > > > > > > printk(KERN_DEBUG "APIC: etc...", > > > ...) > > > > > > to avoid the need to compile with DEBUG or enable > > > with CONFIG_DYNAMIC_DEBUG > > > > You don't need anything like this, just provide dyndbg parameters > > through kernel command line. > > That assumes CONFIG_DYNAMIC_DEBUG is always enabled, > and it is not enabled in many .config files. No problem. Thanks > > --iAzLNm1y1mIRgolD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJcm0ghAAoJEORje4g2clin2TkQAL5lsnCzSU+icL1QOf/R3agE /yqUK/BooXbO2coECOqeqBQi6zMHSopgd7cP1at5E2ejcMvSU/dyBcrKRVhlCY3H 6NXDkxLwg/ApLUR1qfgE3mxSiMgvPPyQioaOSKJOmhnufsPfFI8agxtXGCvMXu7v NlGNZQDb77UhxLZ1srbP6ArAPZpViwfDKI8e0iB53drTGwX+eA2AOxo0l7xOY/Rz DMFvGzJ1V8pXt48idho6kMpPaBCn+6tqkPvs7ToGaeYoo8o1qRbprc83GfxvWGtT A6BEfzk1MqSEg7T/a4E6ZAa4qVgqKBaXbk1sCUbzQ9ZfZmB44Lz56xaJky5ck7qS 0iiJULobEMHSqQLq7KiBUWRbkCooYulT0z1zXgZ/O/BmgURQjaT34+gArqsqIOsU 92qzMlhnPGjOzmdJRaa5Mx7FzOSQYKz/pCbjSRpNwTD7tSzULF76McZ38hNb1/TG E2e6ggtSRkadV3mtFggBSTEuaPONS/Wytpj6g+9waPdRvBqcK39waTPusa0df4s7 K+5KyVvKp32euBl+xpZ6uACQacuVkB5j6mBA6kGysLLeYLOGHFa7G4eJiXKi6fGr NAZ6793PrZzGmAyyZtnpZ9h1iK3eeDVolILUqxYZy3fX6K4vI5sVhEYsGreclifT aeQE8DMQjDTuzExzqlQ/ =uaJK -----END PGP SIGNATURE----- --iAzLNm1y1mIRgolD--