Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp615396rdb; Tue, 19 Sep 2023 05:39:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEjg6hbVI1PzPv60m5WPcOqIAgQ6jBPFZooB0Ou5YL6nIQNHJbr7s5pHXfDhM0vW5cPZ4IE X-Received: by 2002:a05:6a21:4882:b0:137:d14d:79ea with SMTP id av2-20020a056a21488200b00137d14d79eamr11862550pzc.25.1695127177487; Tue, 19 Sep 2023 05:39:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1695127177; cv=pass; d=google.com; s=arc-20160816; b=pb+29q3Q42zZsbQV6Svbeo5nyu0ZtiK/jkACuGUdZ1oM3iNFeDw1KcSEACbbodwoEb JXjmO+vcHXzS8l3/9hJljogh0YgyqmpTxQC6TJIw5XphFgUxfNRLAL5vWc0qEVs9Qup7 o83DsxUEA6BQumRbZkpGD2yAFg1QPVE3F0FJYxgfmwJHeGhFOKSzio3dGzCkUZbIMHbM oy7igCO8CLVG7rTRPOQCU+lXeVR5DOArkCpthSW51Pmb6eN53+t316S2L0JQ0YC7mx4D qWLc+5HRV2pwqIH5wmgmXTVTNPiLB/TJTsSv3D8p5CrVNVy8lJfColi39C7oYUeeDNEI m8Qw== 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=DZdKL0VVc41h7O8wmoguBaOa8xrrTvsiwN14sEra10A=; fh=T5o++FHvpVpNJeuVQi6bCYVs+Fpai5qABDVLuThI4iA=; b=VfB8IE+bP4myOVf9A6ANTcAqEYGcq0MVKqjyU14Bs5aLWR8H5IOaOULzZPtNB4uYtE 2DpKTaqiVEU2vEJjN5LSv44OvCRqjvfwjPJTPMSZ7uI3OhSLPNfjFEvefYGoXGuP3kmn RXfvG7fdd7zC4fgm/FLRv37Y4L3Vhn9D/z8BoEcuyYs/HzkSmcP/LOHe+GN/6LBWlDIE j5SsOmaMGbXCbK9imA06uZ+IlfpJpuPYdWeyjH9p5gOIDP5ry7E5rSD+KD12H+jukvH0 eCoEsMcm2R/lTJ/rPGDcvptrWZeJBJKanj/Le33b7RXDjEZUIY2vNSOtnl7wP15ubPDJ GUaw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=2UylhGjI; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=NOqgdcRf; 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:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id d9-20020a056a0024c900b0068a3da84110si9787435pfv.333.2023.09.19.05.39.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 05:39:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=2UylhGjI; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=NOqgdcRf; 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:8 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 fry.vger.email (Postfix) with ESMTP id 59B8D80A0DDF; Tue, 19 Sep 2023 01:28:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230351AbjISI2M (ORCPT + 99 others); Tue, 19 Sep 2023 04:28:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230404AbjISI2K (ORCPT ); Tue, 19 Sep 2023 04:28:10 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB8CA116 for ; Tue, 19 Sep 2023 01:28:04 -0700 (PDT) Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38J6TLL4007941; Tue, 19 Sep 2023 08:27:08 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=DZdKL0VVc41h7O8wmoguBaOa8xrrTvsiwN14sEra10A=; b=2UylhGjI+/zCQU6RE5s0Tl73oi/XxWM+q0+6OiQMJ36jEMrpBfGn3FwjDfxfLYj2QRBH RQ6L9IibBnfoRHfGO/NarkTOuwGtZAuVW5JXeK3Pl1ym/iOQ+8q3Hh01/yiIhk2Ni04K OaD7L/MCBsYL9CJxXycMAGh3vPS0wC+0oJ5E9w3u8gEQIv62bEEg+ET7q61qGv72+V7z oB0285IlMc87XZ5eIGgF++IEw/t0oeOXhi82GqHEIQQUVxgP8cvjvAa7dBC8rc5vS724 xsAg5C6ExeMrzpV69KZWMmQwOYCCGLEDMCWY9/8wlBVpZL/+KQRWS22gQr88b94EkVQN fw== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3t54wum97x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Sep 2023 08:27:07 +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 38J7huJM015971; Tue, 19 Sep 2023 08:27:06 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2109.outbound.protection.outlook.com [104.47.58.109]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3t52t537et-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Sep 2023 08:27:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fhSGJfb7686Y4UtgnCfMnmiHBJu5cYPZ43dm0ng4vBS3BcPZmSy3enDgYFiY7lJ0vWbXtBq9RCkKCx7zN4wAdvdZ9EJlC4BRoZbzZ4RqPhYUcqPBAaGa1bDEVEWgS74E4QsZ8NzigMUtwB5pCrhKs1CWghDznhaHwWSEa/Oz+dclCgQPaihX0R0lC7cNLluQaKdeB2cGc9qK2cf0UyiB3mlBoLGYSuwtFPaXBJMnhJq6RSJGFJw5ve83KtmAeub858xu3P7mK8fab34CcHMeT2HSTAtevREDHRLw2frhksxAfFG9Bf7KfnZj7QEbwnbpx5s2DlRTXW6I0ir1CkFu3g== 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=DZdKL0VVc41h7O8wmoguBaOa8xrrTvsiwN14sEra10A=; b=Ntco373zhfoat7oD9a+PG/Am7INApMzPi4UQJqL5sTP4P3UP/lq3QtW3nKfHyd7bBW4Rqe+9QchI4oo1h68oHBTC9QzsMhy8nLdeoJE2+0jtMAWZ6IRyCvgBc3A4zwVltXw1wOqLZwaFU8algH4/HRLPkdK8/zDiLFEwsitb6DnXd2+2atN+qPCCindNMA/HdCog9Ek2WwFCnNyTgIwAAY5ctYO/rw8ZUBg4i+mVLvUROp7Tlt2Y6SqoNKEX04Ng/KlXOTmvaHrdE4oa2+BfdzMtjel/LNCCv+dgFz4/VemoB8NYu8G1gR0E1+x4eZQSz2jtZDvaytBJ2bIY7O+ygg== 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=DZdKL0VVc41h7O8wmoguBaOa8xrrTvsiwN14sEra10A=; b=NOqgdcRfHH+XqT0/ZqCMn86Ic5yEb1ENtoirG59j1jmp2yVo1VKrUMcy4sAKpXgsWi3aZYNb1mHdT/dRJl5VY66Z8KRorkrbDBeMIYogYJigMcrVHi6nELP4FOGxtd1fWwqiYBG/rX2EEWEYeYQkEKSjwffHc2/GLLdWJLquE5Q= Received: from BLAPR10MB4835.namprd10.prod.outlook.com (2603:10b6:208:331::11) by DM4PR10MB6063.namprd10.prod.outlook.com (2603:10b6:8:b9::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.27; Tue, 19 Sep 2023 08:27:03 +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:27:03 +0000 Message-ID: Date: Tue, 19 Sep 2023 09:26:56 +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 , Mike Kravetz Cc: 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@kvack.org, Andrew Morton , linux-kernel@vger.kernel.org References: <20230918230202.254631-1-mike.kravetz@oracle.com> <20230918230202.254631-7-mike.kravetz@oracle.com> <9c627733-e6a2-833b-b0f9-d59552f6ab0d@linux.dev> From: Joao Martins In-Reply-To: <9c627733-e6a2-833b-b0f9-d59552f6ab0d@linux.dev> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: MR1P264CA0114.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:50::21) To BLAPR10MB4835.namprd10.prod.outlook.com (2603:10b6:208:331::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BLAPR10MB4835:EE_|DM4PR10MB6063:EE_ X-MS-Office365-Filtering-Correlation-Id: 0e933bff-d750-4a1f-3d21-08dbb8ea336f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Y5cPofcMhwH5XwhkmSqxg5yK0oUkGP8v6ZNHtgD+lOOttU6/7XgbH9dSE2VBFTCnphqKWg2vLl+fQG7UbNtWMTEjx6J6X9KRCZ4PXWCiaBtz69DHzHrA4rajSqjf99D4tNJZ8m4lwVj1jQokxm1CZAzAhI1kDRHqu4bAnOQ/50nnMKfBHHlt0+pmGQ1WQN5DKL1+sN9QcisLFUkOIEUzWHwkeDTkcfkOQaVJzCo2KBCJsCOlsGFcR7suAsO231M61ptSaoZg7X1BeyX0aW29AdMBjLD4bOcSZhcIdroP2QeAzhLXxcNU2AOy+e2Sd6+EKMrTHPHaCQvT90gJZGgnygdQqWo259sW06K0iYkE5ZrIkKFuhvrFGEEH1Yooiq33vDHqmnvEwDIOOEyjJRHe0963A57vnAbx8t9z+ddyNbZmq/FTJsmkj1JUWWFX1N+waFOmNcRA77NspSMHyyWMlEQR6roHauy5QiVQf8g9eDwQ0JVuLIVKZ00exqaUt3aCr/cx2q5sPfscHht7RXGTUG4j8OEa5ZvU79dvAEB7YT2PUZsk2jMBU3EOr0Bx3OYVlZzi2IGXkEzEDPX1lfCpcqM5ckH8SkFxuKOMHmcr5Vrn3f3NUWwph9lxx8GJ/oXvicZmyWsCsw6srPJNZe2rjQ== 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)(396003)(39860400002)(346002)(366004)(376002)(136003)(186009)(1800799009)(451199024)(2616005)(26005)(6506007)(6486002)(53546011)(6512007)(31696002)(36756003)(86362001)(38100700002)(83380400001)(5660300002)(478600001)(7416002)(41300700001)(31686004)(66476007)(66556008)(8676002)(66946007)(110136005)(6636002)(8936002)(4326008)(54906003)(6666004)(2906002)(316002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UEhPUDh6bVl2U0FYWjNIdkEwUlNIc0wzQmN1MDc3bHBUaHprLzZ2SVNpbjNV?= =?utf-8?B?ajVuZ0NQT0ozNHlJUVd0bGM1V0hyV05mNjFpTnA3ekZQamJwbFlrMjBU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ZZk9JaEFGOEtNZUk2NVRxWi85ZGhBYXdU?= =?utf-8?B?VkQzcDZOR0c3VkVsTzNZMXdaNDAxaVRQeEFtYlBIM2pKVGR3MVhndjI5N1BJ?= =?utf-8?Q?pLZMvb9dJsiN1iUfw+A2hbSGvXp?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e933bff-d750-4a1f-3d21-08dbb8ea336f 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:27:03.1014 (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: P6Eqz0JwyLfSyjyKCUJoFNbU6OauEgOHzYYX482rosQJLjPq2eDkJklI/AjHzOTQNQkDLLEM45lQNeZBio12gWqHfamCWIz/yvsDzE7pFRc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR10MB6063 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-2309190070 X-Proofpoint-GUID: Jw1PMmaeKrcuaBrpJIEfyYlT4077gE26 X-Proofpoint-ORIG-GUID: Jw1PMmaeKrcuaBrpJIEfyYlT4077gE26 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email 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 (fry.vger.email [0.0.0.0]); Tue, 19 Sep 2023 01:28:18 -0700 (PDT) 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). Unless this isn't something worth handling Joao