Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp64003ima; Thu, 14 Mar 2019 20:00:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqycpofcCPdcGX11TH7UfO7qM1BVbE6leIG5Q8MaieikTvCD8r3HibHdvWo4czsMKl1YC0Re X-Received: by 2002:a17:902:8609:: with SMTP id f9mr1715191plo.85.1552618802878; Thu, 14 Mar 2019 20:00:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552618802; cv=none; d=google.com; s=arc-20160816; b=U8gMsYzkapgJ23f3Q8ALiEFUq/MHuSMaNRfIxIQtw5Lo7Vv5CDQ6g4aznrsu5IWHeb zH90AT/tt3x3Pfz+1tj+QhA11mX4rImzf3yWdl55S9DyxcM7bzu+Afd2dGEJEGl46PTD b6hJB3QqRIKWiyX1nieyFV5KWxNwcq5Xcvb4RXGmVfInezwsAhXJ3HrfmDH54BBaC8P4 5fOAput1wnZhsAqFDR+sJGo56qujFbuwoTOW7XsHePvQjVa16cymoQKkR1O4BOZo6EBK O6pFOcDQesYTSzbuq4hZT+30fxNsm4/6j2CJ0FZfmfNVsOKqfcSPTguYmOlG35sw009E 54hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date:from :references:to:subject; bh=MVyI1nzjyZLc2etSwJmdxENyFL0872dP1+6QIuperfI=; b=fsSusqfmS6zb97uiIt/o91Be+JLdv+pizIyPuPbJqfIfzh4Z/2Aqe3FlPefPwczdOc s+dE68Xzv47ivCqdj6TEcONNhPeteraw47cKWIkSp14ST3ZJ25EjFWlv3tgKs7aZuj9o 9cPzeMAueqml+PvSvbWfu/ZF4+WueU/8EYDc/yOysGntanqa6UUKZ1dgpYoPHjMQFcmu ey6nnueCh45PGq76eo0C5T4JYd5/jOp8PUYD3OYIbf2P1ENErbMAe2q43JIqtVh3mCPM ozhPtLSY9S/lC51vQFLGVfAABz5iVB5+kWVPgKP5pnSncI+QG3rYoaEyW51oMlvl7ff1 RQVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d23si826469pfm.181.2019.03.14.19.59.47; Thu, 14 Mar 2019 20:00:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727805AbfCOC56 (ORCPT + 99 others); Thu, 14 Mar 2019 22:57:58 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:37614 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727380AbfCOC55 (ORCPT ); Thu, 14 Mar 2019 22:57:57 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2F2sR2x108847 for ; Thu, 14 Mar 2019 22:57:56 -0400 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0a-001b2d01.pphosted.com with ESMTP id 2r80xay157-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 14 Mar 2019 22:57:56 -0400 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 15 Mar 2019 02:57:55 -0000 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 15 Mar 2019 02:57:48 -0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x2F2vkTu24313968 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Mar 2019 02:57:46 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E663AAE060; Fri, 15 Mar 2019 02:57:45 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 019C2AE05C; Fri, 15 Mar 2019 02:57:36 +0000 (GMT) Received: from [9.85.75.142] (unknown [9.85.75.142]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Fri, 15 Mar 2019 02:57:36 +0000 (GMT) Subject: Re: [PATCH v6 4/4] hugetlb: allow to free gigantic pages regardless of the configuration To: Alexandre Ghiti , Andrew Morton , Vlastimil Babka , Catalin Marinas , Will Deacon , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , 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: <20190307132015.26970-1-alex@ghiti.fr> <20190307132015.26970-5-alex@ghiti.fr> <87va0movdh.fsf@linux.ibm.com> <972208b7-5c05-cc05-efbf-0d48bff4cf77@linux.ibm.com> From: "Aneesh Kumar K.V" Date: Fri, 15 Mar 2019 08:27:35 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 19031502-0040-0000-0000-000004D269EF X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010760; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000281; SDB=6.01174508; UDB=6.00606765; IPR=6.00955172; MB=3.00025982; MTD=3.00000008; XFM=3.00000015; UTC=2019-03-15 02:57:54 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19031502-0041-0000-0000-000008DD80A3 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-03-15_02:,, 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-1903150020 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/14/19 7:22 PM, Alexandre Ghiti wrote: > > > On 03/14/2019 02:17 PM, Aneesh Kumar K.V wrote: >> On 3/14/19 5:13 PM, Alexandre Ghiti wrote: >>> On 03/14/2019 06:52 AM, Aneesh Kumar K.V wrote: >>>> Alexandre Ghiti writes: >>>> >> >>> Thanks for noticing Aneesh. >>> >>> I can't find a better solution than bringing back >>> gigantic_page_supported check, >>> since it is must be done at runtime in your case. >>> I'm not sure of one thing though: you say that freeing boottime >>> gigantic pages >>> is not needed, but is it forbidden ? Just to know where the check and >>> what its >>> new name should be. > > You did not answer this question: is freeing boottime gigantic pages > "forbidden" or just > not needed ? IMHO if we don't allow runtime allocation of gigantic hugepage, we should not allow runtime free of gigantic hugepage. Now w.r.t ppc64, hypervisor pass hints about the gignatic hugepages via device tree nodes. Early in boot we mark these pages as reserved and during hugetlb init we use these reserved pages for backing hugetlb fs. Now "forbidden" is not the exact reason. We don't have code to put it back in the reserved list. Hence I would say "not supported". -aneesh