1
2FADVISE64,FADVISE64_64(2)  Linux Programmer's Guide  FADVISE64,FADVISE64_64(2)
3
4
5

NAME

7       fadvise64,fadvise64_64 - Give advice about file access
8

SYNOPSIS

10       long fadvise64_64 (int fs, loff_t offset, loff_t len, int advice,
11                                                   int fs, loff_t offset,
12                                                   loff_t len, int advice);
13
14       long sys_fadvise64  (int fs, loff_t offset, loff_t len, int advice,
15                          int fs, loff_t offset, loff_t len, int advice);
16
17

DESCRIPTION

19       Allows an application to to tell the kernel how it  expects  to  use  a
20       file  handle,  so that the kernel can choose appropriate read-ahead and
21       caching techniques for access to the corresponding file. This is  simi‐
22       lar  to  the POSIX version of the madvise system call, but for file ac‐
23       cess instead of memory access. The sys_fadvise64() function is obsolete
24       and  corresponds to a broken glibc API, sys_fadvise64_64() is the fixed
25       version.  The following are the values for the advice parameter:
26
27
28       FADV_NORMAL
29              No special treatment.
30
31
32       FADV_RANDOM
33              Expect page references in random order.
34
35
36       FADV_SEQUENTIAL
37              Expect page references in sequential order.
38
39
40       FADV_WILLNEED
41              Expect access in the near future.
42
43
44       FADV_DONTNEED
45              Do not expect access in the near future.  Subsequent  access  of
46              pages  in  this  range  will  succeed, but will result either in
47              reloading of the memory contents from the underlying mapped file
48              or  zero-fill-in-demand pages for mappings without an underlying
49              file.
50
51
52       FADV_NOREUSE
53              Access data only once.
54
55

ERRORS

57       -EBADF An invalid file descriptor was specified. to modify the modules.
58
59
60       -EINVAL
61              An invalid f_mapping of file, len value smaller than 0 or advice
62              value unknown.
63
64

SEE ALSO

66       madvise(2)
67
68
69

AUTHOR

71       Niki Rahimi
72
73
74
75Linux 2.6                        2004-March-12       FADVISE64,FADVISE64_64(2)
Impressum