Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 4 Dec 2000 08:52:31 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 4 Dec 2000 08:52:22 -0500 Received: from isis.its.uow.edu.au ([130.130.68.21]:55295 "EHLO isis.its.uow.edu.au") by vger.kernel.org with ESMTP id ; Mon, 4 Dec 2000 08:52:09 -0500 Message-ID: <3A2B9B39.AA240475@uow.edu.au> Date: Tue, 05 Dec 2000 00:25:13 +1100 From: Andrew Morton X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.4.0-test12-pre3 i586) X-Accept-Language: en MIME-Version: 1.0 To: Alexander Viro CC: Linus Torvalds , Kernel Mailing List Subject: Re: [PATCH] inode dirty blocks Re: test12-pre4 In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Alexander Viro wrote: > > On Sun, 3 Dec 2000, Linus Torvalds wrote: > > > > > Synching up with Alan and various other stuff. The most important one > > being the fix to the inode dirty block list. > > It doesn't solve the problem. If you unlink a file with dirty metadata > you have a nice chance to hit the BUG() in inode.c:83. I hope that patch > below closes all remaining holes. See analysis in previous posting > (basically, bforget() is not enough when we free the block; bh should > be removed from the inode's list regardless of the ->b_count). It's still happening. The good news is that I have a machine which does it within 15-30 minutes. The only interesting difference is that is has 64 megs of RAM (all the others are 256) and its IDE system is a lot slower. I removed the UnlockPage() at line 623 of vmscan.c because that's causing assertion failures at swap.c:271. I changed destroy_inode() thusly: static void destroy_inode(struct inode *inode) { if (!list_empty(&inode->i_dirty_buffers)) { struct task_struct *tsk; printk("&inode->i_dirty_buffers=0x%p\n", &inode->i_dirty_buffers); printk("next=0x%p\n", inode->i_dirty_buffers.next); printk("prev=0x%p\n", inode->i_dirty_buffers.prev); read_lock(&tasklist_lock); for_each_task(tsk) { printk("[%s]\n", tsk->comm); show_stack(tsk->thread.esp); printk("\n\n"); } read_unlock(&tasklist_lock); BUG(); } kmem_cache_free(inode_cachep, (inode)); } So we get a full task dump. Otherwise this is vanilla test12-pre4 plus your bforget_inode() patch. SMP kernel on UP hardware, so this is a good snapshot of system state. First the BUG trace: &inode->i_dirty_buffers=0xc1cc6c98 next=0xc03e9a78 prev=0xc03e9a78 Trace; c021b8c5 Trace; c021b9c2 Trace; c0146a86 Trace; c01451a6 Trace; c013df5d Trace; c013e035 Trace; c0108fdf That's the same as before. Now some other interesting tasks. The fourth dbench may be interesting? And look at what kswapd is doing. [dbench] Trace; c012bf9b Trace; c012cc9e <__alloc_pages+246/2f8> Trace; c012671c Trace; c0144589 Trace; c013092a [dbench] Trace; c012bf9b Trace; c012cc9e <__alloc_pages+246/2f8> Trace; c012671c Trace; c0144589 Trace; c013092a [dbench] Trace; c01c1557 Trace; c018a34e Trace; c0118851 Trace; c0118851 Trace; c4800000 <_end+44e2e4c/10503eac> Trace; c0109324 Trace; c020c2c3 Trace; c020c2c3 Trace; c0145875 Trace; c021b9b9 Trace; c0146a86 Trace; c01451a6 Trace; c013df5d Trace; c010002b (This is `current') [dbench] Trace; c01317fd <__wait_on_buffer+4d/e0> Trace; c0132cd9 Trace; c0156d6c Trace; c01465a8 Trace; c014685d [kupdate] Trace; c01156ea Trace; c0115614 Trace; c0135304 Trace; c01074c3 [bdflush] Trace; c0135255 Trace; c01074c3 [kreclaimd] Trace; c0116209 Trace; c012c03f Trace; c0105000 Trace; c01074c3 [kswapd] Trace; c01317fd <__wait_on_buffer+4d/e0> Trace; c0132cd9 Trace; c0157180 Trace; c015748e Trace; c0145d59 Trace; c0146221 Trace; c0146335 Trace; c012bd3b Trace; c0217b71 Trace; c012bdf6 Trace; c0105000 Trace; c01074c3 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/