Linux Kernel
3.7.1
|
#include <linux/swap.h>
#include <linux/mempolicy.h>
#include <linux/pagemap.h>
#include <linux/percpu_counter.h>
#include <linux/xattr.h>
Go to the source code of this file.
Data Structures | |
struct | shmem_inode_info |
struct | shmem_sb_info |
Functions | |
int | shmem_init (void) |
int | shmem_fill_super (struct super_block *sb, void *data, int silent) |
struct file * | shmem_file_setup (const char *name, loff_t size, unsigned long flags) |
int | shmem_zero_setup (struct vm_area_struct *) |
int | shmem_lock (struct file *file, int lock, struct user_struct *user) |
void | shmem_unlock_mapping (struct address_space *mapping) |
struct page * | shmem_read_mapping_page_gfp (struct address_space *mapping, pgoff_t index, gfp_t gfp_mask) |
void | shmem_truncate_range (struct inode *inode, loff_t start, loff_t end) |
int | shmem_unuse (swp_entry_t entry, struct page *page) |
int shmem_fill_super | ( | struct super_block * | sb, |
void * | data, | ||
int | silent | ||
) |
|
read |
shmem_read_mapping_page_gfp - read into page cache, using specified page allocation flags. : the page's address_space : the page index : the page allocator flags to use if allocating
This behaves as a tmpfs "read_cache_page_gfp(mapping, index, gfp)", with any new page allocations done using the specified allocation flags. But read_cache_page_gfp() uses the ->readpage() method: which does not suit tmpfs, since it may have pages in swapcache, and needs to find those for itself; although drivers/gpu/drm i915 and ttm rely upon this support.
i915_gem_object_get_pages_gtt() mixes __GFP_NORETRY | __GFP_NOWARN in with the mapping_gfp_mask(), to avoid OOMing the machine unnecessarily.
void shmem_unlock_mapping | ( | struct address_space * | mapping | ) |