linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Phillip Susi <psusi@ubuntu.com>
To: mtk.manpages@gmail.com
Cc: linux-man@vger.kernel.org, linux-mm@kvack.org,
	linux-ext4@vger.kernel.org
Subject: [PATCH] readahead.2: don't claim the call blocks until all data has been read
Date: Fri, 14 Mar 2014 11:54:31 -0400	[thread overview]
Message-ID: <1394812471-9693-1-git-send-email-psusi@ubuntu.com> (raw)

The readahead(2) man page was claiming that the call blocks until all
data has been read into the cache.  This is incorrect.

Signed-off-by: Phillip Susi <psusi@ubuntu.com>
---
 man2/readahead.2 | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/man2/readahead.2 b/man2/readahead.2
index 605fa5e..1b0376e 100644
--- a/man2/readahead.2
+++ b/man2/readahead.2
@@ -27,7 +27,7 @@
 .\"
 .TH READAHEAD 2 2013-04-01 "Linux" "Linux Programmer's Manual"
 .SH NAME
-readahead \- perform file readahead into page cache
+readahead \- initiate file readahead into page cache
 .SH SYNOPSIS
 .nf
 .BR "#define _GNU_SOURCE" "             /* See feature_test_macros(7) */"
@@ -37,8 +37,8 @@ readahead \- perform file readahead into page cache
 .fi
 .SH DESCRIPTION
 .BR readahead ()
-populates the page cache with data from a file so that subsequent
-reads from that file will not block on disk I/O.
+initates readahead on a file so that subsequent reads from that file will
+hopefully be satisfied from the cache, and not block on disk I/O.
 The
 .I fd
 argument is a file descriptor identifying the file which is
@@ -57,8 +57,6 @@ equal to
 .IR "(offset+count)" .
 .BR readahead ()
 does not read beyond the end of the file.
-.BR readahead ()
-blocks until the specified data has been read.
 The current file offset of the open file referred to by
 .I fd
 is left unchanged.
@@ -94,6 +92,13 @@ On some 32-bit architectures,
 the calling signature for this system call differs,
 for the reasons described in
 .BR syscall (2).
+
+The call attempts to schedule the reads in the background and return
+immediately, however it may block while reading filesystem metadata
+in order to locate where the blocks requested are.  This occurs frequently
+with ext[234] on large files using indirect blocks instead of extents,
+giving the appearence that the call blocks until the requested data has
+been read.
 .SH SEE ALSO
 .BR lseek (2),
 .BR madvise (2),
-- 
1.8.3.2

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

             reply	other threads:[~2014-03-14 15:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-14 15:54 Phillip Susi [this message]
2014-03-15  9:05 ` Michael Kerrisk (man-pages)
2014-03-15  9:24   ` Christoph Hellwig
2014-03-15 12:31     ` Michael Kerrisk (man-pages)
2014-03-15 16:22   ` Phillip Susi
2014-03-15 16:25     ` Michael Kerrisk (man-pages)
2014-03-15 23:26       ` Phillip Susi

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=1394812471-9693-1-git-send-email-psusi@ubuntu.com \
    --to=psusi@ubuntu.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mtk.manpages@gmail.com \
    /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