[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170130123128.GJ6515@twins.programming.kicks-ass.net>
Date: Mon, 30 Jan 2017 13:31:28 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: John Ogness <john.ogness@...utronix.de>
Cc: linux-rt-users <linux-rt-users@...r.kernel.org>,
Sebastian Siewior <bigeasy@...utronix.de>,
linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
x86@...nel.org, fenghua.yu@...el.com, h.peter.anvin@...el.com,
vikas.shivappa@...ux.intel.com, tony.luck@...el.com,
davidcc@...gle.com, dave.hansen@...el.com, eranian@...gle.com
Subject: Re: [PATCHv2] x86/mm/cpa: avoid wbinvd() for PREEMPT
On Mon, Jan 30, 2017 at 09:41:21AM +0100, John Ogness wrote:
> Although wbinvd() is faster than flushing many individual pages, it
> blocks the memory bus for "long" periods of time (>100us), thus
> directly causing unusually large latencies on all CPUs, regardless
> of any CPU isolation features that may be active.
>
> For 1024 pages, flushing those pages individually can take up to
> 2200us, but the task remains fully preemptible during that time.
>
> Signed-off-by: John Ogness <john.ogness@...utronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>
I think we need an additional patch to deal with CAT, but we can easily
do that later.
I've thought about that situation a bit and wbinvd cannot and must not
respect the CAT mask because while all the new lines brought in by the
current context are constrained, lines shared with another context, or
if the current context changed might well be outside the current mask.
In any case, this is a unprivileged interface, and therefore I feel we
need to remove the wbinvd usage entirely, esp. if CAT is enabled.
But like said, we can do that in a follow up patch.
Powered by blists - more mailing lists