From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755314Ab2JaH0k (ORCPT ); Wed, 31 Oct 2012 03:26:40 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:63329 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932294Ab2JaH0g (ORCPT ); Wed, 31 Oct 2012 03:26:36 -0400 Date: Wed, 31 Oct 2012 00:26:30 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Johannes Weiner cc: Zhouping Liu , Peter Zijlstra , Rik van Riel , Andrea Arcangeli , Mel Gorman , Thomas Gleixner , Linus Torvalds , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Ingo Molnar , CAI Qian Subject: Re: [PATCH 00/31] numa/core patches In-Reply-To: <20121031004838.GA1657@cmpxchg.org> Message-ID: References: <20121025121617.617683848@chello.nl> <508A52E1.8020203@redhat.com> <1351242480.12171.48.camel@twins> <20121028175615.GC29827@cmpxchg.org> <508F73C5.7050409@redhat.com> <20121031004838.GA1657@cmpxchg.org> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 30 Oct 2012, Johannes Weiner wrote: > On Tue, Oct 30, 2012 at 02:29:25PM +0800, Zhouping Liu wrote: > > On 10/29/2012 01:56 AM, Johannes Weiner wrote: > > >On Fri, Oct 26, 2012 at 11:08:00AM +0200, Peter Zijlstra wrote: > > >>On Fri, 2012-10-26 at 17:07 +0800, Zhouping Liu wrote: > > >>>[ 180.918591] RIP: 0010:[] [] mem_cgroup_prepare_migration+0xba/0xd0 > > >>>[ 182.681450] [] do_huge_pmd_numa_page+0x180/0x500 > > >>>[ 182.775090] [] handle_mm_fault+0x1e9/0x360 > > >>>[ 182.863038] [] __do_page_fault+0x172/0x4e0 > > >>>[ 182.950574] [] ? __switch_to_xtra+0x163/0x1a0 > > >>>[ 183.041512] [] ? __switch_to+0x3ce/0x4a0 > > >>>[ 183.126832] [] ? __schedule+0x3c6/0x7a0 > > >>>[ 183.211216] [] do_page_fault+0xe/0x10 > > >>>[ 183.293705] [] page_fault+0x28/0x30 > > >>Johannes, this looks like the thp migration memcg hookery gone bad, > > >>could you have a look at this? > > >Oops. Here is an incremental fix, feel free to fold it into #31. > > Hello Johannes, > > > > maybe I don't think the below patch completely fix this issue, as I > > found a new error(maybe similar with this): > > > > [88099.923724] ------------[ cut here ]------------ > > [88099.924036] kernel BUG at mm/memcontrol.c:1134! > > [88099.924036] invalid opcode: 0000 [#1] SMP > > [88099.924036] Modules linked in: lockd sunrpc kvm_amd kvm > > amd64_edac_mod edac_core ses enclosure serio_raw bnx2 pcspkr shpchp > > joydev i2c_piix4 edac_mce_amd k8temp dcdbas ata_generic pata_acpi > > megaraid_sas pata_serverworks usb_storage radeon i2c_algo_bit > > drm_kms_helper ttm drm i2c_core > > [88099.924036] CPU 7 > > [88099.924036] Pid: 3441, comm: stress Not tainted 3.7.0-rc2Jons+ #3 > > Dell Inc. PowerEdge 6950/0WN213 > > [88099.924036] RIP: 0010:[] [] > > mem_cgroup_update_lru_size+0x27/0x30 > > Thanks a lot for your testing efforts, I really appreciate it. > > I'm looking into it, but I don't expect power to get back for several > days where I live, so it's hard to reproduce it locally. > > But that looks like an LRU accounting imbalance that I wasn't able to > tie to this patch yet. Do you see weird numbers for the lru counters > in /proc/vmstat even without this memory cgroup patch? Ccing Hugh as > well. Sorry, I didn't get very far with it tonight. Almost certain to be a page which was added to lru while it looked like a 4k page, but taken off lru as a 2M page: we are taking a 2M page off lru here, it's likely to be the page in question, but not necessarily. There's quite a few put_page()s in do_huge_pmd_numa_page(), and it would help if we could focus on the one which is giving the trouble, but I don't know which that is. Zhouping, if you can, please would you do an "objdump -ld vmlinux >bigfile" of your kernel, then extract from bigfile just the lines from ":" to whatever is the next function, and post or mail privately just that disassembly. That should be good to identify which of the put_page()s is involved. do_huge_pmd_numa_page() does look a bit worrying, but I've not pinned the misaccounting seen to the aspects which have worried me so far. Where is a check for page_mapcount(page) being 1? And surely it's unsafe to to be migrating the page when it was found !PageLRU? It's quite likely to be sitting in a pagevec or on a local list somewhere, about to be added to lru at any moment. Hugh From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx144.postini.com [74.125.245.144]) by kanga.kvack.org (Postfix) with SMTP id C1E2E6B006C for ; Wed, 31 Oct 2012 03:26:36 -0400 (EDT) Received: by mail-pa0-f41.google.com with SMTP id fa10so840245pad.14 for ; Wed, 31 Oct 2012 00:26:36 -0700 (PDT) Date: Wed, 31 Oct 2012 00:26:30 -0700 (PDT) From: Hugh Dickins Subject: Re: [PATCH 00/31] numa/core patches In-Reply-To: <20121031004838.GA1657@cmpxchg.org> Message-ID: References: <20121025121617.617683848@chello.nl> <508A52E1.8020203@redhat.com> <1351242480.12171.48.camel@twins> <20121028175615.GC29827@cmpxchg.org> <508F73C5.7050409@redhat.com> <20121031004838.GA1657@cmpxchg.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Johannes Weiner Cc: Zhouping Liu , Peter Zijlstra , Rik van Riel , Andrea Arcangeli , Mel Gorman , Thomas Gleixner , Linus Torvalds , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Ingo Molnar , CAI Qian On Tue, 30 Oct 2012, Johannes Weiner wrote: > On Tue, Oct 30, 2012 at 02:29:25PM +0800, Zhouping Liu wrote: > > On 10/29/2012 01:56 AM, Johannes Weiner wrote: > > >On Fri, Oct 26, 2012 at 11:08:00AM +0200, Peter Zijlstra wrote: > > >>On Fri, 2012-10-26 at 17:07 +0800, Zhouping Liu wrote: > > >>>[ 180.918591] RIP: 0010:[] [] mem_cgroup_prepare_migration+0xba/0xd0 > > >>>[ 182.681450] [] do_huge_pmd_numa_page+0x180/0x500 > > >>>[ 182.775090] [] handle_mm_fault+0x1e9/0x360 > > >>>[ 182.863038] [] __do_page_fault+0x172/0x4e0 > > >>>[ 182.950574] [] ? __switch_to_xtra+0x163/0x1a0 > > >>>[ 183.041512] [] ? __switch_to+0x3ce/0x4a0 > > >>>[ 183.126832] [] ? __schedule+0x3c6/0x7a0 > > >>>[ 183.211216] [] do_page_fault+0xe/0x10 > > >>>[ 183.293705] [] page_fault+0x28/0x30 > > >>Johannes, this looks like the thp migration memcg hookery gone bad, > > >>could you have a look at this? > > >Oops. Here is an incremental fix, feel free to fold it into #31. > > Hello Johannes, > > > > maybe I don't think the below patch completely fix this issue, as I > > found a new error(maybe similar with this): > > > > [88099.923724] ------------[ cut here ]------------ > > [88099.924036] kernel BUG at mm/memcontrol.c:1134! > > [88099.924036] invalid opcode: 0000 [#1] SMP > > [88099.924036] Modules linked in: lockd sunrpc kvm_amd kvm > > amd64_edac_mod edac_core ses enclosure serio_raw bnx2 pcspkr shpchp > > joydev i2c_piix4 edac_mce_amd k8temp dcdbas ata_generic pata_acpi > > megaraid_sas pata_serverworks usb_storage radeon i2c_algo_bit > > drm_kms_helper ttm drm i2c_core > > [88099.924036] CPU 7 > > [88099.924036] Pid: 3441, comm: stress Not tainted 3.7.0-rc2Jons+ #3 > > Dell Inc. PowerEdge 6950/0WN213 > > [88099.924036] RIP: 0010:[] [] > > mem_cgroup_update_lru_size+0x27/0x30 > > Thanks a lot for your testing efforts, I really appreciate it. > > I'm looking into it, but I don't expect power to get back for several > days where I live, so it's hard to reproduce it locally. > > But that looks like an LRU accounting imbalance that I wasn't able to > tie to this patch yet. Do you see weird numbers for the lru counters > in /proc/vmstat even without this memory cgroup patch? Ccing Hugh as > well. Sorry, I didn't get very far with it tonight. Almost certain to be a page which was added to lru while it looked like a 4k page, but taken off lru as a 2M page: we are taking a 2M page off lru here, it's likely to be the page in question, but not necessarily. There's quite a few put_page()s in do_huge_pmd_numa_page(), and it would help if we could focus on the one which is giving the trouble, but I don't know which that is. Zhouping, if you can, please would you do an "objdump -ld vmlinux >bigfile" of your kernel, then extract from bigfile just the lines from ":" to whatever is the next function, and post or mail privately just that disassembly. That should be good to identify which of the put_page()s is involved. do_huge_pmd_numa_page() does look a bit worrying, but I've not pinned the misaccounting seen to the aspects which have worried me so far. Where is a check for page_mapcount(page) being 1? And surely it's unsafe to to be migrating the page when it was found !PageLRU? It's quite likely to be sitting in a pagevec or on a local list somewhere, about to be added to lru at any moment. Hugh -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org