lkml.org 
[lkml]   [2014]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC 2/5] x86: Store a per-cpu shadow copy of CR4
    On Tue, Oct 14, 2014 at 03:57:36PM -0700, Andy Lutomirski wrote:
    > Context switches and TLB flushes can change individual bits of CR4.
    > CR4 reads take several cycles, so store a shadow copy of CR4 in a
    > per-cpu variable.
    >
    > To avoid wasting a cache line, I added the CR4 shadow to
    > cpu_tlbstate, which is already touched during context switches.

    I'm a little confused. We should be more specific I suppose, context
    switches don't always change mm, but CR4 state is per task.

    From a quick look, only switch_mm() pokes at tlb, switch_to() does not.




    \
     
     \ /
      Last update: 2014-10-16 11:01    [W:3.021 / U:1.280 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site