[lkml]   [1999]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [patch] flushpage and buffercache size

    On Tue, 3 Aug 1999, Andrea Arcangeli wrote:
    > The current (2.3.12) flushpage done over a whole page (to release all the
    > bh headers) is doing:
    > if (!offset) {
    > if (!try_to_free_buffers(page))
    > atomic_add(PAGE_CACHE_SIZE, &buffermem);
    > }
    > But IMO the try_to_free_buffers() should never fail (well except in
    > the ramdisk case that seems to be not addressed yet). The buffer is
    > trashed, it's been completly invalidated and there's no reason for left it
    > in memory.

    What if somebody was in the process of reading from an old-style buffer
    head, or had a count active on a buffer? bdflush might have raced with the
    free logic - the IO has ended, but bdflush still has bh->b_count elevated
    or something.

    In short, I'm certain that the current code is safe. I'm not sure at all
    that your suggestion is safe.


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

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