summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_page.h
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2004-10-24 06:15:36 +0000
committeralc <alc@FreeBSD.org>2004-10-24 06:15:36 +0000
commitfaeb94902118c8cefd8ef3dd9d807bdd25bb6817 (patch)
tree31a4847e67efbb9233971e7fc716768fc31d4793 /sys/vm/vm_page.h
parent7a9167aadd43576d03ace6553b26d037722487a8 (diff)
downloadFreeBSD-src-faeb94902118c8cefd8ef3dd9d807bdd25bb6817.zip
FreeBSD-src-faeb94902118c8cefd8ef3dd9d807bdd25bb6817.tar.gz
Introduce VM_ALLOC_NOBUSY, an option to vm_page_alloc() and vm_page_grab()
that indicates that the caller does not want a page with its busy flag set. In many places, the global page queues lock is acquired and released just to clear the busy flag on a just allocated page. Both the allocation of the page and the clearing of the busy flag occur while the containing vm object is locked. So, the busy flag might as well never be set.
Diffstat (limited to 'sys/vm/vm_page.h')
-rw-r--r--sys/vm/vm_page.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h
index a7f84e8..9c9cfba 100644
--- a/sys/vm/vm_page.h
+++ b/sys/vm/vm_page.h
@@ -317,6 +317,7 @@ extern struct mtx vm_page_queue_mtx;
#define VM_ALLOC_ZERO 0x0040 /* Try to obtain a zeroed page */
#define VM_ALLOC_RETRY 0x0080 /* vm_page_grab() only */
#define VM_ALLOC_NOOBJ 0x0100 /* No associated object */
+#define VM_ALLOC_NOBUSY 0x0200 /* Do not busy the page */
void vm_page_flag_set(vm_page_t m, unsigned short bits);
void vm_page_flag_clear(vm_page_t m, unsigned short bits);
OpenPOWER on IntegriCloud