| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: uvm.9,v 1.106 2011/06/01 02:22:18 rmind Exp $ | | 1 | .\" $NetBSD: uvm.9,v 1.106.4.1 2011/12/02 16:54:32 yamt Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 1998 Matthew R. Green | | 3 | .\" Copyright (c) 1998 Matthew R. Green |
4 | .\" All rights reserved. | | 4 | .\" All rights reserved. |
5 | .\" | | 5 | .\" |
6 | .\" Redistribution and use in source and binary forms, with or without | | 6 | .\" Redistribution and use in source and binary forms, with or without |
7 | .\" modification, are permitted provided that the following conditions | | 7 | .\" modification, are permitted provided that the following conditions |
8 | .\" are met: | | 8 | .\" are met: |
9 | .\" 1. Redistributions of source code must retain the above copyright | | 9 | .\" 1. Redistributions of source code must retain the above copyright |
10 | .\" notice, this list of conditions and the following disclaimer. | | 10 | .\" notice, this list of conditions and the following disclaimer. |
11 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 11 | .\" 2. Redistributions in binary form must reproduce the above copyright |
12 | .\" notice, this list of conditions and the following disclaimer in the | | 12 | .\" notice, this list of conditions and the following disclaimer in the |
13 | .\" documentation and/or other materials provided with the distribution. | | 13 | .\" documentation and/or other materials provided with the distribution. |
14 | .\" | | 14 | .\" |
| @@ -179,33 +179,47 @@ The flags can be any of | | | @@ -179,33 +179,47 @@ The flags can be any of |
179 | .Ed | | 179 | .Ed |
180 | .Pp | | 180 | .Pp |
181 | .Dv UVM_PGA_USERESERVE | | 181 | .Dv UVM_PGA_USERESERVE |
182 | means to allocate a page even if that will result in the number of free pages | | 182 | means to allocate a page even if that will result in the number of free pages |
183 | being lower than | | 183 | being lower than |
184 | .Dv uvmexp.reserve_pagedaemon | | 184 | .Dv uvmexp.reserve_pagedaemon |
185 | (if the current thread is the pagedaemon) or | | 185 | (if the current thread is the pagedaemon) or |
186 | .Dv uvmexp.reserve_kernel | | 186 | .Dv uvmexp.reserve_kernel |
187 | (if the current thread is not the pagedaemon). | | 187 | (if the current thread is not the pagedaemon). |
188 | .Dv UVM_PGA_ZERO | | 188 | .Dv UVM_PGA_ZERO |
189 | causes the returned page to be filled with zeroes, either by allocating it | | 189 | causes the returned page to be filled with zeroes, either by allocating it |
190 | from a pool of pre-zeroed pages or by zeroing it in-line as necessary. | | 190 | from a pool of pre-zeroed pages or by zeroing it in-line as necessary. |
191 | .Pp | | 191 | .Pp |
| | | 192 | While |
| | | 193 | .Fn uvm_pagealloc |
| | | 194 | does never wait for memory available by itself, it can block for mutexes |
| | | 195 | internally. |
| | | 196 | .Pp |
192 | .Fn uvm_pagerealloc | | 197 | .Fn uvm_pagerealloc |
193 | reallocates page | | 198 | reallocates page |
194 | .Fa pg | | 199 | .Fa pg |
195 | to a new object | | 200 | to a new object |
196 | .Fa newobj , | | 201 | .Fa newobj , |
197 | at a new offset | | 202 | at a new offset |
198 | .Fa newoff . | | 203 | .Fa newoff . |
| | | 204 | If the |
| | | 205 | .Fa newobj |
| | | 206 | is |
| | | 207 | .Dv NULL , |
| | | 208 | .Fa newoff |
| | | 209 | is ignored and the page |
| | | 210 | .Fa pg |
| | | 211 | is just detached from the current object. |
| | | 212 | Currently, only the latter case is implemented. |
199 | .Pp | | 213 | .Pp |
200 | .Fn uvm_pagefree | | 214 | .Fn uvm_pagefree |
201 | frees the physical page | | 215 | frees the physical page |
202 | .Fa pg . | | 216 | .Fa pg . |
203 | If the content of the page is known to be zero-filled, | | 217 | If the content of the page is known to be zero-filled, |
204 | caller should set | | 218 | caller should set |
205 | .Dv PG_ZERO | | 219 | .Dv PG_ZERO |
206 | in pg-\*[Gt]flags so that the page allocator will use | | 220 | in pg-\*[Gt]flags so that the page allocator will use |
207 | the page to serve future | | 221 | the page to serve future |
208 | .Dv UVM_PGA_ZERO | | 222 | .Dv UVM_PGA_ZERO |
209 | requests efficiently. | | 223 | requests efficiently. |
210 | .Pp | | 224 | .Pp |
211 | .Fn uvm_pglistalloc | | 225 | .Fn uvm_pglistalloc |