lkml.org 
[lkml]   [2011]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] CPU hotplug,x86 Microcode: Don't request microcode from userspace unnecessarily
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


\
 
 \ /
  Last update: 2011-10-09 21:41    [W:0.289 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site