lkml.org 
[lkml]   [2011]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: still nfs problems [Was: Linux 2.6.37-rc8]
    On Thu, Jan 6, 2011 at 9:47 AM, Trond Myklebust
    <Trond.Myklebust@netapp.com> wrote:
    >
    > Why is this line needed? We're not writing through the virtual mapping.

    I haven't looked at the sequence of accesses, but you need to be
    _very_ aware that "write-through" is absolutely NOT sufficient for
    cache coherency.

    In cache coherency, you have three options:

    - true coherency (eg physically indexed/tagged caches)

    - exclusion (eg virtual caches, but with an exclusion guarantee that
    guarantees that aliases cannot happen: either by using physical
    tagging or by not allowing cases that could cause virtual aliases)

    - write-through AND non-cached reads (ie "no caching at all").

    You seem to be forgetting the "no cached reads" part. It's not
    sufficient to flush after a write - you need to make sure that you
    also don't have a cached copy of the alias for the read.

    So "We're not writing through the virtual mapping" is NOT a sufficient
    excuse. If you're reading through the virtual mapping, you need to
    make sure that the virtual mapping is flushed _after_ any writes
    through any other mapping and _before_ any reads through the virtual
    one.

    This is why you really really really generally don't want to have
    aliasing. Purely virtual caches are pure crap. Really.

    Linus


    \
     
     \ /
      Last update: 2011-01-06 19:03    [W:0.021 / U:92.760 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site