Messages in this thread Patch in this message | | | Date | Thu, 25 Feb 1999 00:53:57 +0100 (CET) | From | Andrea Arcangeli <> | Subject | [patch] real fix Re: [patch] fixed lock_super() deadlock (process in D state) |
| |
On Wed, 24 Feb 1999, Andrea Arcangeli wrote:
>I don't know _why_ this patch is needed and if it's 100% safe. Right now I
Now I know why ;)
--- linux/mm/vmscan.c.orig Thu Feb 25 00:44:28 1999 +++ linux/mm/vmscan.c Thu Feb 25 00:44:55 1999 @@ -407,7 +407,9 @@ goto done; } - shrink_dcache_memory(priority, gfp_mask); + /* iput() could recurse and deadlock on the fs. -arca */ + if (gfp_mask & __GFP_IO) + shrink_dcache_memory(priority, gfp_mask); } while (--priority >= 0); done: unlock_kernel();
I still don't have the confirm from David that this is enough to fix the process in D state, but this bug could really at least cause some of the process in D state deadlocks under heavy VM activities.
See the trace below that David generated with some my debugging stuff I sent to him:
>>EIP: c0135f89 <ext2_free_blocks+4d/300> Trace: c0125b4b <__bforget+57/78> Trace: c013d273 <trunc_direct+127/138> Trace: c013d89a <ext2_truncate+4a/180> Trace: c0138ab5 <ext2_delete_inode+51/78> Trace: c0138acb <ext2_delete_inode+67/78> Trace: c01301d8 <iput+7c/1e4> Trace: c012ebda <dput+a6/148> Trace: c012eea8 <prune_dcache+d0/e0> Trace: c012f0f3 <shrink_dcache_memory+7/c> Trace: c0120ad7 <do_try_to_free_pages+67/78> Trace: c0120bd3 <try_to_free_pages+23/30> Trace: c012135e <__get_free_pages+72/1bc> Trace: c01265f1 <grow_buffers+4d/e8> Trace: c01265dc <grow_buffers+38/e8> Trace: c01256e2 <refill_freelist+a/30> Trace: c012596a <getblk+1fa/21c> Trace: c0136a0b <ext2_new_block+7cf/94c> Trace: c01265f1 <grow_buffers+4d/e8> Trace: c0138c4c <ext2_alloc_block+140/150> Trace: c0138fb7 <inode_getblk+10f/1d4> Trace: c01393bc <ext2_getblk+b8/22c> Trace: c01377c2 <ext2_file_write+1ea/4b0> Trace: c01375d8 <ext2_file_write+0/4b0> Trace: c0125ad3 <__brelse+13/34> Trace: c0110cbf <schedule+237/260> Trace: c0110d13 <__wake_up+2b/3c> Trace: c012a26e <pipe_read+12a/170> Trace: c012409a <sys_read+be/dc> Trace: c012417c <sys_write+c4/ec> Trace: c01098f8 <system_call+34/38>
David?
Andrea Arcangeli
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |