Bruce Evans wrote:
> On Sun, 10 Sep 2000, John Baldwin wrote:
>
> > [EMAIL PROTECTED] 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 haven't noticed this yet. I normally use reboot.
It is probably a timing issue more than anything else. :-/
> > > 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.
>
> I'm surprised they get stopped. At least writing buffers in sync()
> depends on interrupts working. There is a problem for syncing in
> panic(). Interrupts (and tsleep()) shouldn't work in panic(),
> especially for panics in interrupt context. They used to sort of
> work by doing splx(safepri). This corresponds to blowing open all
> locks.
Hmm. By calling mi_switch() we end up giving up both shced_lock and Giant,
so that this is equivalent for the time being to "blowing open all the locks".
> > > RCS file: /home/ncvs/src/sys/kern/kern_shutdown.c,v
> > > retrieving revision 1.80
> > > ...
> > > @@ -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.
>
> Can't it happen for panics while cold? The code "if (p && p != idleproc ...)"
> in uprintf() seems to be to handle this. We still have lots of (p == NULL)
> checks where coldness probably isn't an issue.
Hmmmm. At least on the x86, curproc is now set to proc0 before we probe
to see how much memory we have in init386(). In fact, we set curproc up
right after setting up the GDT, and before both the ldt and idt, so at least
on x86, we won't get a trap with curproc == NULL. :) On the alpha I'm not
as sure. Hmm, after looking, we set curproc in alpha_init(), but we do
it much later on. I'm not sure if we have enabled interrupts at that point
or not.
> Bruce
--
John Baldwin <[EMAIL PROTECTED]> -- 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message