From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by kanga.kvack.org (Postfix) with ESMTP id 63AEF6B00DF for ; Wed, 12 Nov 2014 03:19:32 -0500 (EST) Received: by mail-pa0-f52.google.com with SMTP id fa1so12354400pad.25 for ; Wed, 12 Nov 2014 00:19:32 -0800 (PST) Received: from lgemrelse7q.lge.com (LGEMRELSE7Q.lge.com. [156.147.1.151]) by mx.google.com with ESMTP id co2si22040775pbc.241.2014.11.12.00.19.28 for ; Wed, 12 Nov 2014 00:19:31 -0800 (PST) Date: Wed, 12 Nov 2014 17:21:41 +0900 From: Joonsoo Kim Subject: Re: [Bug 87891] New: kernel BUG at mm/slab.c:2625! Message-ID: <20141112082141.GA24364@js1304-P5Q-DELUXE> References: <20141111153120.9131c8e1459415afff8645bc@linux-foundation.org> <20141111164913.3616531c21c91499871c46de@linux-foundation.org> <20141112012241.GA17446@node.dhcp.inet.fi> <20141112021716.GB21951@js1304-P5Q-DELUXE> <20141112023746.GD17446@node.dhcp.inet.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141112023746.GD17446@node.dhcp.inet.fi> Sender: owner-linux-mm@kvack.org List-ID: To: "Kirill A. Shutemov" Cc: Andrew Morton , Christoph Lameter , Ming Lei , Pekka Enberg , David Rientjes , Mel Gorman , Johannes Weiner , Pauli Nieminen , Dave Airlie , Tetsuo Handa , bugzilla-daemon@bugzilla.kernel.org, luke-jr+linuxbugs@utopios.org, dri-devel@lists.freedesktop.org, linux-mm@kvack.org On Wed, Nov 12, 2014 at 04:37:46AM +0200, Kirill A. Shutemov wrote: > On Wed, Nov 12, 2014 at 11:17:16AM +0900, Joonsoo Kim wrote: > > On Wed, Nov 12, 2014 at 03:22:41AM +0200, Kirill A. Shutemov wrote: > > > On Tue, Nov 11, 2014 at 04:49:13PM -0800, Andrew Morton wrote: > > > > On Tue, 11 Nov 2014 18:36:28 -0600 (CST) Christoph Lameter wrote: > > > > > > > > > On Tue, 11 Nov 2014, Andrew Morton wrote: > > > > > > > > > > > There's no point in doing > > > > > > > > > > > > #define GFP_SLAB_BUG_MASK (__GFP_DMA32|__GFP_HIGHMEM|~__GFP_BITS_MASK) > > > > > > > > > > > > because __GFP_DMA32|__GFP_HIGHMEM are already part of ~__GFP_BITS_MASK. > > > > > > > > > > ?? ~__GFP_BITS_MASK means bits 25 to 31 are set. > > > > > > > > > > __GFP_DMA32 is bit 2 and __GFP_HIGHMEM is bit 1. > > > > > > > > Ah, yes, OK. > > > > > > > > I suppose it's possible that __GFP_HIGHMEM was set. > > > > > > > > do_huge_pmd_anonymous_page > > > > ->pte_alloc_one > > > > ->alloc_pages(__userpte_alloc_gfp==__GFP_HIGHMEM) > > > > > > do_huge_pmd_anonymous_page > > > alloc_hugepage_vma > > > alloc_pages_vma(GFP_TRANSHUGE) > > > > > > GFP_TRANSHUGE contains GFP_HIGHUSER_MOVABLE, which has __GFP_HIGHMEM. > > > > Hello, Kirill. > > > > BTW, why does GFP_TRANSHUGE have MOVABLE flag despite it isn't > > movable? After breaking hugepage, it could be movable, but, it may > > prevent CMA from working correctly until break. > > Again, the same alloc vs. free gfp_mask: we want page allocator to move > pages around to find space from THP, but resulting page is no really > movable. Hmm... AFAIK, without MOVABLE flag page allocator will try to move pages to find space for THP page. Am I missing something? > > I've tried to look into making THP movable: it requires quite a bit of > infrastructure changes around rmap: try_to_unmap*(), remove_migration_pmd(), > migration entries for PMDs, etc. I gets ugly pretty fast :-/ > I probably need to give it second try. No promises. Good to hear. :) I think that we can go another way that breaks the hugepage. This operation makes it movable and CMA would be succeed. Thanks. -- 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