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

Function vm_page_clear_dirty_mask

freebsd/vm/vm_page.c:5089–5106  ·  view source on GitHub ↗

* Clear the given bits from the specified page's dirty field. */

Source from the content-addressed store, hash-verified

5087 * Clear the given bits from the specified page's dirty field.
5088 */
5089static __inline void
5090vm_page_clear_dirty_mask(vm_page_t m, vm_page_bits_t pagebits)
5091{
5092
5093 vm_page_assert_busied(m);
5094
5095 /*
5096 * If the page is xbusied and not write mapped we are the
5097 * only thread that can modify dirty bits. Otherwise, The pmap
5098 * layer can call vm_page_dirty() without holding a distinguished
5099 * lock. The combination of page busy and atomic operations
5100 * suffice to guarantee consistency of the page dirty field.
5101 */
5102 if (vm_page_xbusied(m) && !pmap_page_is_write_mapped(m))
5103 m->dirty &= ~pagebits;
5104 else
5105 vm_page_bits_clear(m, &m->dirty, pagebits);
5106}
5107
5108/*
5109 * vm_page_set_validclean:

Callers 2

vm_page_set_validcleanFunction · 0.85
vm_page_clear_dirtyFunction · 0.85

Calls 1

vm_page_bits_clearFunction · 0.85

Tested by

no test coverage detected