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

Function vm_object_page_remove_write

freebsd/vm/vm_object.c:978–996  ·  view source on GitHub ↗

* Make the page read-only so that we can clear the object flags. However, if * this is a nosync mmap then the object is likely to stay dirty so do not * mess with the page and do not clear the object flags. Returns TRUE if the * page should be flushed, and FALSE otherwise. */

Source from the content-addressed store, hash-verified

976 * page should be flushed, and FALSE otherwise.
977 */
978static boolean_t
979vm_object_page_remove_write(vm_page_t p, int flags, boolean_t *allclean)
980{
981
982 vm_page_assert_busied(p);
983
984 /*
985 * If we have been asked to skip nosync pages and this is a
986 * nosync page, skip it. Note that the object flags were not
987 * cleared in this case so we do not have to set them.
988 */
989 if ((flags & OBJPC_NOSYNC) != 0 && (p->a.flags & PGA_NOSYNC) != 0) {
990 *allclean = FALSE;
991 return (FALSE);
992 } else {
993 pmap_remove_write(p);
994 return (p->dirty != 0);
995 }
996}
997
998/*
999 * vm_object_page_clean

Callers 2

vm_object_page_cleanFunction · 0.85

Calls 1

pmap_remove_writeFunction · 0.50

Tested by

no test coverage detected