Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1127705rdh; Mon, 25 Sep 2023 04:17:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF3+8cmnAuix4N11nzkWP2b/oSyfDGIn+oGdaJgwO9Wwi0/vjMuyD+fbTMQveTIRhOOxnPb X-Received: by 2002:a05:6808:181b:b0:3ae:3bd:d3d2 with SMTP id bh27-20020a056808181b00b003ae03bdd3d2mr8763052oib.10.1695640666401; Mon, 25 Sep 2023 04:17:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695640666; cv=none; d=google.com; s=arc-20160816; b=ICgKRJhRTOVeSHCFuFTxt+uLASGo5I4mCC5QHeAYyifG3tF2Sja2uUhdQqJsymJkJK DOB6q9+4M9TsTIQOKCqGdQ3VWehzEOM2rsvDnsXSuuxqNti/QjjuaDg1KKdPTJ7vsv9p woBPRbNZIAXBQDc5JVljFHYXwY/Y/iitl9nr8p/6sH/RDaKSDRjMVlzdcB2aCr8L05JO RD3fupFBvYAqsloOxfzTjbHHPcTrho+SRw8cReNr7V5PWzxOZ+ss8/xiEpB3GtLavBpS 1GHXC6wm3+5A2qEBDiOef1CMAVAksKDuTEjHBbGEPuvboKw9kCd5FPzdV4SzRrECRmG8 /eBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=kyckiC55caP9KWh/3WatOnX5yiAYCuwEaRClig5LT6Y=; fh=9ftvJNS9qFIaM+eSpgkUvHMv3ZATU5D8HwoX+Af6uRg=; b=l/cwWqF5tVvcJebqDbwQraGqjiOF0xvpzMcihtDLSg4sZKiewqRY8yfAmmaSZwcMlz trfVsOsq6V65MOWF7n90Fvq6WAEftHipMRJ+woJDA9WltGlTxQc8BQkUqlCquz9o+6hV QRbL0jHiVvJGSwOLvR0JvngY3A4txjfGTdQqLGOW2xlcTyMKtKhDOUBNjMt4yTBHKTLQ +WLsWDJAoH2ZXA0NVqXLV6bAUe64U8xc2sIELAtEYQRhEBNXTX85BKMKLTA7dZouvEr9 m0XEts/dL2QuJ6vEsrD25Zp0gMgnw+KRICXrqila/yGQErfFInyrIrYoiiSz45hanG/e loJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ZCi899+4; 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 j11-20020a056a00130b00b0068e47f319d9si10123816pfu.280.2023.09.25.04.17.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 04:17:46 -0700 (PDT) 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=ZCi899+4; 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 358A38075B25; Mon, 25 Sep 2023 01:56:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232959AbjIYI46 (ORCPT + 99 others); Mon, 25 Sep 2023 04:56:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232936AbjIYI45 (ORCPT ); Mon, 25 Sep 2023 04:56:57 -0400 Received: from out-204.mta0.migadu.com (out-204.mta0.migadu.com [IPv6:2001:41d0:1004:224b::cc]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A117DF for ; Mon, 25 Sep 2023 01:56:49 -0700 (PDT) Content-Type: text/plain; charset=us-ascii DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1695632208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kyckiC55caP9KWh/3WatOnX5yiAYCuwEaRClig5LT6Y=; b=ZCi899+4Hxeiwo5hoDEXrXPS765wHNZlDs5vt+ZMbQoCuu3P3uUqcWgF30jTKCbMA9+WtP cEe40Ea8WIWQ5jrUh5it9uKUqewGRRGVZ8BW0ZdfGrz2H98vcgVSNh9sYyDxs5/fvrSxe4 ZwqN9uppcIv1uYipsp++zO5A8YMyUcI= Mime-Version: 1.0 Subject: Re: [PATCH v5 2/8] hugetlb: restructure pool allocations X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: <20230925003953.142620-3-mike.kravetz@oracle.com> Date: Mon, 25 Sep 2023 16:56:03 +0800 Cc: Linux-MM , LKML , Muchun Song , Joao Martins , Oscar Salvador , David Hildenbrand , Miaohe Lin , David Rientjes , Anshuman Khandual , Naoya Horiguchi , Barry Song <21cnbao@gmail.com>, Michal Hocko , Matthew Wilcox , Xiongchun Duan , Andrew Morton Content-Transfer-Encoding: 7bit Message-Id: <9D82738C-AF1D-44E6-8982-8A5A13F04687@linux.dev> References: <20230925003953.142620-1-mike.kravetz@oracle.com> <20230925003953.142620-3-mike.kravetz@oracle.com> To: Mike Kravetz 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 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]); Mon, 25 Sep 2023 01:56:56 -0700 (PDT) > On Sep 25, 2023, at 08:39, Mike Kravetz wrote: > > Allocation of a hugetlb page for the hugetlb pool is done by the routine > alloc_pool_huge_page. This routine will allocate contiguous pages from > a low level allocator, prep the pages for usage as a hugetlb page and > then add the resulting hugetlb page to the pool. > > In the 'prep' stage, optional vmemmap optimization is done. For > performance reasons we want to perform vmemmap optimization on multiple > hugetlb pages at once. To do this, restructure the hugetlb pool > allocation code such that vmemmap optimization can be isolated and later > batched. > > The code to allocate hugetlb pages from bootmem was also modified to > allow batching. > > No functional changes, only code restructure. > > Signed-off-by: Mike Kravetz Reviewed-by: Muchun Song Thanks.