Date: Sun, 10 Sep 2000 17:49:07 -0700 (PDT) From: John Baldwin <jhb@pike.osd.bsdi.com> To: Tor.Egge@fast.no Cc: current@FreeBSD.ORG Subject: Re: Dirty buffers on reboot.. Message-ID: <200009110049.RAA28932@pike.osd.bsdi.com> In-Reply-To: <200009090208.EAA69984@midten.fast.no> from "Tor.Egge@fast.no" at "Sep 9, 2000 04:08:22 am"
next in thread | previous in thread | raw e-mail | index | archive | help
Tor.Egge@fast.no wrote:
> > 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) {
curproc is never NULL anymore, so the if statement can be removed.
> + 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
>
--
John Baldwin <jhb@bsdi.com> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009110049.RAA28932>
