From: Wu Fengguang <wfg@mail.ustc.edu.cn>
To: linux-kernel@vger.kernel.org
Subject: Fwd: Re: ext3_readdir() readahead problem
Date: Thu, 10 Nov 2005 16:55:03 +0800 [thread overview]
Message-ID: <20051110085503.GC5797@mail.ustc.edu.cn> (raw)
[-- Attachment #1: Type: text/plain, Size: 79 bytes --]
Just in case this piece of message will benefit someone in the mailing list ;)
[-- Attachment #2: Type: message/rfc822, Size: 4019 bytes --]
From: Andrew Morton <akpm@osdl.org>
To: Wu Fengguang <wfg@mail.ustc.edu.cn>
Subject: Re: ext3_readdir() readahead problem
Date: Wed, 9 Nov 2005 21:21:06 -0800
Message-ID: <331600106.28353@ustc.edu.cn>
Message-ID: <20051109212106.1a636706.akpm@osdl.org>
Wu Fengguang <wfg@mail.ustc.edu.cn> wrote:
>
> On Wed, Nov 09, 2005 at 07:34:58PM -0800, Andrew Morton wrote:
> > Wu Fengguang <wfg@mail.ustc.edu.cn> wrote:
> > Ah, OK. Rather than showing a stream of numbers it really helps if you can
> > tell people what the numbers _mean_.
> Got it. Thanks!
> > > >
Minor point: your email are mush more readable if you put a blank line
before and after your paragraphs, like this ;)
> >
> > Part of the page. If PAGE_CACHE_SIZE=4k and it's a 1k blocksize
> > filesystem, we'll only read 1k from disk.
> So it's one block, or one buffer_head, am I right?
buffer_head is misnamed. It used to be both a caching concept and an IO
container. It's still an IO container sometimes, but it really should be
renamed `struct block'. It is the kernel's core abstraction for a disk
block. Usually of size <= PAGE_CACHE_SIZE. There are a few places where
bh->b_size is >PAGE_CACHE_SIZE, in the get_blocks() callback. But that's
an exception.
A buffer_head is metadata against a struct page, telling us the state of a
subsection of a page, and also telling us the disk mapping (ie:
partition-relative block number) for that page subsection.
> > > suboptimal to let both ext3_readdir() and page_cache_readahead() do some part
> > > of I/O. The best scheme should be to test page existence and call read-ahead in
> > > the very beginning(maybe before ext3_getblk()).
> >
> > ext3_getblk() doesn't actually read the block from disk. All it will do is
> > to determine the location of the block on disk. Plus if it's a write and
> > if we newly created the block, ext3 will perform journalling of the buffer.
>
> But it inserts the page into radix tree, which effectively prevents
> __do_page_cache_readahead() to read that page, and makes (actual <= req_size-1)
> in the following trace.
erk. That's pretty screwed up, isn't it?
I need to think again. Thanks.
reply other threads:[~2005-11-10 8:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20051110085503.GC5797@mail.ustc.edu.cn \
--to=wfg@mail.ustc.edu.cn \
--cc=linux-kernel@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
Powered by JetHome