mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Michael Mesnier <mmesnier@ece.cmu.edu>
Cc: linux-kernel@vger.kernel.org, mmesnier@ece.cmu.edu
Subject: Re: delay in block_read_full_page()
Date: Sun, 7 Nov 2004 02:45:45 -0800	[thread overview]
Message-ID: <20041107024545.243ee610.akpm@osdl.org> (raw)
In-Reply-To: <418C7A22.3000205@ece.cmu.edu>

Michael Mesnier <mmesnier@ece.cmu.edu> wrote:
>
> Hello,
> 
> Please cc: me directly in your response.
> 
> I'm running into some trouble with an installable file system I'm 
> writing. In myfs_readpage() I simply return block_read_full_page() which 
> subsequently calls myfs_get_block().  However, there's a delay before 
> the I/O actually gets issued to the device.  Running sync from the 
> command line causes the I/O to get issued immediately, so the sync call 
> (even it there aren't dirty buffers) also manages to schedule any 
> outstanding read I/Os. How should my fs indicate to the vfs that these 
> read I/Os need to be issued immediately after my_readpage() is called?

Normally we leave the I/O pending in the expectation that more readpage()
requests will occur.  This allow us to merge things in the disk request
queues.  We'll actually submit the I/O to the device if:

a) There's a lot of it pending or

b) There haven't been any more readpage() calls for a while or

c) Someone actually wants to wait on the I/O (say, via lock_page())

It is unusual that you want this I/O to kick off immediately.  You will
probably find that blk_run_backing_dev() will do what you want.


That's all for a 2.6 kernel - you didn't specify.  It it's a 2.4 kernel
then you'll need to use run_task_queue(&tq_disk) to flush the queued I/O
requests.

  reply	other threads:[~2004-11-07 10:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-06  7:15 Michael Mesnier
2004-11-07 10:45 ` Andrew Morton [this message]
2004-11-07 21:49   ` Michael Mesnier

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=20041107024545.243ee610.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmesnier@ece.cmu.edu \
    /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

all inboxes | Powered by JetHome®