softdep panic while low on memory during "make buildworld"
Matthew Dillon
dillon at apollo.backplane.com
Sun Jan 27 15:55:59 PST 2008
: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 at backplane.com>
More information about the Bugs
mailing list