All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Peter Zijlstra <peterz@infradead.org>,
	Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Ingo Molnar <mingo@kernel.org>, Borislav Petkov <bp@alien8.de>,
	Amy Wiles <amy.l.wiles@intel.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] x86/rapl: Do not load in a guest
Date: Fri, 04 Dec 2015 14:39:26 -0800	[thread overview]
Message-ID: <1142766D-212C-47CF-8400-89616715BCF8@zytor.com> (raw)
In-Reply-To: <20151204221446.GK17308@twins.programming.kicks-ass.net>

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.

      reply	other threads:[~2015-12-04 22:40 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-03 18:27 [PATCH] x86/rapl: Do not load in a guest Borislav Petkov
2015-12-03 18:38 ` Jacob Pan
2015-12-03 18:42   ` Borislav Petkov
2015-12-03 18:59     ` Jacob Pan
2015-12-03 23:32       ` Rafael J. Wysocki
2015-12-03 23:25         ` Borislav Petkov
2015-12-04  1:00           ` Rafael J. Wysocki
2015-12-04  7:42 ` Ingo Molnar
2015-12-04  8:22   ` Peter Zijlstra
2015-12-04  8:28     ` Ingo Molnar
2015-12-04 10:19       ` Borislav Petkov
2015-12-04 10:41         ` Paolo Bonzini
2015-12-04 10:56           ` Borislav Petkov
2015-12-04 11:53             ` Ingo Molnar
2015-12-04 17:46               ` Jacob Pan
2015-12-04 17:52                 ` Paolo Bonzini
2015-12-04 18:04                 ` Borislav Petkov
2015-12-04 18:16                   ` Jacob Pan
2015-12-04 18:28                     ` Borislav Petkov
2015-12-04 18:37                       ` Jacob Pan
2015-12-04 19:41                         ` Borislav Petkov
2015-12-04 17:51     ` Jacob Pan
2015-12-04 22:14       ` Peter Zijlstra
2015-12-04 22:39         ` H. Peter Anvin [this message]

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=1142766D-212C-47CF-8400-89616715BCF8@zytor.com \
    --to=hpa@zytor.com \
    --cc=acme@kernel.org \
    --cc=amy.l.wiles@intel.com \
    --cc=bp@alien8.de \
    --cc=jacob.jun.pan@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=tglx@linutronix.de \
    /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.