Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932867Ab1EJP5j (ORCPT ); Tue, 10 May 2011 11:57:39 -0400 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:47549 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754685Ab1EJP5h (ORCPT ); Tue, 10 May 2011 11:57:37 -0400 Subject: Re: [BUG] fatal hang untarring 90GB file, possibly writeback related. From: James Bottomley To: Mel Gorman Cc: Mel Gorman , Jan Kara , colin.king@canonical.com, Chris Mason , linux-fsdevel , linux-mm , linux-kernel , linux-ext4 In-Reply-To: <1305041397.6737.12.camel@mulgrave.site> References: <1304025145.2598.24.camel@mulgrave.site> <1304030629.2598.42.camel@mulgrave.site> <20110503091320.GA4542@novell.com> <1304431982.2576.5.camel@mulgrave.site> <1304432553.2576.10.camel@mulgrave.site> <20110506074224.GB6591@suse.de> <20110506080728.GC6591@suse.de> <1304964980.4865.53.camel@mulgrave.site> <20110510102141.GA4149@novell.com> <1305036064.6737.8.camel@mulgrave.site> <20110510143509.GD4146@suse.de> <1305041397.6737.12.camel@mulgrave.site> Content-Type: text/plain; charset="UTF-8" Date: Tue, 10 May 2011 15:57:32 +0000 Message-ID: <1305043052.6737.17.camel@mulgrave.site> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 21737 Lines: 451 On Tue, 2011-05-10 at 10:29 -0500, James Bottomley wrote: > On Tue, 2011-05-10 at 15:35 +0100, Mel Gorman wrote: > > On Tue, May 10, 2011 at 09:01:04AM -0500, James Bottomley wrote: > > > On Tue, 2011-05-10 at 11:21 +0100, Mel Gorman wrote: > > > > I really would like to hear if the fix makes a big difference or > > > > if we need to consider forcing SLUB high-order allocations bailing > > > > at the first sign of trouble (e.g. by masking out __GFP_WAIT in > > > > allocate_slab). Even with the fix applied, kswapd might be waking up > > > > less but processes will still be getting stalled in direct compaction > > > > and direct reclaim so it would still be jittery. > > > > > > "the fix" being this > > > > > > https://lkml.org/lkml/2011/3/5/121 > > > > > > > Drop this for the moment. It was a long shot at best and there is little > > evidence the problem is in this area. > > > > I'm attaching two patches. The first is the NO_KSWAPD one to stop > > kswapd being woken up by SLUB using speculative high-orders. The second > > one is more drastic and prevents slub entering direct reclaim or > > compaction. It applies on top of patch 1. These are both untested and > > afraid are a bit rushed as well :( > > Preliminary results with both patches applied still show kswapd > periodically going up to 99% but it doesn't stay there, it comes back > down again (and, obviously, the system doesn't hang). This is a second run with the watch highorders. At the end of the run, the system hung temporarily and now comes back with CPU3 spinning in all system time at kswapd shrink_slab James --- 97 instances order=1 atomic gfp_flags=GFP_ATOMIC|GFP_NOWARN|GFP_NORETRY|GFP_COMP| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc+0x77/0x105 => scsi_pool_alloc_command+0x29/0x68 => scsi_host_alloc_command+0x1f/0x6b 127 instances order=1 normal gfp_flags=GFP_KERNEL => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => __get_free_pages+0xe/0x4a => copy_process+0xe1/0x10c5 => do_fork+0x104/0x286 => sys_clone+0x28/0x2a => stub_clone+0x13/0x20 2 instances order=3 normal gfp_flags=GFP_NOWARN|GFP_NORETRY|GFP_COMP|GFP_NOMEMALLOC| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc+0x77/0x105 => bvec_alloc_bs+0xae/0xcc => bio_alloc_bioset+0x75/0xc3 47 instances order=2 normal gfp_flags=GFP_IO|GFP_NOWARN|GFP_NORETRY|GFP_COMP|GFP_RECLAIMABLE| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc+0x77/0x105 => radix_tree_preload+0x31/0x81 => add_to_page_cache_locked+0x56/0x118 1 instances order=1 normal gfp_flags=GFP_IO|GFP_NOWARN|GFP_NORETRY|GFP_COMP| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc_trace+0x7b/0xd8 => inode_doinit_with_dentry+0x124/0x45c => selinux_d_instantiate+0x1c/0x1e 3 instances order=2 normal gfp_flags=GFP_IO|GFP_NOWARN|GFP_NORETRY|GFP_COMP| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => __kmalloc+0xb1/0x10d => kzalloc.constprop.15+0x13/0x15 [i915] => i915_gem_alloc_object+0x27/0x111 [i915] 4 instances order=1 normal gfp_flags=GFP_IO|GFP_NOWARN|GFP_NORETRY|GFP_COMP| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc+0x77/0x105 => mmap_region+0x1b7/0x446 => do_mmap_pgoff+0x298/0x2f2 27 instances order=1 normal gfp_flags=GFP_NOWARN|GFP_NORETRY|GFP_COMP|GFP_NOMEMALLOC| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => __page_cache_alloc+0x77/0x7e => __do_page_cache_readahead+0x9b/0x177 => ra_submit+0x21/0x25 => ondemand_readahead+0x1c9/0x1d8 => page_cache_async_readahead+0x7b/0xa3 => generic_file_aio_read+0x2bd/0x5e0 159 instances order=2 normal gfp_flags=GFP_NOWARN|GFP_NORETRY|GFP_COMP|GFP_NOMEMALLOC| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc+0x77/0x105 => mempool_alloc_slab+0x15/0x17 => mempool_alloc+0x68/0x116 446 instances order=1 normal gfp_flags=GFP_IO|GFP_NOWARN|GFP_NORETRY|GFP_COMP| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc+0x77/0x105 => get_empty_filp+0x7a/0x141 => do_filp_open+0xe7/0x60a 1 instances order=3 normal gfp_flags=GFP_IO|GFP_NOWARN|GFP_NORETRY|GFP_COMP| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc+0x77/0x105 => arch_dup_task_struct+0x42/0x8b => copy_process+0xf9/0x10c5 1 instances order=3 normal gfp_flags=GFP_IO|GFP_NOWARN|GFP_NORETRY|GFP_COMP| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => __kmalloc_node_track_caller+0xcf/0x131 => __alloc_skb+0x75/0x133 => sk_stream_alloc_skb+0x38/0xd3 1 instances order=1 atomic gfp_flags=GFP_ATOMIC|GFP_NOWARN|GFP_NORETRY|GFP_COMP|GFP_NOMEMALLOC| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => __page_cache_alloc+0x77/0x7e => grab_cache_page_write_begin+0x54/0x9e => ext4_da_write_begin+0x13f/0x20e => generic_file_buffered_write+0x109/0x23a => __generic_file_aio_write+0x242/0x272 => generic_file_aio_write+0x58/0xa6 25 instances order=1 normal gfp_flags=GFP_IO|GFP_NOWARN|GFP_NORETRY|GFP_COMP| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc+0x77/0x105 => get_empty_filp+0x7a/0x141 => alloc_file+0x1e/0xbf 115 instances order=1 normal gfp_flags=GFP_NOWARN|GFP_NORETRY|GFP_COMP|GFP_NOMEMALLOC| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc+0x77/0x105 => bvec_alloc_bs+0xae/0xcc => bio_alloc_bioset+0x75/0xc3 56 instances order=1 normal gfp_flags=GFP_IO|GFP_NOWARN|GFP_NORETRY|GFP_COMP|GFP_RECLAIMABLE| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc+0x77/0x105 => d_alloc+0x26/0x18d => d_alloc_and_lookup+0x2c/0x6b 1 instances order=1 normal gfp_flags=GFP_NOWARN|GFP_NORETRY|GFP_COMP|GFP_NOMEMALLOC| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc+0x77/0x105 => alloc_buffer_head+0x21/0x49 => alloc_page_buffers+0x32/0xce 9 instances order=9 normal gfp_flags=GFP_HIGHUSER_MOVABLE|GFP_NOWARN|GFP_NORETRY|GFP_COMP|GFP_NOMEMALLOC| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_vma+0xf5/0xfa => khugepaged+0x543/0xf2d => kthread+0x84/0x8c => kernel_thread_helper+0x4/0x10 347 instances order=3 normal gfp_flags=GFP_IO|GFP_NOWARN|GFP_NORETRY|GFP_COMP|GFP_RECLAIMABLE| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc+0x77/0x105 => ext4_alloc_inode+0x1a/0x111 => alloc_inode+0x1d/0x78 56 instances order=1 normal gfp_flags=GFP_NOWARN|GFP_NORETRY|GFP_COMP|GFP_NOMEMALLOC| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => __page_cache_alloc+0x77/0x7e => grab_cache_page_write_begin+0x54/0x9e => ext4_da_write_begin+0x13f/0x20e => generic_file_buffered_write+0x109/0x23a => __generic_file_aio_write+0x242/0x272 => generic_file_aio_write+0x58/0xa6 60 instances order=1 normal gfp_flags=GFP_IO|GFP_NOWARN|GFP_NORETRY|GFP_COMP| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc+0x77/0x105 => dup_mm+0x1f8/0x486 => copy_process+0x917/0x10c5 1 instances order=1 normal gfp_flags=GFP_IO|GFP_NOWARN|GFP_NORETRY|GFP_COMP| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc+0x77/0x105 => bprm_mm_init+0x70/0x1a0 => do_execve+0xd6/0x277 6 instances order=9 normal gfp_flags=GFP_HIGHUSER_MOVABLE|GFP_NOWARN|GFP_NORETRY|GFP_COMP|GFP_NOMEMALLOC| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_vma+0xf5/0xfa => do_huge_pmd_anonymous_page+0xbf/0x261 => handle_mm_fault+0x113/0x1ce => do_page_fault+0x358/0x37a => page_fault+0x25/0x30 6 instances order=3 normal gfp_flags=GFP_IO|GFP_NOWARN|GFP_REPEAT|GFP_NORETRY|GFP_COMP| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => __kmalloc_node_track_caller+0xcf/0x131 => __alloc_skb+0x75/0x133 => sock_alloc_send_pskb+0xb4/0x2d7 2 instances order=1 normal gfp_flags=GFP_IO|GFP_NOWARN|GFP_NORETRY|GFP_COMP| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc+0x77/0x105 => do_brk+0x1cd/0x293 => load_elf_binary+0xd2d/0x175f 4 instances order=1 normal gfp_flags=GFP_KERNEL => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => __get_free_pages+0xe/0x4a => copy_process+0xe1/0x10c5 => do_fork+0x104/0x286 => kernel_thread+0x75/0x77 => kthreadd+0xe7/0x124 => kernel_thread_helper+0x4/0x10 4 instances order=1 normal gfp_flags=GFP_IO|GFP_NOWARN|GFP_REPEAT|GFP_NORETRY|GFP_COMP| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc_node+0x93/0x12d => __alloc_skb+0x40/0x133 => sock_alloc_send_pskb+0xb4/0x2d7 534 instances order=2 normal gfp_flags=GFP_KERNEL|GFP_REPEAT|GFP_COMP => __alloc_pages_nodemask+0x754/0x792 => kmalloc_large_node+0x56/0x95 => __kmalloc_node_track_caller+0x31/0x131 => __alloc_skb+0x75/0x133 => sock_alloc_send_pskb+0xb4/0x2d7 => sock_alloc_send_skb+0x15/0x17 => unix_stream_sendmsg+0x11e/0x2ec => __sock_sendmsg+0x69/0x76 1 instances order=2 normal gfp_flags=GFP_KERNEL|GFP_COMP|GFP_ZERO => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => __get_free_pages+0xe/0x4a => kmalloc_order_trace+0x2c/0x5e => __kmalloc+0x37/0x10d => kzalloc.constprop.19+0xe/0x10 => tracing_open_pipe+0x40/0x147 => __dentry_open+0x161/0x283 1 instances order=1 normal gfp_flags=GFP_NOWARN|GFP_NORETRY|GFP_COMP|GFP_NOMEMALLOC| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => __page_cache_alloc+0x77/0x7e => __do_page_cache_readahead+0x9b/0x177 => ra_submit+0x21/0x25 => filemap_fault+0x17b/0x36c => __do_fault+0x55/0x377 => handle_pte_fault+0x2a7/0x7a5 55 instances order=1 atomic gfp_flags=GFP_ATOMIC|GFP_NOWARN|GFP_NORETRY|GFP_COMP|GFP_NOMEMALLOC| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc+0x77/0x105 => mempool_alloc_slab+0x15/0x17 => mempool_alloc+0x68/0x116 8 instances order=3 normal gfp_flags=GFP_IO|GFP_NOWARN|GFP_NORETRY|GFP_COMP| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc+0x77/0x105 => shmem_alloc_inode+0x1a/0x2f => alloc_inode+0x1d/0x78 563 instances order=3 atomic gfp_flags=GFP_ATOMIC|GFP_NOWARN|GFP_NORETRY|GFP_COMP|GFP_NOMEMALLOC| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc+0x77/0x105 => mempool_alloc_slab+0x15/0x17 => mempool_alloc+0x68/0x116 12 instances order=1 normal gfp_flags=GFP_IO|GFP_NOWARN|GFP_NORETRY|GFP_COMP| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc+0x77/0x105 => __split_vma+0x6c/0x21b => split_vma+0x20/0x22 5 instances order=2 normal gfp_flags=GFP_IO|GFP_NOWARN|GFP_REPEAT|GFP_NORETRY|GFP_COMP| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => __kmalloc_node_track_caller+0xcf/0x131 => __alloc_skb+0x75/0x133 => sock_alloc_send_pskb+0xb4/0x2d7 1 instances order=1 normal gfp_flags=GFP_NOWARN|GFP_NORETRY|GFP_COMP|GFP_NOMEMALLOC| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => __get_free_pages+0xe/0x4a => __pollwait+0x5e/0xcc => sock_poll_wait+0x18/0x1d => unix_poll+0x1c/0x9a => sock_poll+0x1a/0x1c => do_select+0x2fb/0x4f5 145216 instances order=1 normal gfp_flags=GFP_NOWARN|GFP_NORETRY|GFP_COMP|GFP_NOMEMALLOC| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc+0x77/0x105 => mempool_alloc_slab+0x15/0x17 => mempool_alloc+0x68/0x116 48 instances order=2 normal gfp_flags=GFP_IO|GFP_NOWARN|GFP_NORETRY|GFP_COMP|GFP_RECLAIMABLE| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc+0x77/0x105 => proc_alloc_inode+0x20/0x91 => alloc_inode+0x1d/0x78 1 instances order=3 normal gfp_flags=GFP_IO|GFP_NOWARN|GFP_NORETRY|GFP_COMP| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc+0x77/0x105 => copy_process+0xc6/0x10c5 => do_fork+0x104/0x286 31 instances order=1 normal gfp_flags=GFP_IO|GFP_NOWARN|GFP_NORETRY|GFP_COMP| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => kmem_cache_alloc+0x77/0x105 => prepare_creds+0x26/0xae => sys_faccessat+0x37/0x162 1 instances order=3 atomic gfp_flags=GFP_ATOMIC|GFP_NOWARN|GFP_NORETRY|GFP_COMP| => __alloc_pages_nodemask+0x754/0x792 => alloc_pages_current+0xbe/0xd8 => alloc_slab_page+0x1c/0x4d => new_slab+0x50/0x199 => __slab_alloc+0x24a/0x328 => __kmalloc_node_track_caller+0xcf/0x131 => __alloc_skb+0x75/0x133 => __netdev_alloc_skb+0x1f/0x3b High-order normal allocations: 147471 High-order atomic allocations: 720 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/