OSDN Git Service

a757b6d0c6a056b875e9f0e4e3025bf5643f5bd8
[linuxjm/LDP_man-pages.git] / release / man2 / readahead.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" This manpage is Copyright (C) 2004, Michael Kerrisk
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\" 2004-05-40 Created by Michael Kerrisk <mtk.manpages@gmail.com>
26 .\" 2004-10-05 aeb, minor correction
27 .\"
28 .\" Japanese Version Copyright (c) 2005 Akihiro MOTOKI
29 .\"         all rights reserved.
30 .\" Translated 2005-02-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
31 .\"
32 .\"WORD:        page cache      ¥Ú¡¼¥¸¡¦¥­¥ã¥Ã¥·¥å
33 .\"WORD:        file descriptor ¥Õ¥¡¥¤¥ëµ­½Ò»Ò
34 .\"
35 .TH READAHEAD 2 2007-07-26 "Linux" "Linux Programmer's Manual"
36 .SH Ì¾Á°
37 readahead \- Á°¤â¤Ã¤Æ¥Õ¥¡¥¤¥ë¤ò¥Ú¡¼¥¸¡¦¥­¥ã¥Ã¥·¥å¤ËÆɤ߹þ¤à
38 .SH ½ñ¼°
39 .nf
40 .B #define _GNU_SOURCE
41 .B #include <fcntl.h>
42 .sp
43 .BI "ssize_t readahead(int " fd ", off64_t " offset ", size_t " count );
44 .fi
45 .SH ÀâÌÀ
46 .BR readahead ()
47 ¤Ï¡¢¤³¤Î¸å¤ÎƱ¤¸¥Õ¥¡¥¤¥ë¤«¤é¤Î¥Ç¡¼¥¿Æɤ߹þ¤ß»þ¤Ë¥Ç¥£¥¹¥¯ I/O ¤Ç
48 Æ°ºî¤¬Ää»ß (block) ¤·¤Ê¤¤¤è¤¦¤Ë¡¢Á°¤â¤Ã¤Æ¥Õ¥¡¥¤¥ë¤ÎÆâÍƤò
49 ¥Ú¡¼¥¸¡¦¥­¥ã¥Ã¥·¥å¤ËÆɤ߹þ¤à¡£
50 .I fd
51 °ú¤­¿ô¤ÏÆɤ߹þ¤ß¤ò¹Ô¤¦¥Õ¥¡¥¤¥ë¤ò¼±Ê̤¹¤ë¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤¢¤ë¡£
52 .I offset
53 °ú¤­¿ô¤Ï¥Ç¡¼¥¿¤ÎÆɤ߹þ¤ß³«»Ï°ÌÃÖ¤ò»ØÄꤷ¡¢
54 .I count
55 ¤ÏÆɤ߹þ¤à¥Ç¡¼¥¿¤Î¥Ð¥¤¥È¿ô¤ò»ØÄꤹ¤ë¡£
56 ¥Ç¥£¥¹¥¯ I/O ¤Ï¥Ú¡¼¥¸Ã±°Ì¤Ç¼Â¹Ô¤µ¤ì¤ë¤Î¤Ç¡¢
57 ¼ÂºÝ¤Ë¤Ï
58 .I offset
59 ¤Ï¥Ú¡¼¥¸¶­³¦¤ËÀڤ겼¤²¤é¤ì¡¢Æɤ߹þ¤ß¥Ð¥¤¥È¿ô¤Ï
60 .I "(offset+count)"
61 ¤è¤ê¾®¤µ¤¯¤Ê¤¤¼¡¤Î¥Ú¡¼¥¸¶­³¦¤Þ¤ÇÀÚ¤ê¾å¤²¤é¤ì¤ë¡£
62 .BR readahead ()
63 ¤Ï¥Õ¥¡¥¤¥ë¤ÎËöÈø¤ò±Û¤¨¤¿ÈϰϤޤÇÆɤ߽Ф·¤ò¹Ô¤¦¤³¤È¤Ï¤Ê¤¤¡£¤Þ¤¿¡¢
64 .BR readahead ()
65 ¤Ï»ØÄꤷ¤¿¥Ç¡¼¥¿¤ÎÆɤ߹þ¤ß¤¬½ª¤ï¤ë¤Þ¤ÇÄä»ß (block) ¤¹¤ë¡£
66 .I fd
67 ¤Ç»²¾È¤µ¤ì¤¿¥ª¡¼¥×¥óºÑ¤Î¥Õ¥¡¥¤¥ë¤Î¥Õ¥¡¥¤¥ë¥ª¥Õ¥»¥Ã¥È¤Î¸½ºßÃͤÏ
68 Êѹ¹¤µ¤ì¤Ê¤¤¡£
69 .SH ÊÖ¤êÃÍ
70 .BR readahead ()
71 ¤ÏÀ®¸ù¤¹¤ë¤È 0 ¤òÊÖ¤¹¡£¼ºÇÔ¤·¤¿¾ì¹ç \-1 ¤òÊÖ¤·¡¢
72 .I errno
73 ¤Ë¥¨¥é¡¼¤Î¸¶°ø¤ò¼¨¤¹ÃͤòÀßÄꤹ¤ë¡£
74 .SH ¥¨¥é¡¼
75 .TP
76 .B EBADF
77 .I fd
78 ¤¬Í­¸ú¤Ê¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤Ê¤¤¡¢¤Þ¤¿¤Ï
79 Æɤ߹þ¤ßÍѤ˥ª¡¼¥×¥ó¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
80 .TP
81 .B EINVAL
82 .I fd
83 ¤¬»²¾È¤·¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¤¬¡¢
84 .BR readahead ()
85 ¤ò¹Ô¤¦¤³¤È¤¬¤Ç¤­¤Ê¤¤¥¿¥¤¥×¤Î¥Õ¥¡¥¤¥ë¤Ç¤¢¤Ã¤¿¡£
86 .SH ¥Ð¡¼¥¸¥ç¥ó
87 .BR readahead ()
88 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï Linux 2.4.13 ¤ÇÅо줷¤¿¡£
89 glibc ¤Ç¤Î¥µ¥Ý¡¼¥È¤Ï glibc ¥Ð¡¼¥¸¥ç¥ó 2.3 °Ê¹ß¤Ç¹Ô¤ï¤ì¤Æ¤¤¤ë¡£
90 .SH ½àµò
91 .BR readahead ()
92 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï Linux ¸ÇÍ­¤Ç¤¢¤ê¡¢°Ü¿¢¤ò¹Íθ¤·¤¿¥×¥í¥°¥é¥à¤Ç¤Ï
93 »ÈÍѤòÈò¤±¤ë¤Ù¤­¤Ç¤¢¤ë¡£
94 .SH ´ØÏ¢¹àÌÜ
95 .BR lseek (2),
96 .BR madvise (2),
97 .BR mmap (2),
98 .BR posix_fadvise (2),
99 .BR read (2)