lkml.org 
[lkml]   [2011]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [patch] x86, mm: avoid stale tlb entries by clearing prev mm_cpumask after switching mm
    From
    Date
    On Wed, 2011-02-02 at 17:23 -0800, Andi Kleen wrote:
    > Suresh Siddha <suresh.b.siddha@intel.com> writes:
    >
    > > For the prev mm that is handing over the cpu to another mm, clear the cpu
    > > from the mm_cpumask(prev) after the cr3 is changed.
    > >
    > > Otherwise, clearing the mm_cpumask early will avoid the flush tlb IPI's while
    > > the cr3 and TLB's are still pointing to the prev mm. And this window can lead
    > > to the stale (global) TLB entries.
    > >
    > > Marking it for -stable, though we haven't seen any reported failure that
    > > can be attributed to this.
    >
    > Would it be safer to add a memory barrier between the load_cr3 and the
    > cpumask_clear_cpu()? As far as I can see cpumask_clear_cpu doesn't
    > imply a general one and load_cr3 doesn't either. There's this
    > __force_order hack in system.h, but I don't think it will enforce
    > order here.

    I thought "asm volatile" is going to take care of that.

    If not, then we have issues even today. no?

    thanks,
    suresh



    \
     
     \ /
      Last update: 2011-02-03 02:59    [W:0.022 / U:119.648 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site