lkml.org 
[lkml]   [2015]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86/rapl: Do not load in a guest
From
Date
On December 4, 2015 2:14:46 PM PST, Peter Zijlstra <peterz@infradead.org> wrote:
>On Fri, Dec 04, 2015 at 09:51:02AM -0800, Jacob Pan wrote:
>> On Fri, 4 Dec 2015 09:22:56 +0100
>> Peter Zijlstra <peterz@infradead.org> wrote:
>>
>> > Also, yuck @ powercap/intel_rapl.c for doing rdmsr_on_cpu() +
>> > wrmsr_on_cpu() all over the place.
>> Can you please be more specific? is the concern related to the
>> overhead of IPI? I am doing these calls based on MSR CPU scope and
>> consider the fact that access is less frequent.
>
>Yeah, its just offensive to do an IPI to read a value, then twiddle a
>few bits on the value and then IPI again to store the value.
>
>I know its low freq, and that MSR access is slow, but *groan*.

Yes, for that it would be better to invoke a common routine to do all the accesses on the target CPU. MSR accesses may be slow, but IPIs are way slower.
--
Sent from my Android device with K-9 Mail. Please excuse brevity and formatting.


\
 
 \ /
  Last update: 2015-12-05 00:01    [W:1.123 / U:1.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site