linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: Andi Kleen <ak@linux.intel.com>,
	LKML <linux-kernel@vger.kernel.org>, X86 ML <x86@kernel.org>,
	Andrew Lutomirski <luto@kernel.org>
Subject: Re: [RFC PATCH, x86]: Disable CPA cache flush for selfsnoop targets
Date: Mon, 15 Jul 2019 21:30:12 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1907152129350.1767@nanos.tec.linutronix.de> (raw)
In-Reply-To: <CAFULd4bcB8tsgZuxZJm_ksp5zyDQXjO=v_Ov622Bmhx=fr7KuA@mail.gmail.com>

On Mon, 15 Jul 2019, Uros Bizjak wrote:
> On Mon, Jul 15, 2019 at 8:41 PM Thomas Gleixner <tglx@linutronix.de> wrote:
> >
> > On Mon, 15 Jul 2019, Andi Kleen wrote:
> > > Uros Bizjak <ubizjak@gmail.com> writes:
> > >
> > > > Recent patch [1] disabled a self-snoop feature on a list of processor
> > > > models with a known errata, so we are confident that the feature
> > > > should work on remaining models also for other purposes than to speed
> > > > up MTRR programming.
> > >
> > > MTRR is very different than TLBs.
> > >
> > > >From my understanding not flushing with PAT is only safe everywhere when
> > > the memory is only used for coherent devices (like the Internal GPU on
> > > Intel CPUs). We don't have any infrastructure to track or enforce
> > > this unfortunately.
> >
> > Right, we don't know where the PAT invocation comes from and whether they
> > are safe to omit flushing the cache. The module load code would be one
> > obvious candidate.
> >
> > But unless there is some really worthwhile speedup, e.g. for boot, then
> > adding some flag to let CPA know about the safe 'no flush' operation might
> > be not worth it.
> 
> For the reference, FreeBSD implements this approach, later changed to
> use pmap_invalidate_cache_range ifunc (that calls
> pmap_invalidate_cache_range_selfsnoop for targets with self-snoop
> capability) and pmap_force_invalidate_cache_range [1]. The full
> cross-referenced source is at [2].

That does not answer the question whether it's worthwhile to do that.

Thanks,

	tglx

  reply	other threads:[~2019-07-15 19:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-11  8:12 [RFC PATCH, x86]: Disable CPA cache flush for selfsnoop targets Uros Bizjak
2019-07-11 14:39 ` Andy Lutomirski
2019-07-11 19:00   ` Uros Bizjak
2019-07-15  8:24 ` Thomas Gleixner
2019-07-15 12:04   ` Uros Bizjak
2019-07-15 16:31 ` Andi Kleen
2019-07-15 18:41   ` Thomas Gleixner
2019-07-15 19:19     ` Uros Bizjak
2019-07-15 19:30       ` Thomas Gleixner [this message]
2019-07-15 19:38         ` Andi Kleen
2019-07-15 22:12           ` Andy Lutomirski
2019-07-15 22:53             ` Andi Kleen
2019-07-15 23:10               ` Andy Lutomirski
2019-07-16  0:32                 ` Andi Kleen
2019-07-15 19:39     ` Andi Kleen
2019-07-15 19:44       ` Andy Lutomirski
2019-07-15 19:46       ` Thomas Gleixner

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=alpine.DEB.2.21.1907152129350.1767@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=ak@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=ubizjak@gmail.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).