|
Linux Kernel
3.7.1
|
#include <linux/mm.h>#include <linux/pagemap.h>#include <linux/swap.h>#include <linux/swapops.h>#include <linux/slab.h>#include <linux/init.h>#include <linux/ksm.h>#include <linux/rmap.h>#include <linux/rcupdate.h>#include <linux/export.h>#include <linux/memcontrol.h>#include <linux/mmu_notifier.h>#include <linux/migrate.h>#include <linux/hugetlb.h>#include <linux/backing-dev.h>#include <asm/tlbflush.h>#include "internal.h"Go to the source code of this file.
Macros | |
| #define | CLUSTER_SIZE min(32*PAGE_SIZE, PMD_SIZE) |
| #define | CLUSTER_MASK (~(CLUSTER_SIZE - 1)) |
| #define CLUSTER_MASK (~(CLUSTER_SIZE - 1)) |
| int anon_vma_clone | ( | struct vm_area_struct * | dst, |
| struct vm_area_struct * | src | ||
| ) |
| int anon_vma_fork | ( | struct vm_area_struct * | vma, |
| struct vm_area_struct * | pvma | ||
| ) |
| int anon_vma_prepare | ( | struct vm_area_struct * | vma | ) |
anon_vma_prepare - attach an anon_vma to a memory region : the memory region in question
This makes sure the memory mapping described by 'vma' has an 'anon_vma' attached to it, so that we can associate the anonymous pages mapped into it with that anon_vma.
The common case will be that we already have one, but if not we either need to find an adjacent mapping that we can re-use the anon_vma from (very common when the only reason for splitting a vma has been mprotect()), or we allocate a new one.
Anon-vma allocations are very subtle, because we may have optimistically looked up an anon_vma in page_lock_anon_vma() and that may actually touch the spinlock even in the newly allocated vma (it depends on RCU to make sure that the anon_vma isn't actually destroyed).
As a result, we need to do proper anon_vma locking even for the new allocation. At the same time, we do not want to do any locking for the common case of already having an anon_vma.
This must be called with the mmap_sem held for reading.
| EXPORT_SYMBOL_GPL | ( | page_mkclean | ) |
| bool is_vma_temporary_stack | ( | struct vm_area_struct * | vma | ) |
| unsigned long page_address_in_vma | ( | struct page * | page, |
| struct vm_area_struct * | vma | ||
| ) |
| int page_mapped_in_vma | ( | struct page * | page, |
| struct vm_area_struct * | vma | ||
| ) |
| void unlink_anon_vmas | ( | struct vm_area_struct * | vma | ) |
1.8.2