From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932400AbcFJKF5 (ORCPT ); Fri, 10 Jun 2016 06:05:57 -0400 Received: from mail.skyhub.de ([78.46.96.112]:47800 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932110AbcFJKFz (ORCPT ); Fri, 10 Jun 2016 06:05:55 -0400 Date: Fri, 10 Jun 2016 11:54:39 +0200 From: Borislav Petkov To: Andi Kleen Cc: x86@kernel.org, hmh@hmh.eng.br, elliott@hpe.com, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH] x86/microcode/intel: Quieten down microcode updates on large systems Message-ID: <20160610095439.GA6706@pd.tnic> References: <20160609134141.5981-1-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160609134141.5981-1-andi@firstfloor.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 09, 2016 at 06:41:41AM -0700, Andi Kleen wrote: > From: Andi Kleen > > On large systems the microcode driver is very noisy, because it prints > a line for each CPU. The lines are redundant because because usually > all CPUs are updated to the same microcode revision. > > All other subsystems have been patched previously to not print > a line for each CPU. Only the microcode driver is left. > > Only print an microcode revision update when something changed. This results > in typically only a single line being printed. > > v2: Change message to "One or more CPUs" > Signed-off-by: Andi Kleen > --- > arch/x86/kernel/cpu/microcode/intel.c | 25 ++++++++++++++++++------- > 1 file changed, 18 insertions(+), 7 deletions(-) > > diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c > index cbb3cf0..54f5f6c 100644 > --- a/arch/x86/kernel/cpu/microcode/intel.c > +++ b/arch/x86/kernel/cpu/microcode/intel.c > @@ -794,6 +794,7 @@ void reload_ucode_intel(void) > > static int collect_cpu_info(int cpu_num, struct cpu_signature *csig) > { > + static struct cpu_signature prev; > struct cpuinfo_x86 *c = &cpu_data(cpu_num); > unsigned int val[2]; > > @@ -808,8 +809,14 @@ static int collect_cpu_info(int cpu_num, struct cpu_signature *csig) > } > > csig->rev = c->microcode; > - pr_info("CPU%d sig=0x%x, pf=0x%x, revision=0x%x\n", > - cpu_num, csig->sig, csig->pf, csig->rev); > + > + /* No extra locking on prev, races are harmless. */ > + if (csig->sig != prev.sig || csig->pf != prev.pf || > + csig->rev != prev.rev) { > + pr_info("One or more CPUs sig=0x%x, pf=0x%x, revision=0x%x\n", This "One or more CPUs" is just silly. I've removed it while applying. This way, there's no mentioning of CPUs and people can check /proc/cpuinfo for that. Thanks. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.