Linux Kernel
3.7.1
|
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/gfp.h>
#include <linux/mm.h>
#include <linux/export.h>
#include <linux/blkdev.h>
#include <linux/backing-dev.h>
#include <linux/task_io_accounting_ops.h>
#include <linux/pagevec.h>
#include <linux/pagemap.h>
#include <linux/syscalls.h>
#include <linux/file.h>
Go to the source code of this file.
Macros | |
#define | list_to_page(head) (list_entry((head)->prev, struct page, lru)) |
Definition at line 35 of file readahead.c.
EXPORT_SYMBOL | ( | read_cache_pages | ) |
EXPORT_SYMBOL_GPL | ( | file_ra_state_init | ) |
EXPORT_SYMBOL_GPL | ( | page_cache_sync_readahead | ) |
EXPORT_SYMBOL_GPL | ( | page_cache_async_readahead | ) |
void file_ra_state_init | ( | struct file_ra_state * | ra, |
struct address_space * | mapping | ||
) |
Definition at line 28 of file readahead.c.
int force_page_cache_readahead | ( | struct address_space * | mapping, |
struct file * | filp, | ||
pgoff_t | offset, | ||
unsigned long | nr_to_read | ||
) |
Definition at line 211 of file readahead.c.
Definition at line 244 of file readahead.c.
void page_cache_async_readahead | ( | struct address_space * | mapping, |
struct file_ra_state * | ra, | ||
struct file * | filp, | ||
struct page * | page, | ||
pgoff_t | offset, | ||
unsigned long | req_size | ||
) |
Definition at line 540 of file readahead.c.
void page_cache_sync_readahead | ( | struct address_space * | mapping, |
struct file_ra_state * | ra, | ||
struct file * | filp, | ||
pgoff_t | offset, | ||
unsigned long | req_size | ||
) |
page_cache_sync_readahead - generic file readahead : address_space which holds the pagecache and I/O vectors : file_ra_state which holds the readahead state : passed on to ->readpage() and ->readpages() : start offset into , in pagecache page-sized units : hint: total size of the read which the caller is performing in pagecache pages
page_cache_sync_readahead() should be called when a cache miss happened: it will submit the read. The readahead logic may decide to piggyback more pages onto the read request if access patterns suggest it will improve performance.
Definition at line 505 of file readahead.c.
unsigned long ra_submit | ( | struct file_ra_state * | ra, |
struct address_space * | mapping, | ||
struct file * | filp | ||
) |
Definition at line 253 of file readahead.c.
int read_cache_pages | ( | struct address_space * | mapping, |
struct list_head * | pages, | ||
int(*)(void *, struct page *) | filler, | ||
void * | data | ||
) |
read_cache_pages - populate an address space with some pages & start reads against them : the address_space : The address of a list_head which contains the target pages. These pages have their ->index populated and are otherwise uninitialised. : callback routine for filling a single page. : private data for the callback routine.
Hides the details of the LRU cache etc from the filesystems.
Definition at line 83 of file readahead.c.
SYSCALL_DEFINE() readahead | ( | int | fd, |
loff_t | offset, | ||
size_t | count | ||
) |
Definition at line 579 of file readahead.c.