Home | History | Annotate | Download | only in uvm

Lines Matching defs:pg

107 	struct vm_page *pg = anon->an_page, *pg2 __diagused;
119 if (__predict_true(pg != NULL)) {
128 if (__predict_false(pg->loan_count != 0)) {
130 KASSERT(pg2 == pg);
139 if (__predict_false(pg->uobject != NULL)) {
140 mutex_enter(&pg->interlock);
141 KASSERT(pg->loan_count > 0);
142 pg->loan_count--;
143 pg->uanon = NULL;
144 mutex_exit(&pg->interlock);
145 rw_exit(pg->uobject->vmobjlock);
153 KASSERT((pg->flags & PG_RELEASED) == 0);
154 pmap_page_protect(pg, VM_PROT_NONE);
161 if (__predict_false((pg->flags & PG_BUSY) != 0)) {
162 pg->flags |= PG_RELEASED;
166 uvm_pagefree(pg);
168 "freed now!", (uintptr_t)anon, (uintptr_t)pg,
212 struct vm_page *pg;
220 * note that the test for pg->loan_count is not protected -- this
226 while (((pg = anon->an_page) != NULL) && pg->loan_count != 0) {
227 mutex_enter(&pg->interlock);
228 if (pg->uobject) {
234 if (!rw_tryenter(pg->uobject->vmobjlock, RW_WRITER)) {
241 mutex_exit(&pg->interlock);
255 if (pg->uobject == NULL && (pg->flags & PG_ANON) == 0) {
256 pg->flags |= PG_ANON;
257 pg->loan_count--;
259 mutex_exit(&pg->interlock);
262 return pg;
277 struct vm_page *pg;
309 pg = anon->an_page;
310 uobj = pg->uobject;
315 uvm_pagemarkdirty(pg, UVM_PAGE_STATUS_DIRTY);
321 uvm_pagelock(pg);
322 uvm_pagedeactivate(pg);
323 uvm_pageunlock(pg);
362 struct vm_page *pg = anon->an_page;
366 KASSERT(pg != NULL);
367 KASSERT((pg->flags & PG_RELEASED) != 0);
368 KASSERT((pg->flags & PG_BUSY) != 0);
369 KASSERT(pg->uobject == NULL);
370 KASSERT(pg->uanon == anon);
371 KASSERT(pg->loan_count == 0);
374 if ((pg->flags & PG_PAGEOUT) != 0) {
375 pg->flags &= ~PG_PAGEOUT;
379 uvm_pagefree(pg);