From: Michael Marxmeier <mike@marxmeier.com>
To: lkml <linux-kernel@vger.kernel.org>
Subject: Question on sys_readahead()
Date: Sat, 22 Dec 2001 00:01:31 +0100 [thread overview]
Message-ID: <3C23BF4B.70BDABBE@marxmeier.com> (raw)
I have a question on sys_readahead and would appreciate
some hint or a pointer.
- When was this call added?
- As far as i understand the code it reads the data into
the page cache. The data is ready sync and there is no
way to do this async and have a notification unless using
a separate thread.
A typical use i could see is preloading some data in the
page cache from a separate thread (eg. for a media player).
BTW: AFAICS the code is off by one if offset/count is not in
PAGE_SIZE chunks?
unsigned long start = offset >> PAGE_CACHE_SHIFT;
unsigned long len = (count + ((long)offset & ~PAGE_CACHE_MASK)) >> PAGE_CACHE_SHIFT;
Thanks
Michael
--
Michael Marxmeier Marxmeier Software AG
E-Mail: mike@marxmeier.com Besenbruchstrasse 9
Phone : +49 202 2431440 42285 Wuppertal, Germany
Fax : +49 202 2431420 http://www.marxmeier.com/
next reply other threads:[~2001-12-21 23:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-21 23:01 Michael Marxmeier [this message]
2001-12-21 23:25 ` Question on sys_readahead() Andrew Morton
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=3C23BF4B.70BDABBE@marxmeier.com \
--to=mike@marxmeier.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.