Message ID | 20230915221548.552084-1-mike.kravetz@oracle.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1421020vqi; Fri, 15 Sep 2023 18:27:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF1m8Z/zq1ZF7ujSxsMpWQwgZP9zb3Nwcbu06r5XpBgNy/ZDsJGJDf2sU7vuwkEJlvUX3oq X-Received: by 2002:aca:1909:0:b0:3a7:7bd3:7ab7 with SMTP id l9-20020aca1909000000b003a77bd37ab7mr3564482oii.51.1694827648037; Fri, 15 Sep 2023 18:27:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1694827648; cv=pass; d=google.com; s=arc-20160816; b=OSkNzztBaGSbj8ATJHIQPYBw4ltvvC8oyz7Bkkmi5Aely1vE9gHzJRk6W20+sZ8NfH ZucR95JiXerU0sol+8XkoNKY7NlJvJNOF6O5QN9JNgkLfxAgPMPH64ERz83hn5cCCDze 0S1QPcZCZLOIiz1QwfUgMVBJcWxcTV1SwFvHVW9xJ9emJilXKaWYjtTH+ND1/S5Fj87x 4hXf4z0JMBev8cLlNsqUK/n4sn9ROZjk9QFeSUKOmg/rB4pcxFITsVQxbPeBdryLnGph ExstOtUIL4XPqaZztgFdIB1dyR1wpZRMYFOYUVJpXb32t8da4G4RnFZV7g677P/ZsHyQ RADA== 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 :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=qivZngOpRxmOmRzB9eRb63RaXMdYCj2C+bkKYI1jEhI=; fh=P9KIxYAhudlW3Wx0tovcuvkfmD0qjWLQvgGS5BdeQdY=; b=EAtuG0jKZqc2eT5Qg8goHuJhGJZFsw/xpHfblQZWGmxcqmvGiK19F7V4wTYc1UrNO/ NUFitz9O2KQNfG+qdX0HjgoDpCfk8VKXv9j58zfXi5SKcgd5Pe8IV0ppEtOa+7AMQfAq QBKSlxcmKypw7reTJwuizSEIWR+GMfBUHdZsDgnDpsKitw4NUvZSvA4YEOd5+GMOhdrT ekTynF+dAJGasqsWzpEfsssguDs9LZQ2+i+yclc/27FU4SRv0xE2qMkP0bNnZQU5BWvd XO58W4NLuj9HufGsmXezqKaVVjqbNVVY9eW4np5KKLp7a6dLfyUOcimcvvW6DhiKS7uW xnlA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=KSLisCBD; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=IYwAB7yO; 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:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id g7-20020a056a0023c700b0068bf645ac9bsi4177276pfc.238.2023.09.15.18.27.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 18:27:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=KSLisCBD; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=IYwAB7yO; 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:1 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 morse.vger.email (Postfix) with ESMTP id 4F018806AFCA; Fri, 15 Sep 2023 15:18:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238031AbjIOWRf (ORCPT <rfc822;realc9580@gmail.com> + 29 others); Fri, 15 Sep 2023 18:17:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237846AbjIOWQ4 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 15 Sep 2023 18:16:56 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5971483 for <linux-kernel@vger.kernel.org>; Fri, 15 Sep 2023 15:16:50 -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 38FLtxMN026316; Fri, 15 Sep 2023 22:15:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=qivZngOpRxmOmRzB9eRb63RaXMdYCj2C+bkKYI1jEhI=; b=KSLisCBDr2XDJDns2qqzM7IrgtTQoJu+X+Ppe3aMUObiSD/pFbQp73uyjZzO4oWQQ0yI /WS5PV8PT2+fnJFTqDrsgdjglU2p1mrlNwiIbxRSxNEC1CZIUYeN4Z6g/zZRS6RU7nOS D8U0hr/PdihvbODmSMznXEo7HD9jmdJe+gc4/M1bs08dQRmNz3f8iM+8SxNSxvDDWaVn AykxTt4dvU3PHO3viuFdEyxrQ3RLgouSGWfBCl7woQF85H4YrkJOwwz0AyKtxyCImKeK BAVbBj6yWgd3UEN37V/ihRCdEja7FgWLnwm6oZ+zBXtq9Pdodpx2QD53Pki+9g/xzM4m TA== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3t2y7prnyd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Sep 2023 22:15:56 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 38FLFlNV036185; Fri, 15 Sep 2023 22:15:54 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2177.outbound.protection.outlook.com [104.47.59.177]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3t0f5gx8qs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Sep 2023 22:15:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SDiDejKQMqBe4Fr2Js9winF4A6s7Yf6DD8dfZ0LN7whnvWYjUrLaGTo05/q8z7gxFRnyi0rD7/33E4uK69GjzKEwj0x5ruLXT3Y5lhb4akFOakTCbgus6uNJkDOS8wd/zOSk/9gLVAbOHTE1BrFxFZ72OkNzaGHnRSjiE6BLOGuUuj9pj5of+gZ32bBj012pvXoiFz4CztxIs2GnIts1P5UJ1TUZ1j1VSwXyauABcuj836623rhk1zi1MwuJGZEDX4eWTwkfK5pkXoda69iJlfUdfJz6zbTeA+6KJzqDtQWTi8iThnIKYGJ2mb17HdpHJYvK3kfTyaQ3S73Hm/NlpQ== 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=qivZngOpRxmOmRzB9eRb63RaXMdYCj2C+bkKYI1jEhI=; b=nk/avYhMbLJIDsXIUE6ejZkB4IM0syji09H9q1DBkMzeDMSEH52BJfUwf+dOY/t52vuwGC0p+JvRvMW3GYOjPy2G5/tp1IDPu5ADcwgig9lRWqmhqu9YQMchxuc9zg1N7zamZgsauuPrzItYExvrGUbex6bjg1k1OhtQCFCJyC5bPvpwJH8y7ny+QWg7pJnGYuGpurfawkNUpdJPPKk+7JpQs0auwvSKQxHhtKWO+/GjKmyXG/Lxhff07iO3rUdcF7hn8RnXOwLnFwuC5tFB1VyRLjJFSncjxM68h5X6vTUycwLUDWmQzwxFVkxIoTZGF+Q39YCv/Qqup7tsTmgsEQ== 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=qivZngOpRxmOmRzB9eRb63RaXMdYCj2C+bkKYI1jEhI=; b=IYwAB7yOOXcF/POtmf+6+sEUQpVDkwd+ZWP6eBytx/MApV/3GMLDExzSAYAjO508TgR+PGktGNMbu4HZcY5DMkvgkypfsJWLv9e5NZXAkrzEYDNlJsIipg6IM8j/9zysX8vrGQH5/ExS8eg3XsHhHHLaPrB3DfBKXSufR4ni7Pg= Received: from BY5PR10MB4196.namprd10.prod.outlook.com (2603:10b6:a03:20d::23) by MW4PR10MB5861.namprd10.prod.outlook.com (2603:10b6:303:180::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6768.34; Fri, 15 Sep 2023 22:15:52 +0000 Received: from BY5PR10MB4196.namprd10.prod.outlook.com ([fe80::c621:12ca:ba40:9054]) by BY5PR10MB4196.namprd10.prod.outlook.com ([fe80::c621:12ca:ba40:9054%5]) with mapi id 15.20.6792.021; Fri, 15 Sep 2023 22:15:52 +0000 From: Mike Kravetz <mike.kravetz@oracle.com> To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Muchun Song <songmuchun@bytedance.com>, Joao Martins <joao.m.martins@oracle.com>, Oscar Salvador <osalvador@suse.de>, David Hildenbrand <david@redhat.com>, Miaohe Lin <linmiaohe@huawei.com>, David Rientjes <rientjes@google.com>, Anshuman Khandual <anshuman.khandual@arm.com>, Naoya Horiguchi <naoya.horiguchi@linux.dev>, Barry Song <song.bao.hua@hisilicon.com>, Michal Hocko <mhocko@suse.com>, Matthew Wilcox <willy@infradead.org>, Xiongchun Duan <duanxiongchun@bytedance.com>, Andrew Morton <akpm@linux-foundation.org>, Mike Kravetz <mike.kravetz@oracle.com> Subject: [PATCH v3 00/12] Batch hugetlb vmemmap modification operations Date: Fri, 15 Sep 2023 15:15:33 -0700 Message-ID: <20230915221548.552084-1-mike.kravetz@oracle.com> X-Mailer: git-send-email 2.41.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: MW4PR03CA0350.namprd03.prod.outlook.com (2603:10b6:303:dc::25) To BY5PR10MB4196.namprd10.prod.outlook.com (2603:10b6:a03:20d::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR10MB4196:EE_|MW4PR10MB5861:EE_ X-MS-Office365-Filtering-Correlation-Id: b025e1e6-390e-4230-6d18-08dbb63952b6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VwV5NXTK8B2FUqlUp1yTp9INkvxGbBtIUk0jths/YdzzYsqM24OsIliuBvERhxKQDVjNPwCNfAJSvXOE5X4YTQ/3L1mFH8KBIYHBz0TwW00nQQsTDyNlWO219QbcqmNfe+e45bB7p89897oWhmfutQ+x5QQ1l8scVMB1xMv4dByfSb7FDWSEOmYkzkFYIn2L+qq+lMBCVauVdy8tFpOvRdcpL80E6jLPNjdKuQHkLju6ll7XgWS4F+K/FM+PJIRwBLoOzsCle3S+yvJCJQngM6fu7JD6EukgpScFzJgog94/XEjvCb1Kme230mVQtexMN/bQKyNHGVEtVejO1FlVFerK+BimIVMkIGE+K60M0eJCt19SPDnANqBBQL6Fis/jFljZwDL6cFM1xvMyrkzWb7HetiN7vWq6P1HVDagwYdljMkHsjsUOnX7Jp/Fq7hVOgysjTyH8kuYPdXRJ6PtvJdfuRWVyK7z5/1Au7F6SH/eGljNtCodvM9E0aHDr/36fjgjf2LC/Z1ydTbliURZnzyk1Ds+nTPXe05BGWaWuTLMX2nP9D2HsF7TnICjbBY2d X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR10MB4196.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(346002)(39860400002)(366004)(376002)(136003)(451199024)(186009)(1800799009)(44832011)(86362001)(36756003)(66899024)(83380400001)(2906002)(38100700002)(478600001)(1076003)(2616005)(26005)(107886003)(4326008)(6512007)(41300700001)(5660300002)(6506007)(6486002)(8676002)(6666004)(66556008)(316002)(66946007)(8936002)(7416002)(66476007)(54906003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ehoqLybbq/Ebb/l767KoabqZyerg?= =?utf-8?q?gTPNzUEUY9N7lRgNuD8GDy650xGTrxQ//VLUVPccy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TunxeRrFoXGSGutFhh16OMhpKI4irrKH/G?= =?utf-8?q?GaKfnIPuliMhZrgUPoNtc/OYmN0KAp5CGFYg1a5/QSZ3mLgdJgVN2bv3gjuFZjiAL?= =?utf-8?q?kh47eDOvQzjTSta0RDeXMZHyvvUCpgD3pwpXLw5SzmftSKj/upferO3ZU9Z/Ij5t4?= =?utf-8?q?MQSjpreNkV2Ix0WQYEkEE3ME/r09OqRGFH2v/2PuPEeWoBgZE7RRoLHfGQfFuH9Wr?= =?utf-8?q?LZWuJkf9S0UAZD0Gv8BY/QJBfJUPzVLTQrZ4kF26EmyGyadHILO2GpeKfYhEg+CNh?= =?utf-8?q?cs316jns2+JXAL7b8eYJ7+xfSdwAgNtHVD5ptcpEQrAhiOiOIA7JbcfC7evS/b80f?= =?utf-8?q?kb8XaqEa9Q5ptSkKRFcqHNZsVZhzy/CrpiYgUk2e64Fm5T1jFm8L6fCN6Ux74MoLa?= =?utf-8?q?VvEz6gUZf+Ywugiw4MCd3PYvmhSww4dm7kv7uRosmn94EvfnLBF9gpdS4IOAhyyX3?= =?utf-8?q?tSqB2We0zUOH0akFfPjSFquh5Li0eaewXtTZzP38hVNHTZjIr6wPHg0LCcWp3QnRZ?= =?utf-8?q?aOVp9fnQfQyBIVMnaVBu1SJUlnOBcfp62BOM9Xg+wolQX/ymYLvQRaipjQslkXOXE?= =?utf-8?q?jjG0T1XB0j1P?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?utf-8?q?mTt+/mMg5UvWUBu7?= =?utf-8?q?1IKY6DidHzCi+ORlpbCD997YYKMpUOFvZGWKHUXBGLGySHgwJn3Kk4hr4Z0+f4Mb5?= =?utf-8?q?G08WMiLWU5yA4UPmgCbKpWmHfmKJOXavXYBLepn28alg09u9TmlVba7x5l30y8z2i?= =?utf-8?q?X6KIFnTFFae3nk662JejaTFcvV4BBt+45i+7pcMtqSbhbpSVIlTMwMK1/V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j2?= =?utf-8?q?awvlacq3Rc481sgpMV3T67f/4Y6NMaO?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b025e1e6-390e-4230-6d18-08dbb63952b6 X-MS-Exchange-CrossTenant-AuthSource: BY5PR10MB4196.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Sep 2023 22:15:52.2025 (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: JUwb6sULeI+sucv6V8eSoqjZmv/VczSS9mmUZhgEEbqnWx/OA8OzwAq8ZA4v+4rpRf/8Zu0yHae/VN/bOEOX2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR10MB5861 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-15_19,2023-09-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 bulkscore=0 adultscore=0 phishscore=0 spamscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309150200 X-Proofpoint-GUID: ReiDg3TvbRjN485bMLuaAEjvHi7QfA-D X-Proofpoint-ORIG-GUID: ReiDg3TvbRjN485bMLuaAEjvHi7QfA-D 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 morse.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Fri, 15 Sep 2023 15:18:02 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777155595589582388 X-GMAIL-MSGID: 1777155595589582388 |
Series |
Batch hugetlb vmemmap modification operations
|
|
Message
Mike Kravetz
Sept. 15, 2023, 10:15 p.m. UTC
When hugetlb vmemmap optimization was introduced, the overhead of enabling the option was measured as described in commit 426e5c429d16 [1]. The summary states that allocating a hugetlb page should be ~2x slower with optimization and freeing a hugetlb page should be ~2-3x slower. Such overhead was deemed an acceptable trade off for the memory savings obtained by freeing vmemmap pages. It was recently reported that the overhead associated with enabling vmemmap optimization could be as high as 190x for hugetlb page allocations. Yes, 190x! Some actual numbers from other environments are: Bare Metal 8 socket Intel(R) Xeon(R) CPU E7-8895 ------------------------------------------------ Unmodified next-20230824, vm.hugetlb_optimize_vmemmap = 0 time echo 500000 > .../hugepages-2048kB/nr_hugepages real 0m4.119s time echo 0 > .../hugepages-2048kB/nr_hugepages real 0m4.477s Unmodified next-20230824, vm.hugetlb_optimize_vmemmap = 1 time echo 500000 > .../hugepages-2048kB/nr_hugepages real 0m28.973s time echo 0 > .../hugepages-2048kB/nr_hugepages real 0m36.748s VM with 252 vcpus on host with 2 socket AMD EPYC 7J13 Milan ----------------------------------------------------------- Unmodified next-20230824, vm.hugetlb_optimize_vmemmap = 0 time echo 524288 > .../hugepages-2048kB/nr_hugepages real 0m2.463s time echo 0 > .../hugepages-2048kB/nr_hugepages real 0m2.931s Unmodified next-20230824, vm.hugetlb_optimize_vmemmap = 1 time echo 524288 > .../hugepages-2048kB/nr_hugepages real 2m27.609s time echo 0 > .../hugepages-2048kB/nr_hugepages real 2m29.924s In the VM environment, the slowdown of enabling hugetlb vmemmap optimization resulted in allocation times being 61x slower. A quick profile showed that the vast majority of this overhead was due to TLB flushing. Each time we modify the kernel pagetable we need to flush the TLB. For each hugetlb that is optimized, there could be potentially two TLB flushes performed. One for the vmemmap pages associated with the hugetlb page, and potentially another one if the vmemmap pages are mapped at the PMD level and must be split. The TLB flushes required for the kernel pagetable, result in a broadcast IPI with each CPU having to flush a range of pages, or do a global flush if a threshold is exceeded. So, the flush time increases with the number of CPUs. In addition, in virtual environments the broadcast IPI can’t be accelerated by hypervisor hardware and leads to traps that need to wakeup/IPI all vCPUs which is very expensive. Because of this the slowdown in virtual environments is even worse than bare metal as the number of vCPUS/CPUs is increased. The following series attempts to reduce amount of time spent in TLB flushing. The idea is to batch the vmemmap modification operations for multiple hugetlb pages. Instead of doing one or two TLB flushes for each page, we do two TLB flushes for each batch of pages. One flush after splitting pages mapped at the PMD level, and another after remapping vmemmap associated with all hugetlb pages. Results of such batching are as follows: Bare Metal 8 socket Intel(R) Xeon(R) CPU E7-8895 ------------------------------------------------ next-20230824 + Batching patches, vm.hugetlb_optimize_vmemmap = 0 time echo 500000 > .../hugepages-2048kB/nr_hugepages real 0m4.719s time echo 0 > .../hugepages-2048kB/nr_hugepages real 0m4.245s next-20230824 + Batching patches, vm.hugetlb_optimize_vmemmap = 1 time echo 500000 > .../hugepages-2048kB/nr_hugepages real 0m7.267s time echo 0 > .../hugepages-2048kB/nr_hugepages real 0m13.199s VM with 252 vcpus on host with 2 socket AMD EPYC 7J13 Milan ----------------------------------------------------------- next-20230824 + Batching patches, vm.hugetlb_optimize_vmemmap = 0 time echo 524288 > .../hugepages-2048kB/nr_hugepages real 0m2.715s time echo 0 > .../hugepages-2048kB/nr_hugepages real 0m3.186s next-20230824 + Batching patches, vm.hugetlb_optimize_vmemmap = 1 time echo 524288 > .../hugepages-2048kB/nr_hugepages real 0m4.799s time echo 0 > .../hugepages-2048kB/nr_hugepages real 0m5.273s With batching, results are back in the 2-3x slowdown range. This series is based on next-20230913. The first 4 patches of the series are modifications currently going into the mm tree that modify the same area, or fix BUGs hit easily when exercising this series. They are not directly related to the batching changes. Patch 5 (hugetlb: optimize update_and_free_pages_bulk to avoid lock cycles) is where batching changes begin. Changes v2 -> v3: - patch 5 was part of an earlier series that was not picked up. It is included here as it helps with batching optimizations. - patch 6 hugetlb_vmemmap_restore_folios is changed from type void to returning an error code as well as an additional output parameter providing the number folios for which vmemmap was actually restored. The caller can then be more intelligent about processing the list. - patch 9 eliminate local list in vmemmap_restore_pte. The routine hugetlb_vmemmap_optimize_folios checks for ENOMEM and frees accumulated vmemmap pages while processing the list. - patch 10 introduce flags field to struct vmemmap_remap_walk and VMEMMAP_SPLIT_NO_TLB_FLUSH for not flushing during pass to split PMDs. - patch 11 rename flag VMEMMAP_REMAP_NO_TLB_FLUSH and pass in from callers. Changes v1 -> v2: - patch 5 now takes into account the requirement that only compound pages with hugetlb flag set can be passed to vmemmmap routines. This involved separating the 'prep' of hugetlb pages even further. The code dealing with bootmem allocations was also modified so that batching is possible. Adding a 'batch' of hugetlb pages to their respective free lists is now done in one lock cycle. - patch 7 added description of routine hugetlb_vmemmap_restore_folios (Muchun). - patch 8 rename bulk_pages to vmemmap_pages and let caller be responsible for freeing (Muchun) - patch 9 use 'walk->remap_pte' to determine if a split only operation is being performed (Muchun). Removed unused variable and hugetlb_optimize_vmemmap_key (Muchun). - Patch 10 pass 'flags variable' instead of bool to indicate behavior and allow for future expansion (Muchun). Single flag VMEMMAP_NO_TLB_FLUSH. Provide detailed comment about the need to keep old and new vmemmap pages in sync (Muchun). - Patch 11 pass flag variable as in patch 10 (Muchun). Joao Martins (2): hugetlb: batch PMD split for bulk vmemmap dedup hugetlb: batch TLB flushes when freeing vmemmap Johannes Weiner (1): mm: page_alloc: remove pcppage migratetype caching fix Matthew Wilcox (Oracle) (3): hugetlb: Use a folio in free_hpage_workfn() hugetlb: Remove a few calls to page_folio() hugetlb: Convert remove_pool_huge_page() to remove_pool_hugetlb_folio() Mike Kravetz (6): hugetlb: optimize update_and_free_pages_bulk to avoid lock cycles hugetlb: restructure pool allocations hugetlb: perform vmemmap optimization on a list of pages hugetlb: perform vmemmap restoration on a list of pages hugetlb: batch freeing of vmemmap pages hugetlb: batch TLB flushes when restoring vmemmap mm/hugetlb.c | 288 ++++++++++++++++++++++++++++++++----------- mm/hugetlb_vmemmap.c | 255 ++++++++++++++++++++++++++++++++------ mm/hugetlb_vmemmap.h | 16 +++ mm/page_alloc.c | 3 - 4 files changed, 452 insertions(+), 110 deletions(-)
Comments
On 09/15/23 15:15, Mike Kravetz wrote: > The following series attempts to reduce amount of time spent in TLB flushing. > The idea is to batch the vmemmap modification operations for multiple hugetlb > pages. Instead of doing one or two TLB flushes for each page, we do two TLB > flushes for each batch of pages. One flush after splitting pages mapped at > the PMD level, and another after remapping vmemmap associated with all > hugetlb pages. Results of such batching are as follows: > > Joao Martins (2): > hugetlb: batch PMD split for bulk vmemmap dedup > hugetlb: batch TLB flushes when freeing vmemmap > > Johannes Weiner (1): > mm: page_alloc: remove pcppage migratetype caching fix > > Matthew Wilcox (Oracle) (3): > hugetlb: Use a folio in free_hpage_workfn() > hugetlb: Remove a few calls to page_folio() > hugetlb: Convert remove_pool_huge_page() to > remove_pool_hugetlb_folio() > > Mike Kravetz (6): > hugetlb: optimize update_and_free_pages_bulk to avoid lock cycles > hugetlb: restructure pool allocations > hugetlb: perform vmemmap optimization on a list of pages > hugetlb: perform vmemmap restoration on a list of pages > hugetlb: batch freeing of vmemmap pages > hugetlb: batch TLB flushes when restoring vmemmap > > mm/hugetlb.c | 288 ++++++++++++++++++++++++++++++++----------- > mm/hugetlb_vmemmap.c | 255 ++++++++++++++++++++++++++++++++------ > mm/hugetlb_vmemmap.h | 16 +++ > mm/page_alloc.c | 3 - > 4 files changed, 452 insertions(+), 110 deletions(-) Just realized that I should have based this on top of/taken into account this series as well: https://lore.kernel.org/linux-mm/20230913105401.519709-5-usama.arif@bytedance.com/ Sorry! Changes should be minimal, but modifying the same code.