All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: Borislav Petkov <borislav.petkov@amd.com>
Cc: Ingo Molnar <mingo@elte.hu>, Borislav Petkov <bp@amd64.org>,
	"tigran@aivazian.fsnet.co.uk" <tigran@aivazian.fsnet.co.uk>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"Herrmann3, Andreas" <Andreas.Herrmann3@amd.com>,
	"amd64-microcode@amd64.org" <amd64-microcode@amd64.org>,
	"Rafael J. Wysocki" <rjw@sisk.pl>, Tejun Heo <tj@kernel.org>,
	Linux PM mailing list <linux-pm@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] CPU hotplug,x86 Microcode: Don't request microcode from userspace unnecessarily
Date: Mon, 10 Oct 2011 01:08:22 +0530	[thread overview]
Message-ID: <4E91F82E.4080007@linux.vnet.ibm.com> (raw)
In-Reply-To: <20111009112755.GC17926@aftab>

On 10/09/2011 04:57 PM, Borislav Petkov wrote:
> On Sat, Oct 08, 2011 at 04:47:53PM -0400, Srivatsa S. Bhat wrote:
>> Requesting the microcode from userspace *every time* when onlining CPUs
>> (during a CPU hotplug operation) is unnecessary.
>>
>> So, this patch ensures that once the kernel gets the microcode after booting,
>> it is not freed nor invalidated when a CPU goes offline, so that it can be
>> reused when that CPU comes back online, without requesting userspace for it
>> again. As a result, the CPU hotplug operations become faster as well.
>>
>> Tested-by: Borislav Petkov <bp@amd64.org>
>> Acked-by: Borislav Petkov <bp@amd64.org>
>> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
> 
> Good, thanks. Just a minor nitpick below.
> 
>> ---
>>
>>  arch/x86/kernel/microcode_core.c |    8 +++++++-
>>  1 files changed, 7 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c
>> index f924280..3fd0189 100644
>> --- a/arch/x86/kernel/microcode_core.c
>> +++ b/arch/x86/kernel/microcode_core.c
>> @@ -483,7 +483,13 @@ mc_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu)
>>  		sysfs_remove_group(&sys_dev->kobj, &mc_attr_group);
>>  		pr_debug("CPU%d removed\n", cpu);
>>  		break;
>> -	case CPU_DEAD:
>> +
>> +	/* When a CPU goes offline, don't free up or invalidate the copy of
>> +	 * the microcode in kernel memory, so that we can reuse it when the
>> +	 * CPU comes back online without unnecessarily requesting the userspace
>> +	 * for it again.
>> +	 */
>> +
> 
> Kernel comment style is in this format:
> 
> /*
>  * Blabla
>  * blublu
>  */
> 
Oh, ok.. Thank you for pointing it out.

> @Ingo, can you please adjust it in-flight when applying?

I'll post the patch with the correct comment style, if that would make
things easier.
-- 
Regards,
Srivatsa S. Bhat  <srivatsa.bhat@linux.vnet.ibm.com>
Linux Technology Center,
IBM India Systems and Technology Lab

  reply	other threads:[~2011-10-09 19:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-08 20:47 [PATCH] CPU hotplug,x86 Microcode: Don't request microcode from userspace unnecessarily Srivatsa S. Bhat
2011-10-09 11:27 ` Borislav Petkov
2011-10-09 19:38   ` Srivatsa S. Bhat [this message]
2011-10-09 19:42     ` [PATCH RESEND] " Srivatsa S. Bhat
2011-10-10 20:58       ` Rafael J. Wysocki
2011-10-10 21:13         ` Borislav Petkov
2011-10-10 21:18           ` Rafael J. Wysocki
2011-10-11  8:41       ` Andreas Herrmann

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=4E91F82E.4080007@linux.vnet.ibm.com \
    --to=srivatsa.bhat@linux.vnet.ibm.com \
    --cc=Andreas.Herrmann3@amd.com \
    --cc=amd64-microcode@amd64.org \
    --cc=borislav.petkov@amd.com \
    --cc=bp@amd64.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=rjw@sisk.pl \
    --cc=tglx@linutronix.de \
    --cc=tigran@aivazian.fsnet.co.uk \
    --cc=tj@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 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.