[lkml]   [2019]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [RFC PATCH, x86]: Disable CPA cache flush for selfsnoop targets
On Mon, Jul 15, 2019 at 12:38 PM Andi Kleen <> wrote:
> >
> > That does not answer the question whether it's worthwhile to do that.
> It's likely worthwhile for (Intel integrated) graphics.
> There was also a recent issue with 3dxp/dax, which uses ioremap in some
> cases.

FWIW, I applied this simpler patch:

diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 6a9a77a403c9..a933f99b176a 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -1729,6 +1729,7 @@ static int change_page_attr_set_clr(unsigned
long *addr, int numpages,
* attributes:
cache = !!pgprot2cachemode(mask_set);
+ WARN_ON(cache);

* On error; flush everything to be sure.
and booted a VM, including loading a module. The warning did not
fire. For the most part, we use PAT for things like ioremap_wc(), but
there's no flush, since there's no preexisting mapping at all.

I haven't tested on a real kernel with i915. Does i915 really hit
this code path? Does it happen more than once or twice at boot?

The only case I can think of where this would really matter is DAX, if
anyone uses WT for DAX.

 \ /
  Last update: 2019-07-16 00:13    [W:0.054 / U:20.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site