vm_page.h (2965a4531505c497a6bbc6f2974499a520c75394) vm_page.h (0ce3ba8cd58ea437906bcb4cf8c03a4e92a9e8ca)
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * The Mach Operating System project at Carnegie-Mellon University.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

85 *
86 * An ordered list of pages due for pageout.
87 *
88 * In addition, the structure contains the object
89 * and offset to which this page belongs (for pageout),
90 * and sundry status bits.
91 *
92 * Fields in this structure are locked either by the lock on the
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * The Mach Operating System project at Carnegie-Mellon University.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

85 *
86 * An ordered list of pages due for pageout.
87 *
88 * In addition, the structure contains the object
89 * and offset to which this page belongs (for pageout),
90 * and sundry status bits.
91 *
92 * Fields in this structure are locked either by the lock on the
93 * object that the page belongs to (O) or by the lock on the page
94 * queues (P).
93 * object that the page belongs to (O), its corresponding page lock (P),
94 * or by the lock on the page queues (Q).
95 *
95 */
96
97TAILQ_HEAD(pglist, vm_page);
98
99struct vm_page {
96 */
97
98TAILQ_HEAD(pglist, vm_page);
99
100struct vm_page {
100 TAILQ_ENTRY(vm_page) pageq; /* queue info for FIFO queue or free list (P) */
101 TAILQ_ENTRY(vm_page) pageq; /* queue info for FIFO queue or free list (Q) */
101 TAILQ_ENTRY(vm_page) listq; /* pages in same object (O) */
102 struct vm_page *left; /* splay tree link (O) */
103 struct vm_page *right; /* splay tree link (O) */
104
102 TAILQ_ENTRY(vm_page) listq; /* pages in same object (O) */
103 struct vm_page *left; /* splay tree link (O) */
104 struct vm_page *right; /* splay tree link (O) */
105
105 vm_object_t object; /* which object am I in (O,P)*/
106 vm_pindex_t pindex; /* offset into object (O,P) */
106 vm_object_t object; /* which object am I in (O,Q)*/
107 vm_pindex_t pindex; /* offset into object (O,Q) */
107 vm_paddr_t phys_addr; /* physical address of page */
108 struct md_page md; /* machine dependant stuff */
109 uint8_t queue; /* page queue index */
110 int8_t segind;
111 u_short flags; /* see below */
112 uint8_t order; /* index of the buddy queue */
113 uint8_t pool;
108 vm_paddr_t phys_addr; /* physical address of page */
109 struct md_page md; /* machine dependant stuff */
110 uint8_t queue; /* page queue index */
111 int8_t segind;
112 u_short flags; /* see below */
113 uint8_t order; /* index of the buddy queue */
114 uint8_t pool;
114 u_short cow; /* page cow mapping count */
115 u_int wire_count; /* wired down maps refs (P) */
116 short hold_count; /* page hold count */
115 u_short cow; /* page cow mapping count (Q) */
116 u_int wire_count; /* wired down maps refs (Q) */
117 short hold_count; /* page hold count (P) */
117 u_short oflags; /* page flags (O) */
118 u_short oflags; /* page flags (O) */
118 u_char act_count; /* page usage count */
119 u_char act_count; /* page usage count (Q) */
119 u_char busy; /* page busy count (O) */
120 /* NOTE that these must support one bit per DEV_BSIZE in a page!!! */
121 /* so, on normal X86 kernels, they must be at least 8 bits wide */
122#if PAGE_SIZE == 4096
123 u_char valid; /* map of valid DEV_BSIZE chunks (O) */
124 u_char dirty; /* map of dirty DEV_BSIZE chunks */
125#elif PAGE_SIZE == 8192
126 u_short valid; /* map of valid DEV_BSIZE chunks (O) */

--- 283 unchanged lines hidden ---
120 u_char busy; /* page busy count (O) */
121 /* NOTE that these must support one bit per DEV_BSIZE in a page!!! */
122 /* so, on normal X86 kernels, they must be at least 8 bits wide */
123#if PAGE_SIZE == 4096
124 u_char valid; /* map of valid DEV_BSIZE chunks (O) */
125 u_char dirty; /* map of dirty DEV_BSIZE chunks */
126#elif PAGE_SIZE == 8192
127 u_short valid; /* map of valid DEV_BSIZE chunks (O) */

--- 283 unchanged lines hidden ---