Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Feb 2002 11:15:48 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        "Justin T. Gibbs" <gibbs@scsiguy.com>
Cc:        cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/kern kern_shutdown.c 
Message-ID:  <200202241915.g1OJFmB95274@apollo.backplane.com>
References:   <200202241904.g1OJ4YI78683@aslan.scsiguy.com>

next in thread | previous in thread | raw e-mail | index | archive | help

:>dillon      2002/02/21 11:15:10 PST
:>
:>  Modified files:        (Branch: RELENG_4)
:>    sys/kern             kern_shutdown.c 
:>  Log:
:>  If a system shutdown is performed immediately after doing softupdates-heavy
:>  filesystem operations the shutdown code may stall on buffers being held
:>  locked by softupdates, resulting an unclean shutdown.  These buffers are
:>  never unlocked because the syncer has already been killed.  The solution is
:>  to call bioops.io_sync() in the shutdown code.
:
:Hmm.  Can't this be handled in some more generic fashion?  I can't believe
:that the syncer is the only "special process" that may want to clean things
:up during shutdown.  I suppose we don't kill it off by trying to SIGTERM
:(or some equivalent) it first?  A generic mechanism would allow the special
:behavior to be localized to the area needing it instead (and where that
:behavior might change) rather than in the middle of the generic shutdown
:code.
:
:--
:Justin

    Well, I thought about it.  Kirk suggested trying to leave the syncer
    running longer.  The problem we face is that even if the syncer cleans
    up all of its work, the moment we try to flush something else to the
    filesystem (like a dirty buffer), additional softupdates work may be
    queued.

    We also want the system shutdown code to be able to take the machine
    down as cleanly as possible, even if there is system corruption.  The
    syncer does not try anywhere near as hard as the shutdown code in 
    regards to getting as many buffers pushed out as possible and knowing
    when to give up.  So I decided to just insert the appropriate code
    in the shutdown procedure.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200202241915.g1OJFmB95274>