lkml.org 
[lkml]   [2012]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] perf/x86: check ucode before disabling PEBS on SandyBridge
From
Date
On Fri, 2012-06-08 at 20:05 +0200, Borislav Petkov wrote:
> How about this: since the ucode cannot be downgraded and since higher
> ucode versions are supposed to fix current and older problems (otherwise
> ucoders will get an earlfull) you shouldn't be needing to verify the
> ucode version on all CPUs per-CPU, i.e. the O(n^2) overhead.
>
> Rather, simply track which CPUs _haven't_ been updated yet, and once
> this is the empty set, run the verify thing to check ucode version on
> all CPUs.
>
> And this should happen only when we update ucode from version A to
> version B, where B > A.
>
> And unless I'm missing something, this should be O(n) and ucode update
> should happen very seldomly anyway.

Checking a bitmap of n bits for being all zero is O(n), so the total is
still O(n^2). Still, probably faster than the for_each_online_cpu() scan
I do now.




\
 
 \ /
  Last update: 2012-06-08 21:41    [W:0.284 / U:1.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site