lkml.org 
[lkml]   [2019]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [GIT PULL] x86/mm changes for v4.21
From
Date


> On Feb 7, 2019, at 2:53 PM, Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
>> On Thu, Feb 7, 2019 at 1:24 PM Andy Lutomirski <luto@amacapital.net> wrote:
>>
>> How bad would it be to set CR0.CD while fiddling with the page tables rather than masking the address?
>
> I would suggest against it. When you disable caching, things don't
> just go "slightly slower". Everything comes to a screeching halt, with
> instruction fetch etc becoming a serious problem.
>
> So disabling caching for a few instructions in a very simple asm
> snippet might be reasonable (particularly since you could pre-fetch
> the cache and just rely on CR0.CD not fetching *new* lines). But doing
> it in C code that might have things like tracing enabled etc? I'd be
> very very leery.
>
>

In principle, it’s just the code that walks the page tables and changes the mode. But we could get a perf NMI and take who knows how long to process it if caching is off.
\
 
 \ /
  Last update: 2019-02-08 00:06    [W:0.254 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site