MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vm_page_drop

Function vm_page_drop

freebsd/vm/vm_page.h:954–968  ·  view source on GitHub ↗

* vm_page_drop: * * Release a reference to a page and return the old reference count. */

Source from the content-addressed store, hash-verified

952 * Release a reference to a page and return the old reference count.
953 */
954static inline u_int
955vm_page_drop(vm_page_t m, u_int val)
956{
957 u_int old;
958
959 /*
960 * Synchronize with vm_page_free_prep(): ensure that all updates to the
961 * page structure are visible before it is freed.
962 */
963 atomic_thread_fence_rel();
964 old = atomic_fetchadd_int(&m->ref_count, -val);
965 KASSERT(old != VPRC_BLOCKED,
966 ("vm_page_drop: page %p has an invalid refcount value", m));
967 return (old);
968}
969
970/*
971 * vm_page_wired:

Callers 5

vm_page_remove_xbusyFunction · 0.85
vm_page_replace_holdFunction · 0.85
vm_page_unwire_noqFunction · 0.85
vm_page_try_blocked_opFunction · 0.85

Calls 2

atomic_thread_fence_relFunction · 0.50
atomic_fetchadd_intFunction · 0.50

Tested by

no test coverage detected