.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "ALLOC_PAGE_VMA" "9" "09 October 2005" "" ""
.SH NAME
alloc_page_vma \- Allocate a page for a VMA.
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
struct page * alloc_page_vma (unsigned int __nocast \fIgfp\fB, struct vm_area_struct * \fIvma\fB, unsigned long \fIaddr\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIgfp\fB\fR
GFP_USER user allocation.
GFP_KERNEL kernel allocations,
GFP_HIGHMEM highmem/user allocations,
GFP_FS allocation should not call back into a file system.
GFP_ATOMIC don't sleep.
.TP
\fB\fIvma\fB\fR
Pointer to VMA or NULL if not available.
.TP
\fB\fIaddr\fB\fR
Virtual Address of the allocation. Must be inside the VMA.
.SH "DESCRIPTION"
.PP
This function allocates a page from the kernel page pool and applies
a NUMA policy associated with the VMA or the current process.
When VMA is not NULL caller must hold down_read on the mmap_sem of the
mm_struct of the VMA to prevent it from going away. Should be used for
all allocations for pages that will be mapped into
user space. Returns NULL when no page can be allocated.
.PP
Should be called with the mm_sem of the vma hold.
.SH "DESCRIPTION"
.PP
This function allocates a page from the kernel page pool and applies
a NUMA policy associated with the VMA or the current process.
When VMA is not NULL caller must hold down_read on the mmap_sem of the
mm_struct of the VMA to prevent it from going away. Should be used for
all allocations for pages that will be mapped into
user space. Returns NULL when no page can be allocated.
.PP
Should be called with the mm_sem of the vma hold.