11794df1fSAlan Cox.\" 21794df1fSAlan Cox.\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org> 31794df1fSAlan Cox.\" All rights reserved. 41794df1fSAlan Cox.\" 51794df1fSAlan Cox.\" Redistribution and use in source and binary forms, with or without 61794df1fSAlan Cox.\" modification, are permitted provided that the following conditions 71794df1fSAlan Cox.\" are met: 81794df1fSAlan Cox.\" 1. Redistributions of source code must retain the above copyright 91794df1fSAlan Cox.\" notice, this list of conditions and the following disclaimer. 101794df1fSAlan Cox.\" 2. Redistributions in binary form must reproduce the above copyright 111794df1fSAlan Cox.\" notice, this list of conditions and the following disclaimer in the 121794df1fSAlan Cox.\" documentation and/or other materials provided with the distribution. 131794df1fSAlan Cox.\" 141794df1fSAlan Cox.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 151794df1fSAlan Cox.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 161794df1fSAlan Cox.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 171794df1fSAlan Cox.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 181794df1fSAlan Cox.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 191794df1fSAlan Cox.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 201794df1fSAlan Cox.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 211794df1fSAlan Cox.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 221794df1fSAlan Cox.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 231794df1fSAlan Cox.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 241794df1fSAlan Cox.\" SUCH DAMAGE. 251794df1fSAlan Cox.\" 261794df1fSAlan Cox.Dd July 9, 2011 271794df1fSAlan Cox.Dt VM_MAP_SYNC 9 281794df1fSAlan Cox.Os 291794df1fSAlan Cox.Sh NAME 301794df1fSAlan Cox.Nm vm_map_sync 311794df1fSAlan Cox.Nd push dirty pages to their pager 321794df1fSAlan Cox.Sh SYNOPSIS 331794df1fSAlan Cox.In sys/param.h 341794df1fSAlan Cox.In vm/vm.h 351794df1fSAlan Cox.In vm/vm_map.h 361794df1fSAlan Cox.Ft int 371794df1fSAlan Cox.Fo vm_map_sync 381794df1fSAlan Cox.Fa "vm_map_t map" "vm_offset_t start" "vm_offset_t end" "boolean_t syncio" 391794df1fSAlan Cox.Fa "boolean_t invalidate" 401794df1fSAlan Cox.Fc 411794df1fSAlan Cox.Sh DESCRIPTION 421794df1fSAlan CoxThe 431794df1fSAlan Cox.Fn vm_map_sync 441794df1fSAlan Coxfunction forces any dirty cached pages in the range 451794df1fSAlan Cox.Fa start 461794df1fSAlan Coxto 471794df1fSAlan Cox.Fa end 481794df1fSAlan Coxwithin the 491794df1fSAlan Cox.Fa map 501794df1fSAlan Coxto be pushed to their underlying pager. 511794df1fSAlan Cox.Pp 521794df1fSAlan CoxIf 531794df1fSAlan Cox.Fa syncio 541794df1fSAlan Coxis TRUE, dirty pages are written synchronously. 551794df1fSAlan Cox.Pp 561794df1fSAlan CoxIf 571794df1fSAlan Cox.Fa invalidate 581794df1fSAlan Coxis TRUE, any cached pages are also freed. 591794df1fSAlan Cox.Pp 601794df1fSAlan CoxThe range provided must be contiguous, it MUST NOT contain holes. 611794df1fSAlan CoxThe range provided MUST NOT contain any sub-map entries. 621794df1fSAlan Cox.Sh RETURN VALUES 631794df1fSAlan CoxThe 641794df1fSAlan Cox.Fn vm_map_sync 651794df1fSAlan Coxfunction returns 661794df1fSAlan Cox.Dv KERN_SUCCESS 671794df1fSAlan Coxif successful. 681794df1fSAlan Cox.Pp 691794df1fSAlan CoxOtherwise, 701794df1fSAlan Cox.Dv KERN_INVALID_ADDRESS 711794df1fSAlan Coxwill be returned if the function encountered a sub-map entry; 721794df1fSAlan Cox.Dv KERN_INVALID_ARGUMENT 731794df1fSAlan Coxwill be returned if the function encountered a hole in the region provided, 741794df1fSAlan Coxor if an entry could not be found for the given start address. 751794df1fSAlan Cox.Sh SEE ALSO 761794df1fSAlan Cox.Xr vm_map 9 771794df1fSAlan Cox.Sh AUTHORS 781794df1fSAlan CoxThis manual page was written by 79*8a7314fcSBaptiste Daroussin.An Bruce M Simpson Aq Mt bms@spc.org . 80