1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
<table class="head">
<tr>
<td class="head-ltitle">VM_PAGE_INSERT(9)</td>
<td class="head-vol">Kernel Developer's Manual</td>
<td class="head-rtitle">VM_PAGE_INSERT(9)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">vm_page_insert</code>,
<code class="Nm">vm_page_remove</code> — <span class="Nd">add/remove
page from an object</span></p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><code class="In">#include
<<a class="In">sys/param.h</a>></code>
<br/>
<code class="In">#include <<a class="In">vm/vm.h</a>></code>
<br/>
<code class="In">#include <<a class="In">vm/vm_page.h</a>></code></p>
<p class="Pp"><var class="Ft">void</var>
<br/>
<code class="Fn">vm_page_insert</code>(<var class="Fa" style="white-space: nowrap;">vm_page_t
m</var>, <var class="Fa" style="white-space: nowrap;">vm_object_t
object</var>, <var class="Fa" style="white-space: nowrap;">vm_pindex_t
pindex</var>);</p>
<p class="Pp"><var class="Ft">void</var>
<br/>
<code class="Fn">vm_page_remove</code>(<var class="Fa" style="white-space: nowrap;">vm_page_t
m</var>);</p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp">The
<a class="permalink" href="#vm_page_insert"><code class="Fn" id="vm_page_insert">vm_page_insert</code></a>()
function adds a page to the given object at the given index. The page is
added to both the VM page hash table and to the object's list of pages, but
the hardware page tables are not updated. In the case of a user page, it
will be faulted in when it is accessed. If the page is a kernel page, the
caller is expected to handle adding the page to the kernel's pmap.</p>
<p class="Pp">If <code class="Dv">PG_WRITEABLE</code> is set in the page's
flags, <code class="Dv">OBJ_WRITEABLE</code> and
<code class="Dv">OBJ_MIGHTBEDIRTY</code> are set in the object's flags.</p>
<p class="Pp" id="vm_page_remove">The
<a class="permalink" href="#vm_page_remove"><code class="Fn">vm_page_remove</code></a>()
function removes the given page from its object, and from the VM page hash
table. The page must be busy prior to this call, or the system will panic.
The pmap entry for the page is not removed by this function.</p>
<p class="Pp" id="vm_page_insert~2">The arguments to
<a class="permalink" href="#vm_page_insert~2"><code class="Fn">vm_page_insert</code></a>()
are:</p>
<dl class="Bl-tag">
<dt><var class="Fa">m</var></dt>
<dd>The page to add to the object.</dd>
<dt><var class="Fa">object</var></dt>
<dd>The object the page should be added to.</dd>
<dt><var class="Fa">pindex</var></dt>
<dd>The index into the object the page should be at.</dd>
</dl>
<p class="Pp" id="vm_page_remove~2">The arguments to
<a class="permalink" href="#vm_page_remove~2"><code class="Fn">vm_page_remove</code></a>()
are:</p>
<dl class="Bl-tag">
<dt><var class="Fa">m</var></dt>
<dd>The page to remove.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="IMPLEMENTATION_NOTES"><a class="permalink" href="#IMPLEMENTATION_NOTES">IMPLEMENTATION
NOTES</a></h1>
<p class="Pp">The index of a page in a VM object is the byte index into the same
object truncated to a page boundary. For example, if the page size is 4096
bytes, and the address in the object is 81944, the page index is 20.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1>
<p class="Pp">This manual page was written by <span class="An">Chad David</span>
<<a class="Mt" href="mailto:davidc@acns.ab.ca">davidc@acns.ab.ca</a>>.</p>
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">July 17, 2001</td>
<td class="foot-os">FreeBSD 15.0</td>
</tr>
</table>
|