From: Xuan Baldauf <xuan--reiserfs@baldauf.org>
To: Oliver Neukum <oliver@neukum.name>
Cc: Rik van Riel <riel@conectiva.com.br>,
Xuan Baldauf <xuan--lkml@baldauf.org>,
linux-kernel@vger.kernel.org,
Reiserfs List <reiserfs-list@namesys.com>
Subject: Re: Heuristic readahead for filesystems
Date: Wed, 11 Sep 2002 20:43:22 +0200 [thread overview]
Message-ID: <3D7F8ECA.21086A5@baldauf.org> (raw)
In-Reply-To: 200209112030.27269.oliver@neukum.name
Oliver Neukum wrote:
> > In theory, this also could be implemented explicitly if the application
> > could tell the kernel "I'm going to read these 100 files in the very
> > near future, please make them ready for me". But wait, maybe the
> > application can do this (for regular files, not for directory entries
> > and stat() data): Could it be efficient if the application used
> > open(file,O_NONBLOCK) for the next 100 files and subsequent read()s on
> > each of the returned filedescriptors?
>
> What do you want to trigger the reading ahead, open() or read() ?
As open() immediately returns, it does not matter by which call the readahead is
triggered. But I'm unsure about wether it is triggered at all for the amount of
data the read() requested.
>
> Please correct me, if I am wrong, but wouldn't read() block ?
AFAIK, "man open" tells
[...]
int open(const char *pathname, int flags);
[...]
O_NONBLOCK or O_NDELAY
The file is opened in non-blocking mode. Neither the open nor any
__subsequent__ operations on the file descriptor
which is returned will cause the calling process to wait.
[...]
So read won't block if the file has been opened with O_NONBLOCK.
>
>
> Aio should be able to do it. But even that want help you with the stat data.
Aio would help me announcing stat() usage for the future?
>
>
> Regards
> Oliver
Xuân.
next prev parent reply other threads:[~2002-09-11 18:38 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-11 15:42 Heuristic readahead for filesystems Xuan Baldauf
2002-09-11 16:33 ` Davide Libenzi
2002-09-11 17:03 ` jdow
2002-09-11 17:20 ` Davide Libenzi
2002-09-11 17:51 ` jdow
2002-09-11 17:16 ` Hans Reiser
2002-09-11 16:42 ` Rik van Riel
2002-09-11 17:20 ` Oliver Neukum
2002-09-11 17:56 ` Xuan Baldauf
2002-09-11 18:30 ` Oliver Neukum
2002-09-11 18:43 ` Xuan Baldauf [this message]
2002-09-11 19:04 ` Oliver Neukum
2002-09-11 19:21 ` Richard B. Johnson
2002-09-12 0:45 ` jw schultz
2002-09-12 1:58 ` Andrew Morton
2002-09-12 11:41 ` Richard B. Johnson
2002-09-12 13:35 ` jw schultz
2002-09-12 21:33 ` jdow
2002-09-16 12:52 ` Richard B. Johnson
2002-09-17 1:45 ` jdow
2002-09-17 10:37 ` jbradford
2002-09-17 5:19 ` jdow
2002-09-12 12:41 ` Jesse Pollard
2002-09-11 19:03 ` Tomas Szepe
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=3D7F8ECA.21086A5@baldauf.org \
--to=xuan--reiserfs@baldauf.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oliver@neukum.name \
--cc=reiserfs-list@namesys.com \
--cc=riel@conectiva.com.br \
--cc=xuan--lkml@baldauf.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