View | Details | Raw Unified | Return to bug 32241
Collapse All | Expand All

(-)vm_page_alloc.9 (-13 / +15 lines)
Lines 31-37 Link Here
31
.Os
31
.Os
32
.Sh NAME
32
.Sh NAME
33
.Nm vm_page_alloc
33
.Nm vm_page_alloc
34
.Nd "allocates a page for the object and index"
34
.Nd "allocate a page for a vm_object"
35
.Sh SYNOPSIS
35
.Sh SYNOPSIS
36
.In sys/param.h
36
.In sys/param.h
37
.In vm/vm.h
37
.In vm/vm.h
Lines 41-74 Link Here
41
.Sh DESCRIPTION
41
.Sh DESCRIPTION
42
The
42
The
43
.Fn vm_page_alloc
43
.Fn vm_page_alloc
44
function allocates a page for
44
function allocates a page at
45
.Fa pindex
46
in the VM object
47
.Fa object .
48
It is assumed that a page has not already been allocated for
49
.Fa pindex
45
.Fa pindex
50
and
46
within
51
.Fa object .
47
.Fa object .
48
It is assumed that a page has not already been allocated at
49
.Fa pindex .
50
The page returned is inserted into the object, but is not inserted
51
into the pmap.
52
.Pp
52
.Pp
53
The
54
.Fn vm_page_alloc
53
.Fn vm_page_alloc
55
function will not block.
54
will not block.
56
.Pp
55
.Pp
57
Its arguments are:
56
Its arguments are:
58
.Bl -tag -width ".Fa page_req"
57
.Bl -tag -width ".Fa page_req"
59
.It Fa object
58
.It Fa object
60
The VM object to allocate the page for.
59
The VM object to allocate the page for.
61
.It Fa pindex
60
.It Fa pindex
62
The index of the page that should be allocated.
61
The index into the object at which the page should be inserted.
63
.It Fa page_req
62
.It Fa page_req
64
A flag indicating how the page should be allocated.
63
A flag indicating how the page should be allocated.
65
.Bl -tag -width ".Dv VM_ALLOC_INTERRUPT"
64
.Bl -tag -width ".Dv VM_ALLOC_INTERRUPT"
66
.It Dv VM_ALLOC_NORMAL
65
.It Dv VM_ALLOC_NORMAL
67
The page should be allocated with no special treatment.
66
The page should be allocated with no special treatment.
68
.It Dv VM_ALLOC_SYSTEM
67
.It Dv VM_ALLOC_SYSTEM
69
The page can be allocated even if the buffer cache queue is empty
68
The page can be allocated if the cache is empty and the free page
70
and the free count is above the interrupt reserved water mark.
69
count is above the interrupt reserved water mark.  If
71
This should be used only when the system really needs the page.
70
.Dv VM_ALLOC_INTERRUPT
71
is set the page can be allocated as long as the free page count is
72
greater than zero.
73
This flag should be used only when the system really needs the page.
72
.It Dv VM_ALLOC_INTERRUPT
74
.It Dv VM_ALLOC_INTERRUPT
73
.Fn vm_page_alloc
75
.Fn vm_page_alloc
74
is being called during an interrupt and therefore the cache cannot
76
is being called during an interrupt and therefore the cache cannot

Return to bug 32241