From owner-cvs-all Mon Oct 19 03:34:25 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA18489 for cvs-all-outgoing; Mon, 19 Oct 1998 03:34:25 -0700 (PDT) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.15.68.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA18484; Mon, 19 Oct 1998 03:34:21 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id UAA11898; Mon, 19 Oct 1998 20:33:52 +1000 Date: Mon, 19 Oct 1998 20:33:52 +1000 From: Bruce Evans Message-Id: <199810191033.UAA11898@godzilla.zeta.org.au> To: cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, dillon@apollo.backplane.com Subject: Re: Anyone got any ideas? getblk/pgtblk/inode lockup Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk > The code in question is this: > > } else if (m->flags & PG_BUSY) { > s = splvm(); > if (m->flags & PG_BUSY) { > vm_page_flag_set(m, PG_WANTED); > tsleep(m, PVM, "pgtblk", 0); > } > splx(s); > goto doretry; > } ... > > Looking at the kernel dump, the page structure 'm' in the process locked > up in pgtblk has PG_WANTED and PG_TABLED set, but PG_BUSY cleared. > > This combined with the code fragment above leads me to believe that > PG_BUSY is somehow being cleared on the page without waking up the > process. PG_BUSY is cleared without a wakeup in vfs_bio.c and vm_kern.c. The wakeup is apparently important in vfs_bio.c. Untested fix + cosmetic fix for not always using the specialized inline function for doing the wakeup: diff -c2 kern/vfs_bio.c~ kern/vfs_bio.c *** kern/vfs_bio.c~ Wed Oct 14 03:22:21 1998 --- kern/vfs_bio.c Mon Oct 19 20:16:59 1998 *************** *** 1790,1794 **** vm_page_wire(m); ! vm_page_flag_clear(m, PG_BUSY); bp->b_flags &= ~B_CACHE; --- 1831,1835 ---- vm_page_wire(m); ! vm_page_wakeup(m); bp->b_flags &= ~B_CACHE; diff -c2 vm/vm_page.c~ vm/vm_page.c *** vm/vm_page.c~ Sat Sep 5 17:27:51 1998 --- vm/vm_page.c Mon Oct 19 20:18:00 1998 *************** *** 447,455 **** #endif ! vm_page_flag_clear(m, PG_BUSY); ! if (m->flags & PG_WANTED) { ! vm_page_flag_clear(m, PG_WANTED); ! wakeup(m); ! } object = m->object; --- 458,462 ---- #endif ! vm_page_wakeup(m); object = m->object; Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message