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

Function vm_page_busy_downgrade

freebsd/vm/vm_page.c:912–927  ·  view source on GitHub ↗

* vm_page_busy_downgrade: * * Downgrade an exclusive busy page into a single shared busy page. */

Source from the content-addressed store, hash-verified

910 * Downgrade an exclusive busy page into a single shared busy page.
911 */
912void
913vm_page_busy_downgrade(vm_page_t m)
914{
915 u_int x;
916
917 vm_page_assert_xbusied(m);
918
919 x = vm_page_busy_fetch(m);
920 for (;;) {
921 if (atomic_fcmpset_rel_int(&m->busy_lock,
922 &x, VPB_SHARERS_WORD(1)))
923 break;
924 }
925 if ((x & VPB_BIT_WAITERS) != 0)
926 wakeup(m);
927}
928
929/*
930 *

Callers 3

vfs_bio_getpagesFunction · 0.85
vm_page_grab_validFunction · 0.85
vm_pageout_flushFunction · 0.85

Calls 1

wakeupFunction · 0.50

Tested by

no test coverage detected