Changeset View
Changeset View
Standalone View
Standalone View
share/man/man9/vm_page_wire.9
Show All 20 Lines | |||||
.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | .\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||||
.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||||
.\" DAMAGE. | .\" DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd July 13, 2001 | .Dd June 3, 2019 | ||||
.Dt VM_PAGE_WIRE 9 | .Dt VM_PAGE_WIRE 9 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm vm_page_wire , | .Nm vm_page_wire , | ||||
.Nm vm_page_unwire | .Nm vm_page_unwire , | ||||
.Nm vm_page_unwire_noq | |||||
.Nd "wire and unwire pages" | .Nd "wire and unwire pages" | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.In sys/param.h | .In sys/param.h | ||||
.In vm/vm.h | .In vm/vm.h | ||||
.In vm/vm_page.h | .In vm/vm_page.h | ||||
.Ft void | .Ft void | ||||
.Fn vm_page_wire "vm_page_t m" | .Fn vm_page_wire "vm_page_t m" | ||||
.Ft bool | |||||
.Fn vm_page_wire_mapped "vm_page_t m" | |||||
.Ft void | .Ft void | ||||
.Fn vm_page_unwire "vm_page_t m" "int activate" | .Fn vm_page_unwire "vm_page_t m" "int queue" | ||||
.Ft bool | |||||
.Fn vm_page_unwire_noq "vm_page_t m" | |||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
The | The | ||||
.Fn vm_page_wire | .Fn vm_page_wire | ||||
function increments the wire count on a page, and removes it from | and | ||||
whatever queue it is on. | .Fn vm_page_wire_mapped | ||||
function wire the page, prevent it from being reclaimed by the page | |||||
alc: "function" -> "functions"
"... the page, which prevents it ... | |||||
daemon or when its containing object is destroyed. | |||||
Both functions require that the page belong to an object. | |||||
The | |||||
.Fn vm_page_wire_mapped | |||||
function is for use by the | |||||
.Xr pmap 9 | |||||
layer following a lookup. | |||||
This function may fail if mappings of the page are concurrently | |||||
being destroyed, in which case it will return false. | |||||
.Pp | .Pp | ||||
The | The | ||||
.Fn vm_page_unwire | .Fn vm_page_unwire | ||||
function releases one of the wirings on the page. | and | ||||
When | .Fn vm_page_unwire_noq | ||||
.Va write_count | functions release a wiring of a page. | ||||
reaches zero the page is placed back onto either the active queue | The | ||||
(if | .Fn vm_page_unwire | ||||
.Fa activate | function takes a queue index and will insert the page into the | ||||
is non-zero) or onto the inactive queue (if | corresponding page queue upon releasing its last wiring. | ||||
.Fa activate | If the page does not belong to an object and no other references | ||||
is zero). | to the page exist, | ||||
If the page is unmanaged | .Fn vm_page_unwire | ||||
.Dv ( PG_UNMANAGED | will free the page. | ||||
is set) then the page is left on | .Fn vm_page_unwire_noq | ||||
.Dv PQ_NONE . | releases the wiring and returns true if it was the last wiring | ||||
of the page. | |||||
.Sh AUTHORS | .Sh AUTHORS | ||||
This manual page was written by | This manual page was written by | ||||
.An Chad David Aq Mt davidc@acns.ab.ca . | .An Chad David Aq Mt davidc@acns.ab.ca . |
"function" -> "functions"
"... the page, which prevents it ...