linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Reinette Chatre <reinette.chatre@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: fenghua.yu@intel.com, Tony Luck <tony.luck@intel.com>,
	vikas.shivappa@linux.intel.com, gavin.hindman@intel.com,
	jithu.joseph@intel.com, dave.hansen@intel.com, mingo@redhat.com,
	"H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [RFC PATCH 0/7] x86/intel_rdt: Restoration of Cache Pseudo-Locked regions
Date: Fri, 3 Aug 2018 08:40:25 -0700	[thread overview]
Message-ID: <05a621ec-adce-42b1-ea99-3bd8bac00e16@intel.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1808031343020.1745@nanos.tec.linutronix.de>

Hi Thomas,

On 8/3/2018 4:45 AM, Thomas Gleixner wrote:
> On Tue, 24 Jul 2018, Reinette Chatre wrote:
>> A Cache Pseudo-Locked region is vulnerable to certain instructions (INVD,
>> WBINVD, CLFLUSH) or deeper C-states (that could shrink or power off the
>> cache) evicting the pseudo-locked memory. The current support for
>> pseudo-locked regions already restrict deeper C-states on cores associated
>> with the pseudo-locked regions, but the vulnerability to some instructions
>> remain.
>>
>> This work does not prevent the instructions to which Cache Pseudo-Locked
>> regions are vulnerable, instead, this work support the restoration of
>> Cache Pseudo-Locked regions that can be triggered manually by the user
>> or automatically after the WBINVD instruction has been issued.
>>
>> A new debugfs file "pseudo_lock_restore" is associated with each
>> pseudo-locked region and can be used to manually trigger the memory
>> associated with the region to be pseudo-locked to cache again.
> 
> I'm not seeing how that should be used. What's the indication for an
> operator to write to that file?

Our primary indicator would come from the debugfs mechanism that the
user can use to accurately measure how well the data is pseudo-locked.
If that shows that some cache misses are encountered then the user has
the option to lock the data again.

A user may measure the success of a pseudo-lock region right after its
creation or if any performance issues are experienced by the application
that depends on this region. The latter may hint that there could be as
issue with the integration with power savings, a desctructive
instruction made it to the system, or some other cause that needs to be
investigated.

>> The system-wide "native_wbinvd()" is modified to trigger the restoration of
>> all Cache Pseudo-Locked regions after the WBINVD instruction returns and
>> effort is made to avoid any unnecessary work in this flow.
>>
>> Within the kernel two locations with direct invocations of the WBINVD
>> instruction are coverted to native_wbinvd() and compile tested. Neither
>> location is likely to be used on the platforms supporting Cache Pseudo-Locking.
> 
> Can we just get rid of WBINVD?

While directed at me I am not able to answer this. native_wbinvd() is
used in a few areas that appear important to me.

Reinette

  parent reply	other threads:[~2018-08-03 15:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24 20:40 [RFC PATCH 0/7] x86/intel_rdt: Restoration of Cache Pseudo-Locked regions Reinette Chatre
2018-07-24 20:40 ` [RFC PATCH 1/7] x86/intel_rdt: Expose useful functions to all RDT code Reinette Chatre
2018-07-24 20:40 ` [RFC PATCH 2/7] x86/intel_rdt: Enable a pseudo-locked region to be restored Reinette Chatre
2018-07-24 20:40 ` [RFC PATCH 3/7] x86/intel_rdt: Enable user to trigger pseudo-locked region restore Reinette Chatre
2018-07-24 20:40 ` [RFC PATCH 4/7] x86/intel_rdt: Support restore of all pseudo-locked regions Reinette Chatre
2018-07-24 20:40 ` [RFC PATCH 5/7] x86/intel_rdt: Trigger pseudo-lock restore after wbinvd call Reinette Chatre
2018-07-24 20:40 ` [RFC PATCH 6/7] mtd: replace direct wbinvd invoke with kernel api Reinette Chatre
2018-07-24 20:40 ` [RFC PATCH 7/7] video: fbdev: i810: " Reinette Chatre
2018-08-03 11:45 ` [RFC PATCH 0/7] x86/intel_rdt: Restoration of Cache Pseudo-Locked regions Thomas Gleixner
2018-08-03 14:23   ` Dave Hansen
2018-08-03 14:48     ` Peter Zijlstra
2018-08-03 15:40   ` Reinette Chatre [this message]
2018-08-03 15:51     ` Peter Zijlstra

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=05a621ec-adce-42b1-ea99-3bd8bac00e16@intel.com \
    --to=reinette.chatre@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=fenghua.yu@intel.com \
    --cc=gavin.hindman@intel.com \
    --cc=hpa@zytor.com \
    --cc=jithu.joseph@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=vikas.shivappa@linux.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).