On Mon, 2005-02-14 at 13:40, Andrew Morton wrote:
> Badari Pulavarty <[EMAIL PROTECTED]> wrote:
> >
> > I see that as part of bufferheads to page association, we get a
> >  ref. on the page.
> > 
> >    create_empty_buffers() -> attach_page_buffers() -> page_cache_get()
> > 
> >  I also see that this reference get dropped by ..
> > 
> >    shrink_list() -> try_to_release_page() ->
> >          try_to_free_buffers() -> drop_buffers() ->
> >                   __clear_page_buffers()-> page_cache_release();
> > 
> >  So, it looks like we drop the reference on the page and disassociate
> >  bufferheads from the page when VM wants to re-use the page. Only other
> >  path, I see this can happen is through invalidate_mapping_pages().
> >  Is this true ?
> > 
> >  If I do fsync(), we flush the data - still leave the page & bufferhead
> >  association. If I see lots of bufferheads even after fsync() is normal.
> >  Correct ?
> 
> Seems about right.  There's also the buffer_heads_over_limit logic in
> mm/vmscan.c and fs/buffer.c.  That logic has a hole in that it requires
> that there be a highmem shortage before we start to reclaim the lowmem
> buffer_heads, but it is somewhat helpful.
> 

Is there anything wrong, if we tear down bufferheads after the
writepage/writepages is complete ? may be "-nobh" option for ext3 ?

Even for ext2 with "-nobh" and JFS - we seem to attach buffer heads
to page in __block_write_full_page() and leave them around. I was
thinking, they gets tossed out after the write-out completes. No ?

These bufferheads are driving me crazy :)

Thanks,
Badari

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to