Deleted Added
full compact
vm_page.h (235372) vm_page.h (237168)
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

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

52 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
53 * School of Computer Science
54 * Carnegie Mellon University
55 * Pittsburgh PA 15213-3890
56 *
57 * any improvements or extensions that they make and grant Carnegie the
58 * rights to redistribute these changes.
59 *
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

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

52 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
53 * School of Computer Science
54 * Carnegie Mellon University
55 * Pittsburgh PA 15213-3890
56 *
57 * any improvements or extensions that they make and grant Carnegie the
58 * rights to redistribute these changes.
59 *
60 * $FreeBSD: head/sys/vm/vm_page.h 235372 2012-05-12 20:42:56Z kib $
60 * $FreeBSD: head/sys/vm/vm_page.h 237168 2012-06-16 18:56:19Z alc $
61 */
62
63/*
64 * Resident memory system definitions.
65 */
66
67#ifndef _VM_PAGE_
68#define _VM_PAGE_

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

232#define vm_page_lockptr(m) (PA_LOCKPTR(VM_PAGE_TO_PHYS((m))))
233#define vm_page_lock(m) mtx_lock(vm_page_lockptr((m)))
234#define vm_page_unlock(m) mtx_unlock(vm_page_lockptr((m)))
235#define vm_page_trylock(m) mtx_trylock(vm_page_lockptr((m)))
236#define vm_page_lock_assert(m, a) mtx_assert(vm_page_lockptr((m)), (a))
237#endif
238
239#define vm_page_queue_free_mtx vm_page_queue_free_lock.data
61 */
62
63/*
64 * Resident memory system definitions.
65 */
66
67#ifndef _VM_PAGE_
68#define _VM_PAGE_

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

232#define vm_page_lockptr(m) (PA_LOCKPTR(VM_PAGE_TO_PHYS((m))))
233#define vm_page_lock(m) mtx_lock(vm_page_lockptr((m)))
234#define vm_page_unlock(m) mtx_unlock(vm_page_lockptr((m)))
235#define vm_page_trylock(m) mtx_trylock(vm_page_lockptr((m)))
236#define vm_page_lock_assert(m, a) mtx_assert(vm_page_lockptr((m)), (a))
237#endif
238
239#define vm_page_queue_free_mtx vm_page_queue_free_lock.data
240
240/*
241 * These are the flags defined for vm_page.
242 *
241/*
242 * These are the flags defined for vm_page.
243 *
243 * aflags are updated by atomic accesses. Use the vm_page_aflag_set()
244 * aflags are updated by atomic accesses. Use the vm_page_aflag_set()
244 * and vm_page_aflag_clear() functions to set and clear the flags.
245 *
246 * PGA_REFERENCED may be cleared only if the object containing the page is
245 * and vm_page_aflag_clear() functions to set and clear the flags.
246 *
247 * PGA_REFERENCED may be cleared only if the object containing the page is
247 * locked.
248 * locked. It is set by both the MI and MD VM layers.
248 *
249 * PGA_WRITEABLE is set exclusively on managed pages by pmap_enter(). When it
249 *
250 * PGA_WRITEABLE is set exclusively on managed pages by pmap_enter(). When it
250 * does so, the page must be VPO_BUSY.
251 * does so, the page must be VPO_BUSY. The MI VM layer must never access this
252 * flag directly. Instead, it should call pmap_page_is_write_mapped().
251 *
252 * PGA_EXECUTABLE may be set by pmap routines, and indicates that a page has
253 *
254 * PGA_EXECUTABLE may be set by pmap routines, and indicates that a page has
253 * at least one executable mapping. It is not consumed by the VM layer.
255 * at least one executable mapping. It is not consumed by the MI VM layer.
254 */
255#define PGA_WRITEABLE 0x01 /* page may be mapped writeable */
256#define PGA_REFERENCED 0x02 /* page has been referenced */
257#define PGA_EXECUTABLE 0x04 /* page may be mapped executable */
258
259/*
260 * Page flags. If changed at any other time than page allocation or
261 * freeing, the modification must be protected by the vm_page lock.
262 */
263#define PG_CACHED 0x01 /* page is cached */
264#define PG_FREE 0x02 /* page is free */
256 */
257#define PGA_WRITEABLE 0x01 /* page may be mapped writeable */
258#define PGA_REFERENCED 0x02 /* page has been referenced */
259#define PGA_EXECUTABLE 0x04 /* page may be mapped executable */
260
261/*
262 * Page flags. If changed at any other time than page allocation or
263 * freeing, the modification must be protected by the vm_page lock.
264 */
265#define PG_CACHED 0x01 /* page is cached */
266#define PG_FREE 0x02 /* page is free */
265#define PG_FICTITIOUS 0x04 /* physical page doesn't exist (O) */
267#define PG_FICTITIOUS 0x04 /* physical page doesn't exist */
266#define PG_ZERO 0x08 /* page is zeroed */
267#define PG_MARKER 0x10 /* special queue marker page */
268#define PG_SLAB 0x20 /* object pointer is actually a slab */
269#define PG_WINATCFLS 0x40 /* flush dirty page on inactive q */
268#define PG_ZERO 0x08 /* page is zeroed */
269#define PG_MARKER 0x10 /* special queue marker page */
270#define PG_SLAB 0x20 /* object pointer is actually a slab */
271#define PG_WINATCFLS 0x40 /* flush dirty page on inactive q */
270#define PG_NODUMP 0x80 /* don't include this page in the dump */
272#define PG_NODUMP 0x80 /* don't include this page in a dump */
271
272/*
273 * Misc constants.
274 */
275#define ACT_DECLINE 1
276#define ACT_ADVANCE 3
277#define ACT_INIT 5
278#define ACT_MAX 64

--- 186 unchanged lines hidden ---
273
274/*
275 * Misc constants.
276 */
277#define ACT_DECLINE 1
278#define ACT_ADVANCE 3
279#define ACT_INIT 5
280#define ACT_MAX 64

--- 186 unchanged lines hidden ---