Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp532863rdb; Tue, 19 Sep 2023 02:59:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG82NBlC0RfmoQqsjjSiDdNb+mJU0f6InqHR4RjbH+NNlMmjFlT1/KKdb9w8dXj+p8h1L0K X-Received: by 2002:a05:6a20:6a20:b0:159:f5fb:bf74 with SMTP id p32-20020a056a206a2000b00159f5fbbf74mr14907274pzk.3.1695117585241; Tue, 19 Sep 2023 02:59:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1695117585; cv=pass; d=google.com; s=arc-20160816; b=x9HFIAYuReF03T9YrrAaL0jBnrJdmDhQwjgaRe/P0S8HRLA2DhV9/g92Mz3OYKwKRU b5e92uM3s/ctlx+LTWTPoL7axCiyXdCNWdPp9DQoVcSRJp/vmxF1/kP6d2t+GAQSLFGx jndlwpM57XwwPzNTVSGX61Z/cH8PT4Nsx5JqALN29pxsw3BtO8SwQQ3B8zLlmFN8pqAs MWnftbv4kpTb4Vzehro1h8g4G6nG4xxOfJT3G3Vh9YMe+NW6HM+ZnTHk+roTnBCKtyv9 a+S9zzLEod1Q52Uwmb/UoqziNyRMwsG651c0JEUJ0Hdo8gzGCFP+VsgPW7zyuliUGoJE G4dQ== 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:content-language:subject :user-agent:date:message-id:dkim-signature:dkim-signature; bh=PTfnI97FU6pjXcevY49Jx8tFbYEUPjw/3Pm4JJkxdbs=; fh=4dUQ3b8PdctlRyT4IMZWiz1X6PEkv8byq/D/HKEIqAY=; b=tv2RhpC85gC4qbrA+MWo2v1WQyBU4hsWaDzOU2A08X4CyBxyd8ZPhFXqz1YZZDCmoZ qUYPEOk5dWFA0eLtiBWBvihBKZ3B5Jvp6s7tA70lZQZxzI8ByPCXbAUCRxW7G4mqYxpp eaikJsjpse3kRFvipqP6JBD/de+ZBucbP0SctGWGPvRbJw57ciB/KUXATjYbzklGfjH1 hhUDR7ru5rjl+MKnFoLSDUHmaXakFHzFrXnpu0l79Nj3C2zmVIQojONuGSl3F61xOQd1 vO1sM51DqT8ilWT7pY40pRuGlo6zMdbHCveNeiZF4xfmtQSTi5gEgZlqeWvSkbh6GAfV jlkw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=k2CWA5ae; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=XEBJPeRu; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id k9-20020a17090a910900b002639acf55c7si11661084pjo.7.2023.09.19.02.59.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 02:59:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=k2CWA5ae; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=XEBJPeRu; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 61D82807D8C7; Tue, 19 Sep 2023 01:56:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230245AbjISI4O (ORCPT + 99 others); Tue, 19 Sep 2023 04:56:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229714AbjISI4N (ORCPT ); Tue, 19 Sep 2023 04:56:13 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68D29102 for ; Tue, 19 Sep 2023 01:56:07 -0700 (PDT) Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38J6T0cU012051; Tue, 19 Sep 2023 08:55:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=PTfnI97FU6pjXcevY49Jx8tFbYEUPjw/3Pm4JJkxdbs=; b=k2CWA5aey8sHe8bV/ueVaFfMBGE8UI0PmbVYK1umcBREcHBzi45/cmP3Q73pgoj8vKlU I22bVXIp+KxL/mHbNE5nocmo51hFeC3lYzKzO0D6sMLczuET1HDC89+V5ftW2rcwhFtR DZ3OvN94dPSvjYiXz+xlms3AEDI2I1J5jB8+0Upl2eqGALUCiITmNxgWgZPu8Qpkg85W 65Ngx+YjdXIPvcQuNphpLuzFgNM7944UCuTCO8sF0QmdSw2qrqTjTeIZ/nkOVsXn8kx6 hClugRlj3fOJwKq4skVzRcZpgqS1Ffl0QhegmUWaHx4RT2Ef2e52HHCZBesB1X08BDQw YA== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3t53yu4c7s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Sep 2023 08:55:31 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 38J8InAk015866; Tue, 19 Sep 2023 08:55:30 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2168.outbound.protection.outlook.com [104.47.58.168]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3t52t544pb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Sep 2023 08:55:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VmvkOzXysh3JZS2/qPxuoZW0qjYgI0DN+rmktxbRq7nQpQLDEFOMuCL1KnCwi8BsWv2L7mGW6WFDEnaUIElipPaJKc/o/w/a1zp9WmA4d3FIpqMmcDApyQeTp+I0zyXs4wych/eINvsnroFT6f6qb+HolL9Eo1mCH+uIgQNu5nhLmYHXdi254yYfS5Vr2suIU+ko41hSqjUE89HugRaXwbT7Ufi0PNnJfky6HLeXOZQvdVolde07meaex7JxG3iW7WpuMQB9zJxB2cuifqoG6Vk9AXj/IjKHqjn2YTJhgng6WsGSTek1FCL5dQK61GLjdJRZ3ToqaSQIx3LwRWWx5w== 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=PTfnI97FU6pjXcevY49Jx8tFbYEUPjw/3Pm4JJkxdbs=; b=JPojA77/cPR5op7KTYqICfz5/KKVD7BQ1tHvC77lUa/OzwWSgT8AqaCQgRmoN9qm+45imccgAy+/hqUEzZfUNhsgAZbBzUdHqyKyLxmkDgT8C4ymWaETVJGaX1mlJ5vgtFKhs3Yif+TXOwG4IswvtOTEqw2Alc/XaPEuXxT0NtDo685+t9TTPn19FOx5qIwcYPy1uVDaCQZTZzDsDAYjf+4FuNSWbW+LlO7BADN4wPzEI9FwlV0BqQxcln1FdsWaXOYS1kE4bROinmlVy/DJ1cUpFaszzBYA+XOj5P2gpGGi+/qvMzrYl3LJwjhEm0OMojI2yvnLtRI/HJDDQGsGQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PTfnI97FU6pjXcevY49Jx8tFbYEUPjw/3Pm4JJkxdbs=; b=XEBJPeRutmDTDdW/OFigH2dYXyHehKXI6MdpAMlUk1A9LZ/poR1n/0zSm6fj9dNzG3V/wocKE5OnZIsSTFXCIu6qwiKYbEPEvq5QcYTp1RWI5i8pr8EzSWhr70YZnqd1NL+lfMRvmqryz1dLLgrrYHgUxL3Qd6KLsKzQ0vr5Oec= Received: from BLAPR10MB4835.namprd10.prod.outlook.com (2603:10b6:208:331::11) by DM6PR10MB4394.namprd10.prod.outlook.com (2603:10b6:5:221::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.26; Tue, 19 Sep 2023 08:55:28 +0000 Received: from BLAPR10MB4835.namprd10.prod.outlook.com ([fe80::8adc:498c:8369:f518]) by BLAPR10MB4835.namprd10.prod.outlook.com ([fe80::8adc:498c:8369:f518%3]) with mapi id 15.20.6792.026; Tue, 19 Sep 2023 08:55:28 +0000 Message-ID: Date: Tue, 19 Sep 2023 09:55:21 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 6/8] hugetlb: batch PMD split for bulk vmemmap dedup Content-Language: en-US To: Muchun Song Cc: Mike Kravetz , Muchun Song , Oscar Salvador , David Hildenbrand , Miaohe Lin , David Rientjes , Anshuman Khandual , Naoya Horiguchi , Barry Song <21cnbao@gmail.com>, Michal Hocko , Matthew Wilcox , Xiongchun Duan , Linux-MM , Andrew Morton , LKML References: <20230918230202.254631-1-mike.kravetz@oracle.com> <20230918230202.254631-7-mike.kravetz@oracle.com> <9c627733-e6a2-833b-b0f9-d59552f6ab0d@linux.dev> <07192BE2-C66E-4F74-8F76-05F57777C6B7@linux.dev> From: Joao Martins In-Reply-To: <07192BE2-C66E-4F74-8F76-05F57777C6B7@linux.dev> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PA7P264CA0204.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:36d::7) To BLAPR10MB4835.namprd10.prod.outlook.com (2603:10b6:208:331::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BLAPR10MB4835:EE_|DM6PR10MB4394:EE_ X-MS-Office365-Filtering-Correlation-Id: 8e1ed1e8-4461-49d1-7e3f-08dbb8ee2c1f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MgI9pNuVcHhYk+5fUG1gRCYKColRSvLCSsyhLsdjnC3UyZyDmNvnmueL9s7/+q0davM51nGb3AY/kN5b7/FhAeadArL3mUqYSww894DUZQWwM+TxA5DHoHRKUk24wYjx+4+txogYEXN54hR7FjEGHk0BRD1zNi6mclJfaZc+xQ18yd/Gy7y8Pc2ooIVIvVeJ7O6BUH2rY2rJLCAttMuR64jZ3SGLsrOrHliYW5joWxkDwEHDrSIxb6qCYO2COI7iZW5bxzIPxq7csXXQd3WF08mGkxULYyZB/f+iQolZ7BmnfiyBwg83QmPgxHkEgLg+opkLGVFMTs+yAOxpmDvXXEr/lfZr0EAKo0zDz7Jqp2gnK0vwKxKUC2SdE5bfvODvlUWQMzye0t0SXKanwaMtfaemX80z8IK2yS1SymM+dYukFccVH+OuZu/jUUibIGvk4LAH+MZkZ3rIKtBw5LzNOhJeKM+jcoi7sxJlt/ZQNY4n+0NuYBzFLXeyCZqndRmtUI6gHxr4C5pErcQ1UgdpbP+Mj4DpHlr/IWjR3+89XwoLbgg6hH1Fo5Tm98978g6qoA3BTmPBebkaQ25+7Yy/r5vxr7eQo/zogHOW33+Qp7mv5Ob0rWcOsveZWz/st0ccNRD2b/aQZTJMXtxHzW7cMw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BLAPR10MB4835.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(39860400002)(396003)(136003)(376002)(346002)(1800799009)(186009)(451199024)(38100700002)(36756003)(31696002)(31686004)(86362001)(6486002)(5660300002)(53546011)(6506007)(6666004)(478600001)(54906003)(4326008)(316002)(7416002)(83380400001)(6512007)(66556008)(2906002)(41300700001)(8676002)(66476007)(6916009)(8936002)(2616005)(26005)(66946007)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YmJpY2F1WXJZcmNFcjlQMld5QXpwR2ZXc0I5QU1nTWYxOGNpSDdCTmlaU3FD?= =?utf-8?B?OVVGUkFuZEhEaC95TTBjVDNyUVJCSDRUaU0zdFdidHYySzU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sm5ZZmJ1S0s5aHNwWGdDcUJMdTduMURo?= =?utf-8?B?QzA4ZnowNjdEUEVsNVE2WEJ2djdCVEV3dWhpYlFjVGN0NzFNYXhRWXlrdXFw?= =?utf-8?Q?AzvWEpakc5V2wA9jex3DaM5tVOT?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8e1ed1e8-4461-49d1-7e3f-08dbb8ee2c1f X-MS-Exchange-CrossTenant-AuthSource: BLAPR10MB4835.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2023 08:55:28.7145 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FciwoGntyjH0Q++4u4p6T4Vk7Blder7sJ7rB4eDVWnCuHIljeIh1A9OGtfzjpBNoP8SonY3S43C16O8bA2tLZUS7Xk4S44jFVpTrS7Wmzkg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR10MB4394 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-19_03,2023-09-18_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=999 adultscore=0 mlxscore=0 spamscore=0 malwarescore=0 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309190074 X-Proofpoint-GUID: -fUmmEuT2WrZG-zNQCNJ9F1A8INi82IK X-Proofpoint-ORIG-GUID: -fUmmEuT2WrZG-zNQCNJ9F1A8INi82IK X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 19 Sep 2023 01:56:12 -0700 (PDT) On 19/09/2023 09:41, Muchun Song wrote: >> On Sep 19, 2023, at 16:26, Joao Martins wrote: >> On 19/09/2023 07:42, Muchun Song wrote: >>> On 2023/9/19 07:01, Mike Kravetz wrote: >>>> From: Joao Martins >>>> >>>> In an effort to minimize amount of TLB flushes, batch all PMD splits >>>> belonging to a range of pages in order to perform only 1 (global) TLB >>>> flush. >>>> >>>> Add a flags field to the walker and pass whether it's a bulk allocation >>>> or just a single page to decide to remap. First value >>>> (VMEMMAP_SPLIT_NO_TLB_FLUSH) designates the request to not do the TLB >>>> flush when we split the PMD. >>>> >>>> Rebased and updated by Mike Kravetz >>>> >>>> Signed-off-by: Joao Martins >>>> Signed-off-by: Mike Kravetz >>>> --- >>>> mm/hugetlb_vmemmap.c | 79 +++++++++++++++++++++++++++++++++++++++++--- >>>> 1 file changed, 75 insertions(+), 4 deletions(-) >>>> >>>> diff --git a/mm/hugetlb_vmemmap.c b/mm/hugetlb_vmemmap.c >>>> index 147ed15bcae4..e8bc2f7567db 100644 >>>> --- a/mm/hugetlb_vmemmap.c >>>> +++ b/mm/hugetlb_vmemmap.c >>>> @@ -27,6 +27,7 @@ >>>> * @reuse_addr: the virtual address of the @reuse_page page. >>>> * @vmemmap_pages: the list head of the vmemmap pages that can be freed >>>> * or is mapped from. >>>> + * @flags: used to modify behavior in bulk operations >>> >>> Better to describe it as "used to modify behavior in vmemmap page table walking >>> operations" >>> >> OK >> >>>> void hugetlb_vmemmap_optimize_folios(struct hstate *h, struct list_head >>>> *folio_list) >>>> { >>>> struct folio *folio; >>>> LIST_HEAD(vmemmap_pages); >>>> + list_for_each_entry(folio, folio_list, lru) >>>> + hugetlb_vmemmap_split(h, &folio->page); >>>> + >>>> + flush_tlb_all(); >>>> + >>>> list_for_each_entry(folio, folio_list, lru) { >>>> int ret = __hugetlb_vmemmap_optimize(h, &folio->page, >>>> &vmemmap_pages); >>> >>> This is unlikely to be failed since the page table allocation >>> is moved to the above >> >>> (Note that the head vmemmap page allocation >>> is not mandatory). >> >> Good point that I almost forgot >> >>> So we should handle the error case in the above >>> splitting operation. >> >> But back to the previous discussion in v2... the thinking was that /some/ PMDs >> got split, and say could allow some PTE remapping to occur and free some pages >> back (each page allows 6 more splits worst case). Then the next >> __hugetlb_vmemmap_optimize() will have to split PMD pages again for those >> hugepages that failed the batch PMD split (as we only defer the PTE remap tlb >> flush in this stage). > > Oh, yes. Maybe we could break the above traversal as early as possible > once we enter an ENOMEM? > Sounds good -- no point in keep trying to split if we are failing with OOM. Perhaps a comment in both of these clauses (the early break on split and the OOM handling in batch optimize) could help make this clear. >> >> Unless this isn't something worth handling >> >> Joao > > >