DragonFly bugs List (threaded) for 2008-01
DragonFly BSD
DragonFly bugs List (threaded) for 2008-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: softdep panic while low on memory during "make buildworld"


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sun, 27 Jan 2008 15:55:17 -0800 (PST)

:No panic with this patch.
:
:Upon closer inspection, the other calls to buf_deallocate() (in
:brelse() and getnewbuf()) are done if and only if b_dep is not empty.
:So a better patch would be:
:
:Index: src2/sys/kern/vfs_bio.c
:===================================================================
:--- src2.orig/sys/kern/vfs_bio.c	2008-01-20 19:27:54.000000000 +0100
:+++ src2/sys/kern/vfs_bio.c	2008-01-22 17:58:05.000000000 +0100
:@@ -1085,7 +1085,8 @@
: 	if (bp->b_flags & (B_DELWRI | B_LOCKED)) {
: 		bp->b_flags &= ~B_RELBUF;
: 	} else if (vm_page_count_severe()) {
:-		buf_deallocate(bp);
:+		if (LIST_FIRST(&bp->b_dep) != NULL)
:+			buf_deallocate(bp);
: 		if (bp->b_flags & (B_DELWRI | B_LOCKED))
: 			bp->b_flags &= ~B_RELBUF;
: 		else
:
:If there are no objections, I'll commit this on sunday.

    You found it.  I must have muffed it up when I made the changes
    to support HAMMER's more sophisticated use of the bioops.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]