Skip to contentSkip to conversation

fix loop deadlock

PATCH New Andrew Morton 1 participant 1 message Mar 31, 2002 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix loop deadlock

2.5 is missing a chunk from 2.4

fs/buffer.c renamed from fs/buffer.c~loop-deadlock +1 -1
@@ -992,7 +992,7 @@ static int balance_dirty_state(void)
 
 	/* First, check for the "real" dirty limit. */
 	if (dirty > soft_dirty_limit) {
-		if (dirty > hard_dirty_limit)
+		if (dirty > hard_dirty_limit && !(current->flags & PF_NOIO))
 			return 1;
 		return 0;
 	}
Quoted 1 line

From an efficiency POV loop is looking rather hilarious:

c013da84 kmem_cache_alloc                             30   0.0355
c0239bc0 __make_request                               41   0.0321
c02457e0 transfer_none                                90   1.2500
c0148480 create_bounce                               171   0.2007
c0138a00 generic_file_write                          305   0.1540
c014d558 write_some_buffers                        10028  28.4886
c0151db5 .text.lock.buffer                         29229  47.2197
00000000 total                                     40308   0.0195

Probably we can fix this using the BH_Launder bit from Andrea's kit.

-