From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754757AbcBBXR3 (ORCPT ); Tue, 2 Feb 2016 18:17:29 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:17421 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750817AbcBBXR2 (ORCPT ); Tue, 2 Feb 2016 18:17:28 -0500 Subject: Re: [PATCH] mm/hugetlb: fix gigantic page initialization/allocation To: David Rientjes References: <1454452420-25007-1-git-send-email-mike.kravetz@oracle.com> From: Mike Kravetz Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, "Kirill A. Shutemov" , "Aneesh Kumar K.V" , Jerome Marchand , Naoya Horiguchi , Andrew Morton , Michal Hocko Message-ID: <56B138F6.70704@oracle.com> Date: Tue, 2 Feb 2016 15:17:10 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/02/2016 02:59 PM, David Rientjes wrote: > On Tue, 2 Feb 2016, Mike Kravetz wrote: > >> Attempting to preallocate 1G gigantic huge pages at boot time with >> "hugepagesz=1G hugepages=1" on the kernel command line will prevent >> booting with the following: >> >> kernel BUG at mm/hugetlb.c:1218! >> >> When mapcount accounting was reworked, the setting of compound_mapcount_ptr >> in prep_compound_gigantic_page was overlooked. As a result, the validation >> of mapcount in free_huge_page fails. >> >> The "BUG_ON" checks in free_huge_page were also changed to "VM_BUG_ON_PAGE" >> to assist with debugging. >> >> Fixes: af5642a8af ("mm: rework mapcount accounting to enable 4k mapping of THPs") >> Suggested-by: Naoya Horiguchi >> Signed-off-by: Mike Kravetz > > I'm not sure whether this should have a "From: Naoya Horiguchi" line with > an accompanying sign-off or not, since Naoya debugged and wrote the actual > fix to prep_compound_gigantic_page(). I agree. Naoya did debug and provide fix via e-mail exchange. He did not sign-off and I could not tell if he was going to pursue. My only intention was to fix ASAP. More than happy to give Naoya credit. -- Mike Kravetz > > Acked-by: David Rientjes >