mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-12 14:29:28 +00:00
Use vm_page_xxx() inline functions to manipulate vm_page::flags, vm_page::busy.
As a side effect, a few wakeup() calls are added, which might fix some of the missing vm_page wakeups people have been seeing. Reviewed by: Doug Rabson <dfr@nlsystems.com>
This commit is contained in:
parent
abd931ff18
commit
523e3b0f7f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=40038
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)ufs_readwrite.c 8.11 (Berkeley) 5/8/95
|
||||
* $Id: ufs_readwrite.c,v 1.51 1998/07/08 01:04:33 julian Exp $
|
||||
* $Id: ufs_readwrite.c,v 1.52 1998/09/07 11:50:19 bde Exp $
|
||||
*/
|
||||
|
||||
#define BLKSIZE(a, b, c) blksize(a, b, c)
|
||||
@ -473,8 +473,8 @@ ffs_getpages(ap)
|
||||
for (i = 0; i < pcount; i++) {
|
||||
m = ap->a_m[i];
|
||||
vm_page_activate(m);
|
||||
m->busy++;
|
||||
m->flags &= ~PG_BUSY;
|
||||
vm_page_io_start(m);
|
||||
vm_page_wakeup(m);
|
||||
}
|
||||
|
||||
auio.uio_iov = &aiov;
|
||||
@ -491,18 +491,18 @@ ffs_getpages(ap)
|
||||
|
||||
for (i = 0; i < pcount; i++) {
|
||||
m = ap->a_m[i];
|
||||
m->busy--;
|
||||
vm_page_io_finish(m);
|
||||
|
||||
if ((m != mreq) && (m->wire_count == 0) && (m->hold_count == 0) &&
|
||||
(m->valid == 0) && (m->busy == 0) &&
|
||||
(m->flags & PG_BUSY) == 0) {
|
||||
m->flags |= PG_BUSY;
|
||||
vm_page_busy(m);
|
||||
vm_page_free(m);
|
||||
} else if (m == mreq) {
|
||||
while (m->flags & PG_BUSY) {
|
||||
vm_page_sleep(m, "ffspwt", NULL);
|
||||
}
|
||||
m->flags |= PG_BUSY;
|
||||
vm_page_busy(m);
|
||||
vp->v_lastr = m->pindex + 1;
|
||||
} else {
|
||||
if (m->wire_count == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user