From: Badari Pulavarty <pbadari@us.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-fsdevel@vger.kernel.org,
ext2-devel <ext2-devel@lists.sourceforge.net>
Subject: Re: Bufferheads & page-cache reference
Date: 15 Feb 2005 08:46:07 -0800 [thread overview]
Message-ID: <1108485967.20053.1438.camel@dyn318077bld.beaverton.ibm.com> (raw)
In-Reply-To: <20050214190556.07c4a0c9.akpm@osdl.org>
On Mon, 2005-02-14 at 19:05, Andrew Morton wrote:
> Badari Pulavarty <pbadari@us.ibm.com> wrote:
> >
> > Is there anything wrong, if we tear down bufferheads after the
> > writepage/writepages is complete ? may be "-nobh" option for ext3 ?
>
> The I/O completion will happen in interrupt context, which isn't really a
> good place to remove those bh's - the buffer_heads would need to be removed
> from their journal_heads first. That's assuming data=ordered.
>
> For data=writeback we could perhaps inspect buffer_heads_over_limit in
> end_buffer_async_write(), and if true, try to strip the buffers in
> interrupt context.
>
> For data=ordered the best place would be in checkpoint.c somewhere, where
> we're detaching buffer_heads from a completed transaction: trylock the
> page, strip the journal_heads, try to strip the buffers, unlock page.
Makes sense. But I am not going to do it, till I figure out *if* there
is a real issue with bufferheads & doing this makes sense.
>
> > 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 ?
>
> For ext2 nobh we never attach buffer_heads to regular pagecache pages.
> They're only used for metadata. nobh_prepare_write() doesn't add them and
> neither does writepages().
Hmm..
Yep. nobh_prepare_write() doesn't add any bufferheads. But
we call block_write_full_page() even for "nobh" case, which
does create bufferheads, attaches to the page and operates
on them..
__block_write_full_page()
{
....
....
if (!page_has_buffers(page)) {
create_empty_buffers(page, 1 << inode->i_blkbits,
(1 << BH_Dirty)|(1 << BH_Uptodate));
}
...
}
I am missing something really simple here. What is it ?
Thanks,
Badari
next prev parent reply other threads:[~2005-02-15 16:45 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-14 19:30 Bufferheads & page-cache reference Badari Pulavarty
2005-02-14 19:31 ` [Ext2-devel] " Sonny Rao
2005-02-14 21:40 ` Andrew Morton
2005-02-14 22:10 ` William Lee Irwin III
2005-02-14 22:31 ` Andrew Morton
2005-02-14 22:50 ` William Lee Irwin III
2005-02-15 0:22 ` Badari Pulavarty
2005-02-15 2:57 ` Andrew Morton
2005-02-15 16:03 ` Badari Pulavarty
2005-02-15 17:26 ` Andrew Morton
2005-02-15 1:27 ` Badari Pulavarty
2005-02-15 3:05 ` Andrew Morton
2005-02-15 16:46 ` Badari Pulavarty [this message]
2005-02-15 17:54 ` Andrew Morton
2005-02-15 18:15 ` Badari Pulavarty
2005-02-15 19:07 ` Nikita Danilov
2005-02-15 19:39 ` Badari Pulavarty
2005-02-15 20:00 ` Andrew Morton
2005-02-16 0:02 ` [RFC] [PATCH] Generic mpage_writepage() support Badari Pulavarty
2005-02-16 11:41 ` Nikita Danilov
2005-02-16 18:37 ` Badari Pulavarty
2005-02-16 19:09 ` Dave Kleikamp
2005-02-16 19:28 ` Badari Pulavarty
2005-02-16 19:43 ` Dave Kleikamp
2005-02-16 21:38 ` [Ext2-devel] " Badari Pulavarty
2005-02-16 21:46 ` Dave Kleikamp
2005-02-17 0:13 ` [RFC] [PATCH] nobh_write_page() support Badari Pulavarty
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1108485967.20053.1438.camel@dyn318077bld.beaverton.ibm.com \
--to=pbadari@us.ibm.com \
--cc=akpm@osdl.org \
--cc=ext2-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).