From owner-cvs-all Sun Feb 24 11:16:13 2002 Delivered-To: cvs-all@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id B32BE37B404; Sun, 24 Feb 2002 11:15:49 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.11.6/8.9.1) id g1OJFmB95274; Sun, 24 Feb 2002 11:15:48 -0800 (PST) (envelope-from dillon) Date: Sun, 24 Feb 2002 11:15:48 -0800 (PST) From: Matthew Dillon Message-Id: <200202241915.g1OJFmB95274@apollo.backplane.com> To: "Justin T. Gibbs" Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/kern kern_shutdown.c References: <200202241904.g1OJ4YI78683@aslan.scsiguy.com> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :>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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message