From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08A62C433E0 for ; Wed, 24 Feb 2021 20:09:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BA54B64E20 for ; Wed, 24 Feb 2021 20:09:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233143AbhBXUJS (ORCPT ); Wed, 24 Feb 2021 15:09:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:60490 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235287AbhBXUIj (ORCPT ); Wed, 24 Feb 2021 15:08:39 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 011B964E6C; Wed, 24 Feb 2021 20:07:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1614197279; bh=layVAKYQgKq7CaKR9E20ubXvjiBD05MV/IWqpgzrmn4=; h=Date:From:To:Subject:In-Reply-To:From; b=ksFkAFkWPYdesOKuwBmM8TuRbZi25rlW5s5aqPpL6wBVT/8ZXr5+2sVCatUlpkTno 2U8V1MfbUSBjr+lKmXhwyRH5F/hhf/y3jNcOaVsIhHMfdYvM6myAkgavg5jtP8L7Tt 0FTr03BEz1o5TFfLpRha5gy5dPfyVwzbMr+zOuA0= Date: Wed, 24 Feb 2021 12:07:58 -0800 From: Andrew Morton To: akpm@linux-foundation.org, chenwandun@huawei.com, guro@fb.com, linux-mm@kvack.org, mike.kravetz@oracle.com, mm-commits@vger.kernel.org, torvalds@linux-foundation.org Subject: [patch 132/173] mm/hugetlb: suppress wrong warning info when alloc gigantic page Message-ID: <20210224200758.zTVwhq0yN%akpm@linux-foundation.org> In-Reply-To: <20210224115824.1e289a6895087f10c41dd8d6@linux-foundation.org> User-Agent: s-nail v14.8.16 Precedence: bulk Reply-To: linux-kernel@vger.kernel.org List-ID: X-Mailing-List: mm-commits@vger.kernel.org From: Chen Wandun Subject: mm/hugetlb: suppress wrong warning info when alloc gigantic page If hugetlb_cma is enabled, it will skip boot time allocation when allocating gigantic page, that doesn't means allocation failure, so suppress this warning info. Link: https://lkml.kernel.org/r/20210219123909.13130-1-chenwandun@huawei.com Fixes: cf11e85fc08c ("mm: hugetlb: optionally allocate gigantic hugepages using cma") Signed-off-by: Chen Wandun Reviewed-by: Mike Kravetz Cc: Roman Gushchin Signed-off-by: Andrew Morton --- mm/hugetlb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/mm/hugetlb.c~mm-hugetlb-suppress-wrong-warning-info-when-alloc-gigantic-page +++ a/mm/hugetlb.c @@ -2529,7 +2529,7 @@ static void __init hugetlb_hstate_alloc_ if (hstate_is_gigantic(h)) { if (hugetlb_cma_size) { pr_warn_once("HugeTLB: hugetlb_cma is enabled, skip boot time allocation\n"); - break; + goto free; } if (!alloc_bootmem_huge_page(h)) break; @@ -2547,7 +2547,7 @@ static void __init hugetlb_hstate_alloc_ h->max_huge_pages, buf, i); h->max_huge_pages = i; } - +free: kfree(node_alloc_noretry); } _