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=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS 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 9EEC8C433DB for ; Wed, 3 Mar 2021 23:43:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 18C2C64F34 for ; Wed, 3 Mar 2021 23:43:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 18C2C64F34 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7E44B6B0005; Wed, 3 Mar 2021 18:43:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 795046B0006; Wed, 3 Mar 2021 18:43:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5708E6B0007; Wed, 3 Mar 2021 18:43:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0198.hostedemail.com [216.40.44.198]) by kanga.kvack.org (Postfix) with ESMTP id 1F0156B0005 for ; Wed, 3 Mar 2021 18:43:18 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id CBDB7180388DF for ; Wed, 3 Mar 2021 23:43:17 +0000 (UTC) X-FDA: 77880191634.30.C92E3E8 Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by imf23.hostedemail.com (Postfix) with ESMTP id 41249A0009CD for ; Wed, 3 Mar 2021 23:43:16 +0000 (UTC) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Wed, 03 Mar 2021 15:43:15 -0800 Received: from HKMAIL102.nvidia.com (10.18.16.11) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 3 Mar 2021 23:43:13 +0000 Received: from HKMAIL104.nvidia.com (10.18.16.13) by HKMAIL102.nvidia.com (10.18.16.11) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 3 Mar 2021 23:43:08 +0000 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.176) by HKMAIL104.nvidia.com (10.18.16.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Wed, 3 Mar 2021 23:43:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZSYfmEIgOa/uPoxfVdDCQzOEuTcpBE1w4XykmZuP3dURaAsNufkaUR1cR5M7rr7I+PlldpUYfWqC00lpybtIrj0OOVrNhhtfNrozl4L8lOkpHy+JfD/USQlJNIgm2xFH907UqtdLL16S6NPex87MQW4FORBpm4V1CHEXqmTHqw51zQk9jvpZCYl2wj7G6veUd+V5Oc3Lt5EdACIA1RPX/mkKy+yXi3HJa0qkEg12MfZWhpapsXIFEjlUpQ3SskMEYNwZgKrUz1K9Imyd0w8J6ef3wJ0x0o460Vg63Z5AnjjU7xfXw4udrTYoysYSFqLyLLrmlHT1Gi9Un3rwQc3aBA== 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-SenderADCheck; bh=wsJWIUXqViAmIAa7Pej95yLIZ1AgMAl1TOtXUyONGBA=; b=XY9sQBHL9jOs04WsyFk6JAqwXpVJHh4acCtWFEMdEG8PYfHMBggR44oixa7s0Ylhtrlcj1nMgFAbb/H8U8EWCCWGqeGEL/kBgBRavf9W9SirNDlx7rE34H/93yYXI3yoRdL7cThmc3SUIlJB/ImSmvma7XaTNFt3OnGSqPnzQ1at1fIeeXwxv2dAX/J9EbO2pwm0MbwKq2faU4flC1Po8flJ+SJ11i6Up04kn8Ir65ETBGJfME4ZF90yN2tAMa5A0E2cQwWj5KK6sVZNVB4DTX97Vl0J8mL/FuZ4PtPK3v4LSIaU59IETKuY8fXQkKdmlCODkqmKdRTrkqvNoh6hTA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Authentication-Results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=nvidia.com; Received: from MN2PR12MB3823.namprd12.prod.outlook.com (2603:10b6:208:168::26) by BL0PR12MB4721.namprd12.prod.outlook.com (2603:10b6:208:8e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.20; Wed, 3 Mar 2021 23:43:05 +0000 Received: from MN2PR12MB3823.namprd12.prod.outlook.com ([fe80::a1b1:5d8:47d7:4b60]) by MN2PR12MB3823.namprd12.prod.outlook.com ([fe80::a1b1:5d8:47d7:4b60%7]) with mapi id 15.20.3890.028; Wed, 3 Mar 2021 23:43:03 +0000 From: Zi Yan To: David Hildenbrand CC: , Matthew Wilcox , "Kirill A . Shutemov" , Roman Gushchin , Andrew Morton , Yang Shi , Michal Hocko , John Hubbard , "Ralph Campbell" , David Nellans , "Jason Gunthorpe" , David Rientjes , "Vlastimil Babka" , Mike Kravetz , Song Liu Subject: Re: [RFC PATCH v3 00/49] 1GB PUD THP support on x86_64 Date: Wed, 3 Mar 2021 18:42:53 -0500 X-Mailer: MailMate (1.14r5757) Message-ID: In-Reply-To: <483b9681-497f-d86f-1f0b-14edb9d1c388@redhat.com> References: <20210224223536.803765-1-zi.yan@sent.com> <67B2C538-45DB-4678-A64D-295A9703EDE1@nvidia.com> <483b9681-497f-d86f-1f0b-14edb9d1c388@redhat.com> Content-Type: multipart/signed; boundary="=_MailMate_4C4C6695-531A-4D9F-82D7-AC607A1A122D_="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Originating-IP: [216.228.112.22] X-ClientProxiedBy: BL0PR05CA0007.namprd05.prod.outlook.com (2603:10b6:208:91::17) To MN2PR12MB3823.namprd12.prod.outlook.com (2603:10b6:208:168::26) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [10.2.62.13] (216.228.112.22) by BL0PR05CA0007.namprd05.prod.outlook.com (2603:10b6:208:91::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.13 via Frontend Transport; Wed, 3 Mar 2021 23:42:57 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ece982b1-310c-4a43-c86e-08d8de9e1531 X-MS-TrafficTypeDiagnostic: BL0PR12MB4721: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-Header: ProcessedBy-CMR-outbound X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JHlqg9V9/JGgyjCATAuv6VKzdgLJ4FJE8yuforHZHeOZkq5u5suDTJhWx/+8jp57/z5tsgNcrCDHuEAfhjEphuxgoa8Jjw3VnnuP4WAaB9f2pBytyMhq9jNuC5NzxowZ0I2XBsd1E0Xi6/v7yyYjzvmIhMoxVDuPr3uxUCbhFKKmp6F/vgEahFngBG2LF6bxynnwFtzuuj9L1aPbJ2yy5tjYQbylErixh90FFHVqx+SeSjmev0DcZ/GvsHW8bGmlW9i3cOYhLUg2CfuGptWifp44DW5E+GJZa5Cn1a8RSNb2V4tI36KkxXUWxoBdUQpE8XVC+AFe83ixcyTCXw7nr9kklPlvDZM+MdwKCuPNjwhYePAE1ftNbO7QpFiDETr91l0Yd5LXecs9DE7w3Xs/9CcWX1st/suIZnexPQ0YCrLRiAw0sVsUBHQWH4ku/kvaRTaSHBbl9CGWGcjJWR7PlSPkkEIkzaP8ZxUzFoxNajJx33iqFa30vgDPmqB1OQj+zs77DfjCfEVelIIVtEECmLy3tCScNljLJkYmi+Ndaof3aZDw/JaptlmGxAmRdXuwVy/T+D4V2L6SPdfTi+5fnWQT4vD4hE3j+RnC0AhW34zoZ2tXR+sfw6998UpzYfkn+BY9DOAynEjz2jFYH5Mw8j37vW3o+Mu2KUaIgU+PgvNtSIa0kbBZHB4SSr2Y9qS3 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB3823.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(346002)(366004)(376002)(136003)(39860400002)(396003)(36756003)(186003)(4326008)(86362001)(5660300002)(235185007)(6916009)(6486002)(7416002)(16576012)(2906002)(2616005)(956004)(53546011)(54906003)(16526019)(33964004)(316002)(8936002)(26005)(8676002)(83380400001)(66946007)(6666004)(66556008)(66476007)(33656002)(478600001)(72826003)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?WENHK29DNUYvVm16Nk9SMEZGYUMyRzJ6N2hwNXVoN3NOMUJmd3ExMCtjTDJi?= =?utf-8?B?TEU2WWlDRTh6Sms3SUNXa0tTWmpnOUp3ZStvMXpOa2tKL0hDYVZ5T3hSN3pn?= =?utf-8?B?TzFhODVCMUMxb055RkJsd1FRQVU5WEx2clNoTjk1d1Byd1NUWlR0OGRudjBv?= =?utf-8?B?bFZSeCt4QTk1YVB1bDFaN0E0cTVYdEpoSUtYV3Q0OGlyc2JYUnpQR25MTzRV?= =?utf-8?B?Qi9oODErL2ErT3Z6NUdOMXNFZ1RIdTVtT1JuTmx3alRPbldVQjh5Q2kzbnda?= =?utf-8?B?RkxDSUhQdk9JZEpJMTZFWXUzaVZqZ3RkRmtDa2tVcDJPdS9vOHM0OWhQNDU4?= =?utf-8?B?NWRkTDZ0dEM4RG9FcWlmSnVaS1RZMElBQ2o3ektLd2RZenZ4dWNldytCdmVs?= =?utf-8?B?TWJPUXE2SXd2d3hZcmY5eUJYTXZJRHE3Yk5YNUFlbVh2V1RMUGpUajNNMC8w?= =?utf-8?B?L1BiZTJNdUhua1RubkpVbmJxbFl6UVpDdndQazU4WnJjMkw0UUp3dktROU96?= =?utf-8?B?U1MxMGZmeFdOWWU2OHZMc1JPTkQxY0tEVFp0eTR3ay9NSTIvd2QyczB3ZkV3?= =?utf-8?B?eFI0YlB1WXFNaXpFekpiZkF3V3AzRVAzTmJEaDNxbWtOTjJ6STJjblpJb0c5?= =?utf-8?B?ODhCaTdQcHduMzNmMFlnZDliVXUxN1ZuMytUNkJSL0ZhTXFDMHhlUXpubEtu?= =?utf-8?B?M2tBNXdIVDk2MjNRZ25LMGJtMGM5WUlHOW80QkZRdkcxWjJtRVgxK0w2N3F2?= =?utf-8?B?bTZ1dkYveU8rbWpVeElxb1R0MXdEYVhMSXE5aytlSDkxUVlTZHhRU0Z0YXFP?= =?utf-8?B?NG9jRWErYUJOcHQwZlZuTnpkZXBidzYyWnp4M1FCeUxNZmFHZmxOdUI1RnNP?= =?utf-8?B?MU9FdUFUOEViYldHUy9hc2tyMGx0bi9hRU92NGVJNDJYb0lFakJ6V25SOHpt?= =?utf-8?B?dHJweDFHU21sMHV3SWtETnc3NGhwV1VXOVVKVExwaFdScGFHV3I5d1cyeXY2?= =?utf-8?B?SEoxczJ1bWFZRjBxVmliVGxBRXFPdlNVckNCWmQzcm92NnhVci9jbDFDWFRM?= =?utf-8?B?ajRweEVHMUZaaTlwbU9IRHBqcGIvUFB5Y0RCUWE5a2RRYTYvbEhGamlySDhR?= =?utf-8?B?MnM3NHhBeHJDMTMwL2RnVVlVS3NYZU1JVlAxZERoMHZsZWRlSmpkZjh6U1cw?= =?utf-8?B?ck40TUJZRVRqSVA0dkNlWVk3NlZiOFRqOWpsVmRjblJaYUF6T2dBcCtOdEg1?= =?utf-8?B?elN1L2FWNDA5Z1d1OXZzNFdpUEd2UitYakhrLzZuQm11MVNpRU5YMnYvdWpB?= =?utf-8?B?bDZhQmZyaFVKNkN4Nlp6OHJsRkNXelJGdmxmb1JRQUtoV3VrMW9MZDV5SGth?= =?utf-8?B?R29YZFZReUp2VDdJcU44aE9KaFpYcmdha3JiNGpjb1JIOXA1VlpCeGlOTWQz?= =?utf-8?B?bFErSFhzVVpmL1pLcVE0VFRLOU9makV6aXY1TWl1TXhQRU9TUngyR0x3VGgw?= =?utf-8?B?OXMwZEgxdlFTTkhiUnBNdUE1UXZtSU1xc0FreTYyM1Z4dGdOQUNDMks3QjNp?= =?utf-8?B?dGh5b3NHTUlVZnhJU2JuYStZZC8wRjRabjdFTTFOS1hKNDFENzNxdEVjdFIy?= =?utf-8?B?cXN1bW91R2RvYnA3RW9CcjdHTE11cVVuL0h3Q0xsRmx6VlovdkFYWXg4dGNK?= =?utf-8?B?VnhBaU1EQmhxK2dnRDZZVjQ4elVZZ3JCMEFLMWg2TUZoK1dONnR4ZW9IN0xE?= =?utf-8?Q?fBYk86gu3REcmZc5L++c0qknOT2KRJc12aAYNzv?= X-MS-Exchange-CrossTenant-Network-Message-Id: ece982b1-310c-4a43-c86e-08d8de9e1531 X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB3823.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2021 23:43:03.2478 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xzCwftJ+EeGaliDLPru1UOv7WN4iaYXInO2hd2/YeU9KP+EjoeRT5JRhblknOwz3 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB4721 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1614814995; bh=Bhl06b57PGZynsDcM47EKJKr98Y5sHnGkDHL9giQFes=; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results: Authentication-Results:From:To:CC:Subject:Date:X-Mailer:Message-ID: In-Reply-To:References:Content-Type:X-Originating-IP: X-ClientProxiedBy:MIME-Version: X-MS-Exchange-MessageSentRepresentingType:X-MS-PublicTrafficType: X-MS-Office365-Filtering-Correlation-Id:X-MS-TrafficTypeDiagnostic: X-MS-Exchange-Transport-Forked:X-Microsoft-Antispam-PRVS:X-Header: X-MS-Oob-TLC-OOBClassifiers:X-MS-Exchange-SenderADCheck: X-Microsoft-Antispam:X-Microsoft-Antispam-Message-Info: X-Forefront-Antispam-Report:X-MS-Exchange-AntiSpam-MessageData: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-MailboxType: X-MS-Exchange-CrossTenant-UserPrincipalName: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=d6gXrFjon0MN/9pBEJL3ZNXjeiWbuGWa0oh5xErtGXfot7LLKdOqvj3WF5twUnJ2g YTwBALtfbFJgwIxt1ude9Qj6UAEOSopEYL9vabpTQrjqPtfiOyiLN7t9yEaOQ3/PK3 cDHi36dkAHszlO47gp/rMO16EBD6IccxdtQMoKulAEkpdM424s1WQgM2aIwdNQHHos +BHQirar45vGMaZ67f1dop7csas+I/DnxNqhKoMoc9jpgaG1JqtOA3vstvFXzFifkP Wa+0CTqsPfgRdWDyNnKnoE2ACCCp5dXMooyK3Kq8SbuKLgrssjPA97xhWYLtb7VMyv NCUFJiu4RAcXw== X-Stat-Signature: k6uu89zxxiq14qbqk1wabnfu5omtcke6 X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 41249A0009CD Received-SPF: none (nvidia.com>: No applicable sender policy available) receiver=imf23; identity=mailfrom; envelope-from=""; helo=hqnvemgate26.nvidia.com; client-ip=216.228.121.65 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614814996-809408 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: --=_MailMate_4C4C6695-531A-4D9F-82D7-AC607A1A122D_= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On 2 Mar 2021, at 3:55, David Hildenbrand wrote: >>> >>> However, I don't follow how this is actually really feasible in big s= cale. You could only ever collapse into a 1GB THP if you happen to have 1= GB consecutive 2MB THP / 4k already. Sounds to me like this happens when = the stars align. >> >> Both the process_madvise() approach and my proposal require page migra= tion to bring back THPs, since like you said having consecutive pages rea= dy is extremely rare. IIUC, the process_madvise() approach reuses khugepa= ged code to collapse huge pages, >> namely first allocating a 2MB THP, then copying data over, finally fre= e old base pages. My proposal would migrate pages within >> a virtual address range (>1GB and 1GB-aligned) to get all physical pag= es contiguous, then promote the resulting 1GB consecutive >> pages to 1GB THP. No new page allocation is needed. > > I am missing how we can ever reliably form 1GB pages (esp. after the sy= stem ran for a while) without any kind of fragmentation avoidance / defra= gmentation mechanism that is aware of gigantic pages. For THP, pageblocks= +compaction serve that purpose. We may not have that as reliable as pageblocks+compaction for THP, but we= are able to improve over existing code after 1GB THP is supported and used. Otherwise, why bother adding a new mechanism when = there is no user? I did an experiment on my 32GB desktop like Roman suggested in another em= ail, using as much memory as possible and running =E2=80=9Cgit gc=E2=80=9D on Linux repo at the same time to fragment memor= y. I repeated the process three times with three different Linux repos. I checked all pageblock types with my custom kernel module (https://githu= b.com/x-y-z/kernel-modules) and discovered that the system still have 11 1GB Movable pageblocks (consecutive pageblocks w= ith the same migratetype are grouped as large as possible). This means after heavy memory fragmentation the system is stil= l able to form 11 1GB THPs, which is >30% of total possible 1GB THPs. I think it is a reasonably good number since we are no= t going to form 1GB THPs for everything running in the system. >> >> Both approaches would need user-space invocation, assuming either the = application itself wants to get THPs for a specific region or a user-spac= e daemon would do this for a group of application, instead of waiting for= khugepaged to slowly (4096 pages every 10s) scan and do huge page collap= se. User will pay the cost of getting THP. This also means THPs are not c= ompletely transparent to user, but I think it should be fine when users e= xplicitly invoke these two methods to get THPs for better performance. > > Here is the problem: these *advises* are not persistent. Assume your sy= stem has to swap and has to split the THP + write it to the swap backend.= The gigantic page is lost for that part of the application. When loading= the individual 4k pages out of swap there is no guarantee that we can fo= rm a 1 GB page again - and how should we know that the application wanted= a 1 GB page at that position? VM_HUGEPAGE will be set for that VMA and I am planning to add a new field= to VMA to indicate what huge page size we want in that VMA. About split 1GB THP due to swapping, that happens to THP too. E= ither khugepaged or a user daemon calling process_madvise() could recover 1GB THP. > > How would the application know that the advise was no dropped and that > a) There is no 1GB page anymore > b) It would have to re-issue the advise I expected a daemon, either khugepaged or a user one calling process_mavi= se, would rescan the application and reform 1GB pages. > > Similarly, I am not convinced that the future of khugepaged is in user = space. The issue of khugepaged is that it runs at very slow rate, 4096 pages eve= ry 10s, because kernel does not want to consume too much CPU resources without knowing the benefit of forming THPs. A use= r daemon can run at a fast pace to form THPs or 1GB THPs from application memory regions that users really want huge page= s. > >> >> The difference of my proposal is that it does not need a 1GB THP alloc= ation, so there is no special requirements like using CMA >> or increasing MAX_ORDER in buddy allocator to allow 1GB page allocatio= n. It makes creating THPs with orders > MAX_ORDER possible >> without other intrusive changes. > > Anything that relies on large allocations succeeding purely because "ZO= NE_NORMAL memory is usually not fragmented after boot" is broken by desig= n. That's why we have CMA, it can give guarantees (well, once we fix all = remaining issues :) ). It seems that you are suggesting I should use CMA for 1GB THP allocation,= since CMA can give guarantee for large allocations. Using CMA for 1GB THP would be a great first step to get 1GB THP working,= then we can replace it with other large allocation mechanisms later. =E2=80=94 Best Regards, Yan Zi --=_MailMate_4C4C6695-531A-4D9F-82D7-AC607A1A122D_= Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJDBAEBCgAtFiEEh7yFAW3gwjwQ4C9anbJR82th+ooFAmBAHv4PHHppeUBudmlk aWEuY29tAAoJEJ2yUfNrYfqK71wP/jp37ssH7fwZcGv24fbm1G75CefCkzrtIT2u V6YTk40Tez83+HHQSWy9KSyZGxCjXojNB6Z30J0pfD1WumYmaqhXy1RxrGKn5Lxn Q2PCFJmMnNoVl6Kl7S1aYyhEWlEbgUNxsHWUpOX30tXH7Ww1hacNEtvs51vxs0ss NOV3Obi5wM0aUtrY2mHF+qWcTwH+/aR4S8D9/SAlAJyJAB+thaXXbu2cV0E2Y8LM gV1Y2Jn6+2bFi8jI3o4cyYfe50ry+r/6OVdaMb193rtgJ3Qz7XIJoFCuY7t1O6hP JA+if23sznMNgpT6SN2YsOZNE9JAN1Ne/9/wola2xRLhkQZLo5q9vML5sPGZHyn1 iECOfxUZVciOaqj7inuDnMJERIjMDGpXp1JTSjE6gY7sE7RJyvA5lrl1uZu/4FSU u7LIoA7KVYLenSoinSPRqk0fhnrHVxjfxUaO11iOWcTM7VG0szuM/oNNu4NOWnOL /jtKOP9PCAydmosQxEq0QirS1qUtzJOnppXUlC+bVgSlOtn6pZjSAt8sldeCPxk+ uFcnos2Stya68S/ow+SGpMqixALbqPtRorAJ9NXn2mNn//e9qE41Fwijq9fJQs/O VGFtmVYGkiPSil3WeDXfp18zickIJ88PEVzVVXbXpIcKUU33xn4xMIxOqkvVFfbO /eI/LNLD =4Pap -----END PGP SIGNATURE----- --=_MailMate_4C4C6695-531A-4D9F-82D7-AC607A1A122D_=--