lkml.org 
[lkml]   [2001]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: Getting FS access events
    Date
    On Tuesday 15 May 2001 08:57, Alexander Viro wrote:
    > On Tue, 15 May 2001, Richard Gooch wrote:
    > > > What happens if you create a buffer cache entry? Does that
    > > > invalidate the page cache one? Or do you just allow invalidates
    > > > one way, and not the other? And why=
    > >
    > > I just figured on one way invalidates, because that seems cheap and
    > > easy and has some benefits. Invalidating the other way is costly,
    > > so don't bother, even if there were some benefits.
    >
    > Cute.
    > * create an instance in pagecache
    > * start reading into buffer cache (doesn't invalidate, right?)
    > * start writing using pagecache
    > * lose the page
    > * try to read it (via pagecache)
    > Woops - just found a copy in buffer cache, let's pick data from it.
    > Pity that said data is obsolete...

    That's because you left out his invalidate:

    * create an instance in pagecache
    * start reading into buffer cache (doesn't invalidate, right?)
    * start writing using pagecache (invalidate buffer copy)
    * lose the page
    * try to read it (via pagecache)

    Everthing ok. As an optimization, instead of 'lose the page', do 'move
    page blocks to buffer cache'.

    --
    Daniel
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 12:53    [W:0.021 / U:30.392 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site