From owner-freebsd-current Fri Sep 8 19: 8:35 2000 Delivered-To: freebsd-current@freebsd.org Received: from midten.fast.no (midten.fast.no [213.188.8.11]) by hub.freebsd.org (Postfix) with ESMTP id 8DBE537B424 for ; Fri, 8 Sep 2000 19:08:30 -0700 (PDT) Received: from fast.no (IDENT:tegge@midten.fast.no [213.188.8.11]) by midten.fast.no (8.9.3/8.9.3) with ESMTP id EAA69984; Sat, 9 Sep 2000 04:08:23 +0200 (CEST) Message-Id: <200009090208.EAA69984@midten.fast.no> To: jhb@pike.osd.bsdi.com Cc: current@FreeBSD.ORG Subject: Re: Dirty buffers on reboot.. From: Tor.Egge@fast.no In-Reply-To: Your message of "Fri, 8 Sep 2000 12:42:18 -0700 (PDT)" References: <200009081942.MAA57127@pike.osd.bsdi.com> X-Mailer: Mew version 1.70 on Emacs 19.34.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Sat, 09 Sep 2000 04:08:22 +0200 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Ok, an update on the dirty buffers on reboot: > > If you use the reboot command, you will get dirty buffers. If you use > 'shutdown -r now' instead, you won't get dirty buffers. Thus, as a workaround > for now, use the shutdown command to reboot your box until we can track this > down. I suggest using some method to allow interrupt threads to run during the shutdown. Perhaps the current process priority should be elevated so it is guaranteed to be scheduled after the last interrupt thread instead of some unrelated process. Index: kern_shutdown.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_shutdown.c,v retrieving revision 1.80 diff -u -r1.80 kern_shutdown.c --- kern_shutdown.c 2000/09/07 01:32:51 1.80 +++ kern_shutdown.c 2000/09/09 01:42:20 @@ -220,6 +220,7 @@ if (!cold && (howto & RB_NOSYNC) == 0 && waittime < 0) { register struct buf *bp; int iter, nbusy; + int subiter; waittime = 0; printf("\nsyncing disks... "); @@ -247,7 +248,18 @@ break; printf("%d ", nbusy); sync(&proc0, NULL); - DELAY(50000 * iter); + + if (curproc != NULL) { + for (subiter = 0; subiter < 50 * iter; subiter++) { + mtx_enter(&sched_lock, MTX_SPIN); + setrunqueue(curproc); + mi_switch(); /* Allow interrupt threads to run */ + mtx_exit(&sched_lock, MTX_SPIN); + DELAY(1000); + } + } else + DELAY(50000 * iter); + } printf("\n"); /* - Tor Egge To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message