From owner-freebsd-hackers Sun Feb 21 21:34:24 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp03.primenet.com (smtp03.primenet.com [206.165.6.133]) by hub.freebsd.org (Postfix) with ESMTP id 751BD10E8F for ; Sun, 21 Feb 1999 21:34:19 -0800 (PST) (envelope-from tlambert@usr07.primenet.com) Received: (from daemon@localhost) by smtp03.primenet.com (8.8.8/8.8.8) id WAA11941; Sun, 21 Feb 1999 22:34:19 -0700 (MST) Received: from usr07.primenet.com(206.165.6.207) via SMTP by smtp03.primenet.com, id smtpd011911; Sun Feb 21 22:34:16 1999 Received: (from tlambert@localhost) by usr07.primenet.com (8.8.5/8.8.5) id WAA01171; Sun, 21 Feb 1999 22:34:09 -0700 (MST) From: Terry Lambert Message-Id: <199902220534.WAA01171@usr07.primenet.com> Subject: Re: Panic in FFS/4.0 as of yesterday To: dfr@nlsystems.com (Doug Rabson) Date: Mon, 22 Feb 1999 05:34:08 +0000 (GMT) Cc: tlambert@primenet.com, dillon@apollo.backplane.com, freebsd-hackers@FreeBSD.ORG In-Reply-To: from "Doug Rabson" at Feb 21, 99 09:47:16 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > > I think promoting directory writes (and directory reads probably) might be > > > the simplest solution. > > > > OK, here's code to add the ability to expedite placement of async > > writes. It' doesn't insert them in order behind other expedited > > writes, so it turns the expedited stuff LIFO. This is probably > > suboptimal, but can't happen in dependent operations, so what the > > heck... > > > > When you use the code, be sure to *not* set the flag if soft updates > > are in effect (I think that's a caller issue, not a callee issue, since > > it would complicate the bdwrite code, probably unacceptably. > > I don't think this will do the job at all. The buffers in question are > not delayed writes, so all this patch will do is change the order of the > LOCKED and LRU lists, probably pessimising the reuse of those buffers. Check the code paths and look for B_ASYNC getting unset. I believe this is the correct patch. > I think the flag needs to be implemented in the driver. The driver should > check for the EXPEDITE flag and either maintain two queues for the two > possible priorities or place the buffer at the front of a single work > queue. This has some serious flaws. The first is, you have to get it right in more than one driver. This is really like the "wakeup" character change I did to the serial drivers to allow for unanticipated "hotchar" in binary only drivers from third parties, like E.T. Inc.. The second is that the lock cascade occurs because of locked vnodes over an operation queued through this code, and only completion notification will get rid of the lock. The third is that, however you do it, it needs to be harmless to disk integrity in the soft updates and standard mount cases. The standard mount case comes for free, by not using the B_ASYNC flag; but the soft updates case is harder. You won't be able to add an assert check at the queue-to-driver level to make sure the code is right, since the buffer is no longer associated with the structure that contains the soft dependency active/inactive information. Look at the cases where the I/O call is actually made in the UFS code, and trace the function calls down. I'm willing to be wrong. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message