linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fenghua Yu <fenghua.yu@intel.com>
To: Andy Lutomirski <luto@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	H Peter Anvin <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ashok Raj <ashok.raj@intel.com>, Tony Luck <tony.luck@intel.com>,
	Ravi V Shankar <ravi.v.shankar@intel.com>,
	linux-kernel <linux-kernel@vger.kernel.org>, x86 <x86@kernel.org>
Subject: Re: [PATCH v5 0/5] x86/umwait: Enable user wait instructions
Date: Thu, 20 Jun 2019 16:28:29 -0700	[thread overview]
Message-ID: <20190620232829.GB238683@romley-ivt3.sc.intel.com> (raw)
In-Reply-To: <CALCETrVcnccgOtxzEYqjES3qXKMVofmFfOdcY8y3s4knbw7eow@mail.gmail.com>

On Thu, Jun 20, 2019 at 09:25:44AM -0700, Andy Lutomirski wrote:
> On Wed, Jun 19, 2019 at 6:43 PM Fenghua Yu <fenghua.yu@intel.com> wrote:
> > The sysfs interface files are in /sys/devices/system/cpu/umwait_control/
> 
> This might be a silly question, but: what do we envision as the use
> case for changing the C0.2 setting?  I'm wondering if we'll ever end
> up wanting it as a prctl() instead of a sysfs file.

There may be some use cases, e.g. C0.2 state is enabled for saving more
power when the system has less workloads and is disabled for better
performance when the system is busy, or a real time system wants to disable
C0.2 for better response time, etc.

We thought about controling C0.2 per process before. But if doing so, the
umwait control MSR is per proces and needs to be saved/restored in
context switch. xsave/xrestore doesn't support the MSR. So the overhead
of saving/restoring the MSR could be high, especially the overhead
may hurt real time apps.

And there is no clear usage cases for changing C0.2 per process.

We hope the current patches to be available in upstream first for its
simplity and usage.

If we find usage of controling C0.2 per process, we can add code later
and/or may have xsave/xrestore support for the MSR to speed up context
switch.

The current C0.2 control won't block potential per process control if
the per process control is supported in the future.

Thanks.

-Fenghua

      reply	other threads:[~2019-06-20 23:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-20  1:33 [PATCH v5 0/5] x86/umwait: Enable user wait instructions Fenghua Yu
2019-06-20  1:33 ` [PATCH v5 1/5] x86/cpufeatures: Enumerate " Fenghua Yu
2019-06-24  0:01   ` [tip:x86/cpu] " tip-bot for Fenghua Yu
2019-06-20  1:33 ` [PATCH v5 2/5] x86/umwait: Initialize umwait control values Fenghua Yu
2019-06-23 22:39   ` Thomas Gleixner
2019-06-24 22:12     ` Fenghua Yu
2019-06-24  0:01   ` [tip:x86/cpu] " tip-bot for Fenghua Yu
2019-06-20  1:33 ` [PATCH v5 3/5] x86/umwait: Add sysfs interface to control umwait C0.2 state Fenghua Yu
2019-06-23 22:40   ` Thomas Gleixner
2019-06-24  0:02   ` [tip:x86/cpu] " tip-bot for Fenghua Yu
2019-06-20  1:33 ` [PATCH v5 4/5] x86/umwait: Add sysfs interface to control umwait maximum time Fenghua Yu
2019-06-23 22:40   ` Thomas Gleixner
2019-06-24  0:03   ` [tip:x86/cpu] " tip-bot for Fenghua Yu
2019-06-20  1:33 ` [PATCH v5 5/5] x86/umwait: Document umwait control sysfs interfaces Fenghua Yu
2019-06-23 22:42   ` Thomas Gleixner
2019-06-23 22:46     ` Thomas Gleixner
2019-06-24  0:03   ` [tip:x86/cpu] Documentation/ABI: " tip-bot for Fenghua Yu
2019-06-20 16:25 ` [PATCH v5 0/5] x86/umwait: Enable user wait instructions Andy Lutomirski
2019-06-20 23:28   ` Fenghua Yu [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=20190620232829.GB238683@romley-ivt3.sc.intel.com \
    --to=fenghua.yu@intel.com \
    --cc=ashok.raj@intel.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=ravi.v.shankar@intel.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).