Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2912167iog; Mon, 27 Jun 2022 05:37:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sRTW8uQiwN1sfE5KgQzf1dFIQi70H1l7MkeXOB7ZekGEygaRqBoFg21sOwWSCmewPj/dKI X-Received: by 2002:a17:906:77c8:b0:722:e753:fbbe with SMTP id m8-20020a17090677c800b00722e753fbbemr12093545ejn.692.1656333440721; Mon, 27 Jun 2022 05:37:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1656333440; cv=pass; d=google.com; s=arc-20160816; b=AVM9t161qI/s3qe/uvzsGQdkmVeXAWSzzrFucWicFDr3jra10okme7Zrr3AtcSaSpa jwC4glG4VXLOaQxq9HJAP9netzGFtwvCAWI5g7v9uL3b2Fj1uMzYLZAqR2zTG+1L/Mza Ghk3opYCXXX3oQF2SmGbwgNwPDA4RuVmd64BKoRbmlz/aAmZ86wo8xr/gp049JdbnKtj xq0hAQbxmv6bNdc5zghKfCPUezX6qrqHOy9V+ke60S+R0gD4zYjMHTMlOJTaqla1+86T ANfXa52tDQn++lORot29CBgWEn2ggqM7Os8kPaIu3k/oyMvne281kn6vscAk36yhXqM+ oBDA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:subject:user-agent:date :message-id:dkim-signature; bh=1wTA08R/aTgwRoDtCuQTh+RR0xzOjULSok72bblOOps=; b=vko0tE0qwfipVwZLVdRZ+rrT8LzjO71e42usweclGfkAC+07hwK0q1flu/K+eSKSSk 2G8yLuKwNN7yUke7mlWblFjUEu7HPbBpG8s15VoUkegm7MG9BfRFo+ugl1vdZUp1RRDO IfjeZ2qkAhDgH5p4lyrPF+89cbQE0cg4LNsnZCPG8fxGSkqNKjqrDArpock7KxZWx7FQ 4CSMoff65jJuXoqiAVb2TkKJkGIv5xusBcPH9J3qwfK268um7xU7cgVbKpV3xkqQLxXe Ms9pvLQd8vmfOcJucdvHTjCVo0UOyEF2zQAHl70heSxNHFeLSZmFQopSXb/88eCxwK4j zoBg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nutanix.com header.s=proofpoint20171006 header.b=jwg+vLJv; arc=pass (i=1 spf=pass spfdomain=nutanix.com dkim=pass dkdomain=nutanix.com dmarc=pass fromdomain=nutanix.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nutanix.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rl24-20020a170907217800b0072622d1441asi10064119ejb.729.2022.06.27.05.36.55; Mon, 27 Jun 2022 05:37:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nutanix.com header.s=proofpoint20171006 header.b=jwg+vLJv; arc=pass (i=1 spf=pass spfdomain=nutanix.com dkim=pass dkdomain=nutanix.com dmarc=pass fromdomain=nutanix.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nutanix.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235770AbiF0M3Q (ORCPT + 99 others); Mon, 27 Jun 2022 08:29:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235630AbiF0M3N (ORCPT ); Mon, 27 Jun 2022 08:29:13 -0400 Received: from mx0b-002c1b01.pphosted.com (mx0b-002c1b01.pphosted.com [148.163.155.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C007F766F for ; Mon, 27 Jun 2022 05:29:11 -0700 (PDT) Received: from pps.filterd (m0127842.ppops.net [127.0.0.1]) by mx0b-002c1b01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25R9k2gk019836; Mon, 27 Jun 2022 05:29:06 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=proofpoint20171006; bh=1wTA08R/aTgwRoDtCuQTh+RR0xzOjULSok72bblOOps=; b=jwg+vLJv1TaptW3stLryVI0aNRBgEgGu+7JIMvbtR9Kidwy83qSAzzXfaTMWcqGqhaOm ExTRNUyPfrNyRfjKeCHlJYDngBG2mb9LoS6v+rUjajwfhZA3DVEcQmbAhNl8w8cXws64 RpdQmIp/FS8d6B5CvFezrl6KCiNxUEJIlKB46h4pEFMdsdLy1/m4Eos/uM72LewpBWW4 KKvzfQn1r+Xz72qPjs8iVMk+myPqAedg0DZ0zRTtKwJXcvUzvDiz2APQTGG/f0xFwzQk h8By6z+iLlRWuERJisKsAiKv+lwJl0zcQMnFLDZ/GRAAZkaEfXTVmeGPaD1onGnJuvPA Xg== Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2169.outbound.protection.outlook.com [104.47.55.169]) by mx0b-002c1b01.pphosted.com (PPS) with ESMTPS id 3gx1pfkf7h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 27 Jun 2022 05:29:06 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kQj7T1MruAnFBZc4afP5zGc0pdyBIB2x2UgN53k3wI38jatSiLJwn4S4cbkhSuJi6rpn6l66X1UIJm0iqoj8qWAlXIjZkwGSrplvR+GyhgiwvRbUmABVIMIM3nV7XUo/OKQNwTvw14jo/0/0nTkHCqrV+lKMzdBfe9YQndMHsm6hL7bMKSM3QY9xoGnr/bWzDMNQBc6/YtTFev8lT6X8oeuTyDAhmCWFlbJy82gG8YUbEzYOtABzbJOlrMGmPKWqdksTZ8HrFOmGMRhVN8XcNj6+gKLtFlIgIj1zFhtFGuSRrvIGtiqXbtP2MC5ExtxJpp7ry4dhC3m8edvljrKUWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1wTA08R/aTgwRoDtCuQTh+RR0xzOjULSok72bblOOps=; b=BfYbX1B8jhiO3FrToFQBVX4rFG+XlL9GjL4m3XPdQ0llcMvOdXAL5899Ez4jUZG13Jbl0jHQFzupJYGTv+OSn2qJhujvbG3AFRwEmtOLUR6miHBVCuGU95qwGEsM1NPC73zEkxUq8BF6H6FZM1PiqUHgLAVcTbzYRJftdZKwamPSBCKpM/PArMi/eLsGossIJpR632qEMVRlmgPGaAh9RXHmzhHuPmYhdAhdB5K4cVBsSw9fdIIW783nGtUYTehsJhd4CnW1pUkQ37wPa9/q88i6K2E3iz8VVseYPgw6YCm52fefLLSAGMA6fEiK7gOMqYpuFBNVafyKBYzDVqzUKQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nutanix.com; dmarc=pass action=none header.from=nutanix.com; dkim=pass header.d=nutanix.com; arc=none Received: from PH0PR02MB7384.namprd02.prod.outlook.com (2603:10b6:510:12::12) by DM5PR02MB3735.namprd02.prod.outlook.com (2603:10b6:4:af::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.18; Mon, 27 Jun 2022 12:29:03 +0000 Received: from PH0PR02MB7384.namprd02.prod.outlook.com ([fe80::898c:892a:2385:3df6]) by PH0PR02MB7384.namprd02.prod.outlook.com ([fe80::898c:892a:2385:3df6%5]) with mapi id 15.20.5373.018; Mon, 27 Jun 2022 12:29:03 +0000 Message-ID: Date: Mon, 27 Jun 2022 17:58:50 +0530 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [RFC PATCH 05/26] hugetlb: add CONFIG_HUGETLB_HIGH_GRANULARITY_MAPPING To: James Houghton , Mike Kravetz , Muchun Song , Peter Xu Cc: David Hildenbrand , David Rientjes , Axel Rasmussen , Mina Almasry , Jue Wang , "Dr . David Alan Gilbert" , linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20220624173656.2033256-1-jthoughton@google.com> <20220624173656.2033256-6-jthoughton@google.com> From: "manish.mishra" In-Reply-To: <20220624173656.2033256-6-jthoughton@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SY6PR01CA0070.ausprd01.prod.outlook.com (2603:10c6:10:ea::21) To PH0PR02MB7384.namprd02.prod.outlook.com (2603:10b6:510:12::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 560fc351-22aa-41fa-758f-08da58389ef2 X-MS-TrafficTypeDiagnostic: DM5PR02MB3735:EE_ x-proofpoint-crosstenant: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EcI+cAx7eoMoCS/sopkrZOjMYpFBYBjAHoEhinqsdguAteBb7ZYev7SNztGewTCbYD4AHlrXrxUBBJIG7yyqBhRaIwgrToQupheNcgkRm0KdwaQNrBq4nNiF8GYEbWAoIunw4M1OB2d9MDbPTOG931mLBHQ+ntQt4+Wnr2UU22rVQNes+LcrR3q54f/1W5RMrlV33x03ijuMuldgm5ErhtSFLKcaKaUJlpkOqbKo7JnWxhNqemJNBffwfz7xwp89gDtXb71TV9Bsd9kCxiTYrB1vOgi/o5jdEMm6JSePB6iWSaylXyHmSxxi4YXG+4TB7M/27y8v9CRZC9v5Y0upb+OYuqP+PUNhLXwDXmFARqfM6yEPASEgqJnaK1JJTf4k3wqsVOHaxHwASFr45MqXdQ1mG/GgF5n2fDSCNvhWHS4vHbJBdcOl2QCgCtfhyKzbHd4Xu9N+PHkWdZ0YIXgHZXmsww1Y12ondCOQA/nXVEpgeOPlwHJKH+1fjm+AD8qkKbgRBvSxtMl04/kr65kQjET1/F3I0KdG4GgpvOrfkSeDEyWzHhCDs2kzBQVscZENeUKi5lbcbYzLkqwAQAioxzcXZxdETMAFdRj7Qg3c651JbmHs2pK4Y5XXkPn3o4/CuqfVnkUmJQZeX/xkiJlPkRq7FtvaPrm0R1Bck9gH651WwK3qw/mkS1Cpz2GPgoRcA8vdPHYHTLiWvx+guA8X1Rp02BWppWxXhCn+NwMAR35DbyCtVl1wQZbVx3iI2IhgmZiKiTYExxEjUH8UCwNW+F0iiS6sy6Efsr0aCHnhcaiTt2i0jqJzgnj//1qi2r3d X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR02MB7384.namprd02.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(396003)(39860400002)(366004)(376002)(136003)(346002)(53546011)(83380400001)(186003)(41300700001)(6666004)(8676002)(54906003)(2616005)(26005)(6506007)(31696002)(6512007)(38100700002)(4326008)(110136005)(31686004)(36756003)(2906002)(5660300002)(7416002)(478600001)(66556008)(86362001)(6486002)(66476007)(8936002)(316002)(66946007)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MXB0eENxcjQwSkt1cTQyc2RWNVE0TXhIMUpWbG90SFlsMmlqL0FCVmVWREJT?= =?utf-8?B?SVROUXgxTnprell6Yz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JPb2VHUjFKeU9B?= =?utf-8?B?SURNdnJ2Y1pha0tRUmgyTlFLKy9UdFpPNlBkMktHaEJiSm5WbmF0bU9DME1P?= =?utf-8?B?Q1BHZnVCc08rb2RhOW0wTEp2dUJIUkJTNnc0YVk1M3NVSWI4d3MyM2FaVkVr?= =?utf-8?B?ZTlEaEZZSlFmdVlMSWxpQzZDaVc1VmZyek1kVEU5OERuNXJobytMdFhUU25u?= =?utf-8?B?U3pWZ3hic3V5SDZQTmx5TVlGYXZXak5qclNOOW9CdkVXVWRvY0tVdW4vOUhl?= =?utf-8?B?ZDZvaS9aZ1p0RVBJUlRKbkxTd20vZlJPemVBZ2xObG1XZmh3RlFkc1c0eGoy?= =?utf-8?B?N3c9PQ==?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 560fc351-22aa-41fa-758f-08da58389ef2 X-MS-Exchange-CrossTenant-AuthSource: PH0PR02MB7384.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2022 12:29:03.7287 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HpCv27fANBfOJ3eJIM98gEdONAeknASJzjkGUjzoTZZtuPMYywTemIIPJXCDxOXq6L5lYyRlXOqsiFs6wNxJkWTNyAWDf86NfyptdTDDLbk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR02MB3735 X-Proofpoint-GUID: N0GoNmZ0hC46MP53ZOiqiwW7ubwh_6EQ X-Proofpoint-ORIG-GUID: N0GoNmZ0hC46MP53ZOiqiwW7ubwh_6EQ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-06-27_06,2022-06-24_01,2022-06-22_01 X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24/06/22 11:06 pm, James Houghton wrote: > This adds the Kconfig to enable or disable high-granularity mapping. It > is enabled by default for architectures that use > ARCH_WANT_GENERAL_HUGETLB. > > There is also an arch-specific config ARCH_HAS_SPECIAL_HUGETLB_HGM which > controls whether or not the architecture has been updated to support > HGM if it doesn't use general HugeTLB. > > Signed-off-by: James Houghton reviewed-by:manish.mishra@nutanix.com > --- > fs/Kconfig | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/fs/Kconfig b/fs/Kconfig > index 5976eb33535f..d76c7d812656 100644 > --- a/fs/Kconfig > +++ b/fs/Kconfig > @@ -268,6 +268,13 @@ config HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON > to enable optimizing vmemmap pages of HugeTLB by default. It can then > be disabled on the command line via hugetlb_free_vmemmap=off. > > +config ARCH_HAS_SPECIAL_HUGETLB_HGM > + bool > + > +config HUGETLB_HIGH_GRANULARITY_MAPPING > + def_bool ARCH_WANT_GENERAL_HUGETLB || ARCH_HAS_SPECIAL_HUGETLB_HGM > + depends on HUGETLB_PAGE > + > config MEMFD_CREATE > def_bool TMPFS || HUGETLBFS >