buf.9 (88b85f7467f06bac27e50e664da04aed9ecb9929) buf.9 (a04dd7481b80786760f38ff3902e24851fc7ef37)
1.\" Copyright (c) 1998
2.\" The Regents of the University of California. 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, this list of conditions and the following disclaimer.

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

24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
1.\" Copyright (c) 1998
2.\" The Regents of the University of California. 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, this list of conditions and the following disclaimer.

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

24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" $Id: security.7,v 1.1 1998/12/20 20:12:17 dillon Exp $
32.\" $Id: buf.9,v 1.1 1998/12/22 19:47:48 dillon Exp $
33.\"
34.Dd December 22, 1998
35.Dt BUF 9
36.Os
37.Sh NAME
38.Nm BUF/BP
39.Nd Kernel Buffer I/O scheme used in FreeBSD VM system
40.Sh DESCRIPTION

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

55mapping, the b_data base pointer in a buf is always *page* aligned, not
56*block* aligned. When you have a VM buffer representing some b_offset and
57b_size, the actual start of the buffer is (b_data + (b_offset & PAGE_MASK))
58and not just b_data. Finally, the VM system's core buffer cache supports
59valid and dirty bits (m->valid, m->dirty) for pages in DEV_BSIZE chunks. Thus
60a platform with a hardware page size of 4096 bytes has 8 valid and 8 dirty
61bits. These bits are generally set and cleared in groups based on the device
62block size of the device backing the page. Complete page's worth are often
33.\"
34.Dd December 22, 1998
35.Dt BUF 9
36.Os
37.Sh NAME
38.Nm BUF/BP
39.Nd Kernel Buffer I/O scheme used in FreeBSD VM system
40.Sh DESCRIPTION

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

55mapping, the b_data base pointer in a buf is always *page* aligned, not
56*block* aligned. When you have a VM buffer representing some b_offset and
57b_size, the actual start of the buffer is (b_data + (b_offset & PAGE_MASK))
58and not just b_data. Finally, the VM system's core buffer cache supports
59valid and dirty bits (m->valid, m->dirty) for pages in DEV_BSIZE chunks. Thus
60a platform with a hardware page size of 4096 bytes has 8 valid and 8 dirty
61bits. These bits are generally set and cleared in groups based on the device
62block size of the device backing the page. Complete page's worth are often
63refered to using the VM_PAGE_BITS_ALL bitmask (i.e. 0xFF if the hardware page
63referred to using the VM_PAGE_BITS_ALL bitmask (i.e. 0xFF if the hardware page
64size is 4096).
65.Pp
66VM buffers also keep track of a byte-granular dirty range and valid range.
67This feature is normally only used by the NFS subsystem. I'm not sure why it
68is used at all, actually, since we have DEV_BSIZE valid/dirty granularity
69within the VM buffer. If a buffer dirty operation creates a 'hole',
70the dirty range will extend to cover the hole. If a buffer validation
71operation creates a 'hole' the byte-granular valid range is left alone and

--- 52 unchanged lines hidden ---
64size is 4096).
65.Pp
66VM buffers also keep track of a byte-granular dirty range and valid range.
67This feature is normally only used by the NFS subsystem. I'm not sure why it
68is used at all, actually, since we have DEV_BSIZE valid/dirty granularity
69within the VM buffer. If a buffer dirty operation creates a 'hole',
70the dirty range will extend to cover the hole. If a buffer validation
71operation creates a 'hole' the byte-granular valid range is left alone and

--- 52 unchanged lines hidden ---