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=-7.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED autolearn=ham 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 57FA2C43381 for ; Wed, 27 Mar 2019 07:01:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 278F2206DF for ; Wed, 27 Mar 2019 07:01:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SOskQS5t" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 278F2206DF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:In-Reply-To:MIME-Version:Date:From: References:To:Subject:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=LIMcjoL0ASu9AomG5nLXlO/pkUb8OReHlRJr3UYbRoo=; b=SOskQS5t+zjIVGhj28ql7Q5kQ X9gouZoVl6Ta6Kc8LGa2v07k3UoEbUBdMYt+nNz04ibVwYtXG9s4P21H3R091hjkduWms+RcyUIQb mxepUMUBc6MpJ86xSM87yc/TbQ6RfpoBceSo1ohXkxI35+sMnPDJAqvWtfcG25OhaaEVqC58Wg0vm Onyed/wMsjNToRkJCiY8col+rQ2OBd7EtmXj6FWqLAXVe8+3ht5GaPX7Uovpja4bUuk3pwldh7yn8 b5SvPARrXeSTeADUQNy2mY2jqhvqw4L4CpbM4ip56U0WNmRab1t3Uo6auwZYUNeFvrQ8N1DjKTIda VrLjFeYOQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h92ZG-0000X8-Gw; Wed, 27 Mar 2019 07:01:46 +0000 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5] helo=mx0a-001b2d01.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h92ZA-0000W9-5f for linux-arm-kernel@lists.infradead.org; Wed, 27 Mar 2019 07:01:42 +0000 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2R70Fmo007007 for ; Wed, 27 Mar 2019 03:01:34 -0400 Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.153]) by mx0a-001b2d01.pphosted.com with ESMTP id 2rg2pnbsg3-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 27 Mar 2019 03:01:34 -0400 Received: from localhost by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 27 Mar 2019 07:01:33 -0000 Received: from b03cxnp07028.gho.boulder.ibm.com (9.17.130.15) by e35.co.us.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 27 Mar 2019 07:01:26 -0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x2R71NFe23986222 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 27 Mar 2019 07:01:24 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D880DC605B; Wed, 27 Mar 2019 07:01:23 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 188B1C6063; Wed, 27 Mar 2019 07:01:12 +0000 (GMT) Received: from [9.102.0.57] (unknown [9.102.0.57]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 27 Mar 2019 07:01:11 +0000 (GMT) Subject: Re: [PATCH v8 4/4] hugetlb: allow to free gigantic pages regardless of the configuration To: Alexandre Ghiti , mpe@ellerman.id.au, Andrew Morton , Vlastimil Babka , Catalin Marinas , Will Deacon , Benjamin Herrenschmidt , Paul Mackerras , Martin Schwidefsky , Heiko Carstens , Yoshinori Sato , Rich Felker , "David S . Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , x86@kernel.org, Dave Hansen , Andy Lutomirski , Peter Zijlstra , Mike Kravetz , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-mm@kvack.org References: <20190327063626.18421-1-alex@ghiti.fr> <20190327063626.18421-5-alex@ghiti.fr> From: "Aneesh Kumar K.V" Date: Wed, 27 Mar 2019 12:31:10 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.0 MIME-Version: 1.0 In-Reply-To: <20190327063626.18421-5-alex@ghiti.fr> Content-Language: en-US X-TM-AS-GCONF: 00 x-cbid: 19032707-0012-0000-0000-0000171DBC1B X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010822; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000282; SDB=6.01180287; UDB=6.00617666; IPR=6.00961004; MB=3.00026175; MTD=3.00000008; XFM=3.00000015; UTC=2019-03-27 07:01:32 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19032707-0013-0000-0000-000056A767C6 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-27_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903270049 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190327_000140_327784_13A09CE5 X-CRM114-Status: GOOD ( 27.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 3/27/19 12:06 PM, Alexandre Ghiti wrote: > On systems without CONTIG_ALLOC activated but that support gigantic pages, > boottime reserved gigantic pages can not be freed at all. This patch > simply enables the possibility to hand back those pages to memory > allocator. > > Signed-off-by: Alexandre Ghiti > Acked-by: David S. Miller [sparc] > > diff --git a/arch/powerpc/include/asm/book3s/64/hugetlb.h b/arch/powerpc/include/asm/book3s/64/hugetlb.h > index ec2a55a553c7..7013284f0f1b 100644 > --- a/arch/powerpc/include/asm/book3s/64/hugetlb.h > +++ b/arch/powerpc/include/asm/book3s/64/hugetlb.h > @@ -36,8 +36,8 @@ static inline int hstate_get_psize(struct hstate *hstate) > } > } > > -#ifdef CONFIG_ARCH_HAS_GIGANTIC_PAGE > -static inline bool gigantic_page_supported(void) > +#define __HAVE_ARCH_GIGANTIC_PAGE_RUNTIME_SUPPORTED > +static inline bool gigantic_page_runtime_supported(void) > { > /* > * We used gigantic page reservation with hypervisor assist in some case. > @@ -49,7 +49,6 @@ static inline bool gigantic_page_supported(void) > > return true; > } > -#endif > > /* hugepd entry valid bit */ > #define HUGEPD_VAL_BITS (0x8000000000000000UL) Is that correct when CONTIG_ALLOC is not enabled? I guess we want gigantic_page_runtime_supported to return false when CONTIG_ALLOC is not enabled on all architectures and on POWER when it is enabled we want it to be conditional as it is now. -aneesh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel