Module Name: src Committed By: ad Date: Thu Apr 23 21:12:06 UTC 2020
Modified Files: src/sys/uvm: uvm_bio.c Log Message: ubc_direct_release(): unbusy the pages directly since pg->interlock is being taken. To generate a diff of this commit: cvs rdiff -u -r1.108 -r1.109 src/sys/uvm/uvm_bio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/uvm/uvm_bio.c diff -u src/sys/uvm/uvm_bio.c:1.108 src/sys/uvm/uvm_bio.c:1.109 --- src/sys/uvm/uvm_bio.c:1.108 Tue Apr 7 19:12:25 2020 +++ src/sys/uvm/uvm_bio.c Thu Apr 23 21:12:06 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_bio.c,v 1.108 2020/04/07 19:12:25 ad Exp $ */ +/* $NetBSD: uvm_bio.c,v 1.109 2020/04/23 21:12:06 ad Exp $ */ /* * Copyright (c) 1998 Chuck Silvers. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.108 2020/04/07 19:12:25 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_bio.c,v 1.109 2020/04/23 21:12:06 ad Exp $"); #include "opt_uvmhist.h" #include "opt_ubc.h" @@ -910,8 +910,16 @@ ubc_direct_release(struct uvm_object *uo for (int i = 0; i < npages; i++) { struct vm_page *pg = pgs[i]; + pg->flags &= ~PG_BUSY; + UVM_PAGE_OWN(pg, NULL); + if (pg->flags & PG_RELEASED) { + pg->flags &= ~PG_RELEASED; + uvm_pagefree(pg); + continue; + } uvm_pagelock(pg); uvm_pageactivate(pg); + uvm_pagewakeup(pg); uvm_pageunlock(pg); /* Page was changed, no longer fake and neither clean. */ @@ -922,7 +930,6 @@ ubc_direct_release(struct uvm_object *uo "page %p not dirty", pg); } } - uvm_page_unbusy(pgs, npages); rw_exit(uobj->vmobjlock); }