Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp342456rdh; Thu, 23 Nov 2023 05:37:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IF3rK1QhRO/R73PTC6Rbd6p1OWqtaLzdZD5AmMog3bgKzW8DRsjD7+33IGLD3D1zgQKiYcR X-Received: by 2002:a17:902:f805:b0:1cc:3908:2ca7 with SMTP id ix5-20020a170902f80500b001cc39082ca7mr5066712plb.33.1700746632741; Thu, 23 Nov 2023 05:37:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700746632; cv=none; d=google.com; s=arc-20160816; b=EakrFj2F+kHfEEQ/rjT2HGRljcnGpWqOTECBx2jsjKCHpHB8O4uf3zUYLnWSAAs0Po KwIxYikASQ5Dkz9ADgZ3pSdse5k0dUm/k4g/0zFcMsl52RyRBXbWtUqJEKhCbH1GQZjB Mu3pF1Xw9cvTmLzDycjsTFBasTtf9phlv5+RyteIlfpZGT3s6OUYItOLevaRUqcA8Hud zz905NCUtGrNekIxjK149/mauXbCcI9TckgOYn/rg4cyccUeteLa4goUZ+BHXPbmk8eI Ey+fu3p6F41LkcF55URv9X2MpI21MImGXdn+8BamsqtHffIjzXEAsXiimrBu1j+LFP48 wHKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=HH76KM7ghHpttjrPF4dCFO56nBTHd4OZxFz/BIMAGKc=; fh=Mfp6tXIfhm0wKwJBfrCMEq/ET4PmqmqmqGe1ZOy3t1A=; b=QE+JR0jbl48UUp74alz2nZXMQT7a8tXR/Vk56Bg45dVad8Qq+GFbsNT7RHTzHDSfM5 mdaHQMuiCFA3to/WGCqROnkNCSjduc2ZXkDfwgvO0b8BpyQeaJUl3+x1brmom/TRaJdW U9wQokZZkmPoA3XNwH7NuQbs2eaDdi3YYxFtj9RLypzAshcyNoRu+5ulUIBWrk9e5Ehd t/WwICCeCnGlMUEwGGM7JLZ1uKomSpeTto//qZkuuGbHwmxVniBk1NcuxOvwfD69yT/d U+f5VO7zhnlr4I3iBVqTVFQhONEa6/bS/dPMf+trIXwh0QXOyeqygSsSoXfcU11YU3+u LZjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=GXVeyiK0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id u10-20020a170902e5ca00b001c0c86a541asi1212462plf.375.2023.11.23.05.37.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 05:37:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=GXVeyiK0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 3C88B832A00C; Thu, 23 Nov 2023 05:37:07 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345544AbjKWNgg (ORCPT + 99 others); Thu, 23 Nov 2023 08:36:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345501AbjKWNg0 (ORCPT ); Thu, 23 Nov 2023 08:36:26 -0500 Received: from out-175.mta0.migadu.com (out-175.mta0.migadu.com [IPv6:2001:41d0:1004:224b::af]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D77DD40 for ; Thu, 23 Nov 2023 05:36:31 -0800 (PST) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1700746263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=HH76KM7ghHpttjrPF4dCFO56nBTHd4OZxFz/BIMAGKc=; b=GXVeyiK0rc7R4kF855jfXTv6slAM+iTN7yba/bhzrB51BelY7dLn+GMzVGY28gMMRACwqW wx6ZQf9hQFHsYu+ne6n85pObPvr8dJEkSruX6BUAdh8HNjSUAZECLbVBi3B9wZ2kh+GXGL 8UNAScpbb/anNZvItz/59uFMT0Fsij4= From: Gang Li To: Mike Kravetz , Muchun Song , Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Gang Li Subject: [RFC PATCH v1 0/4] hugetlb: parallelize hugetlb page allocation on boot Date: Thu, 23 Nov 2023 21:30:32 +0800 Message-Id: <20231123133036.68540-1-gang.li@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT 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,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Thu, 23 Nov 2023 05:37:07 -0800 (PST) From: Gang Li Inspired by these patches [1][2], this series aims to speed up the initialization of hugetlb during the boot process through parallelization. It is particularly effective in large systems. On a machine equipped with 1TB of memory and two NUMA nodes, the time for hugetlb initialization was reduced from 2 seconds to 1 second. In the future, as memory continues to grow, more and more time can be saved. This series currently focuses on optimizing 2MB hugetlb. Since gigantic pages are few in number, their optimization effects are not as pronounced. We may explore optimizations for gigantic pages in the future. Thanks, Gang Li Gang Li (4): hugetlb: code clean for hugetlb_hstate_alloc_pages hugetlb: split hugetlb_hstate_alloc_pages hugetlb: add timing to hugetlb allocations on boot hugetlb: parallelize hugetlb page allocation mm/hugetlb.c | 191 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 134 insertions(+), 57 deletions(-) -- 2.20.1