Deleted Added
full compact
vm_page_bits.9 (87182) vm_page_bits.9 (87857)
1.\"
2.\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice(s), this list of conditions and the following disclaimer as

--- 10 unchanged lines hidden (view full) ---

19.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
25.\" DAMAGE.
26.\"
1.\"
2.\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice(s), this list of conditions and the following disclaimer as

--- 10 unchanged lines hidden (view full) ---

19.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
25.\" DAMAGE.
26.\"
27.\" $FreeBSD: head/share/man/man9/vm_page_bits.9 87182 2001-12-02 02:13:35Z alfred $
27.\" $FreeBSD: head/share/man/man9/vm_page_bits.9 87857 2001-12-14 09:11:13Z ru $
28.\"
29.Dd December 1, 2001
30.Dt VM_PAGE_BITS 9
31.Os
32.Sh NAME
33.Nm vm_page_bits ,
34.Nm vm_page_set_validclean ,
35.Nm vm_page_clear_dirty ,

--- 31 unchanged lines hidden (view full) ---

67calculates the bits representing the
68.Dv DEV_BSIZE
69range of bytes between
70.Fa base
71and
72.Fa size .
73The byte range is expected to be within a single page, and if
74.Fa size
28.\"
29.Dd December 1, 2001
30.Dt VM_PAGE_BITS 9
31.Os
32.Sh NAME
33.Nm vm_page_bits ,
34.Nm vm_page_set_validclean ,
35.Nm vm_page_clear_dirty ,

--- 31 unchanged lines hidden (view full) ---

67calculates the bits representing the
68.Dv DEV_BSIZE
69range of bytes between
70.Fa base
71and
72.Fa size .
73The byte range is expected to be within a single page, and if
74.Fa size
75is zero no bits will be set.
75is zero, no bits will be set.
76.Pp
76.Pp
77.\" ------------------- VM_PAGE_SET_VALIDCLEAN -------------------
78.Fn vm_page_set_validclean
79flags the byte range between
80.Fa base
81and
82.Fa size
83as valid and clean.
84The range is expected to be
85.Dv DEV_BSIZE
86aligned and no larger than
87.Dv PAGE_SIZE .
88If it is not properly aligned, any unaligned chucks of the
89.Dv DEV_BSIZE
90blocks at the beginning and end of the range will be zeroed.
91.Pp
92If
93.Fa base
94is zero and
95.Fa size
77.Fn vm_page_set_validclean
78flags the byte range between
79.Fa base
80and
81.Fa size
82as valid and clean.
83The range is expected to be
84.Dv DEV_BSIZE
85aligned and no larger than
86.Dv PAGE_SIZE .
87If it is not properly aligned, any unaligned chucks of the
88.Dv DEV_BSIZE
89blocks at the beginning and end of the range will be zeroed.
90.Pp
91If
92.Fa base
93is zero and
94.Fa size
96is one page the modified bit in the page map is cleared; as well,
95is one page, the modified bit in the page map is cleared; as well,
97the
98.Dv PG_NOSYNC
99flag is cleared.
100.Pp
101.Fn vm_page_clear_dirty
102clears the dirty bits within a page in the range between
103.Fa base
104and

--- 11 unchanged lines hidden (view full) ---

116.Fa size
117in the page.
118The bits are calculated by calling
119.Fn vm_page_bits .
120As well as clearing the bits within the page, the generation
121number within the object holding the page is incremented.
122.Pp
123.Fn vm_page_zero_invalid
96the
97.Dv PG_NOSYNC
98flag is cleared.
99.Pp
100.Fn vm_page_clear_dirty
101clears the dirty bits within a page in the range between
102.Fa base
103and

--- 11 unchanged lines hidden (view full) ---

115.Fa size
116in the page.
117The bits are calculated by calling
118.Fn vm_page_bits .
119As well as clearing the bits within the page, the generation
120number within the object holding the page is incremented.
121.Pp
122.Fn vm_page_zero_invalid
124zeros all of the blocks within the page that are currently
125flaged as invalid.
123zeroes all of the blocks within the page that are currently
124flagged as invalid.
126If
127.Fa setvalid
125If
126.Fa setvalid
128is TRUE, all of the valid bits within the page are set.
127is
128.Dv TRUE ,
129all of the valid bits within the page are set.
129.Pp
130In some cases, such as NFS, the valid bits cannot be set
131in order to maintain cache consistency.
132.Pp
133.Fn vm_page_is_valid
134checks to determine if the all of the
135.Dv DEV_BSIZE
136blocks between
137.Fa base
138and
139.Fa size
140of the page are valid.
141If
142.Fa size
143is zero and the page is entirely invalid
144.Fn vm_page_is_valid
130.Pp
131In some cases, such as NFS, the valid bits cannot be set
132in order to maintain cache consistency.
133.Pp
134.Fn vm_page_is_valid
135checks to determine if the all of the
136.Dv DEV_BSIZE
137blocks between
138.Fa base
139and
140.Fa size
141of the page are valid.
142If
143.Fa size
144is zero and the page is entirely invalid
145.Fn vm_page_is_valid
145will return TRUE, in all other cases
146a size of zero will return FALSE.
146will return
147.Dv TRUE ,
148in all other cases a size of zero will return
149.Dv FALSE .
147.Pp
148.Fn vm_page_test_dirty
149checks if a page has been modified via any of its physical maps,
150.Pp
151.Fn vm_page_test_dirty
152checks if a page has been modified via any of its physical maps,
150and if so flags the entire page as dirty.
153and if so, flags the entire page as dirty.
151.Fn vm_page_dirty
152is called to modify the dirty bits.
153.Pp
154.Fn vm_page_dirty
155flags the entire page as dirty.
156It is expected that the page is not currently on the cache queue.
157.Pp
158.Fn vm_page_undirty
159clears all of the dirty bits in a page.
160.Sh NOTES
161None of these functions are allowed to block.
162.Sh AUTHORS
163This man page was written by
164.An Chad David Aq davidc@acns.ab.ca .
154.Fn vm_page_dirty
155is called to modify the dirty bits.
156.Pp
157.Fn vm_page_dirty
158flags the entire page as dirty.
159It is expected that the page is not currently on the cache queue.
160.Pp
161.Fn vm_page_undirty
162clears all of the dirty bits in a page.
163.Sh NOTES
164None of these functions are allowed to block.
165.Sh AUTHORS
166This man page was written by
167.An Chad David Aq davidc@acns.ab.ca .