Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp92838rdb; Wed, 18 Oct 2023 20:12:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFYDmFioYi7bUlypdvPRypypMTRzyGTiXCyzETQCXN828wXEKF7L0IEri8FAZNL/Dk52Loc X-Received: by 2002:a17:90a:f481:b0:27d:ae6:229f with SMTP id bx1-20020a17090af48100b0027d0ae6229fmr1115229pjb.41.1697685153681; Wed, 18 Oct 2023 20:12:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697685153; cv=none; d=google.com; s=arc-20160816; b=ykoYGs/ugaXz5AgTh/l6k0myFYoqC5zOGulRAjbc5HHECD+e0LtTLgMQyXKdpw4BSW wGMYiil2+UtONrX6y8Vhxcm+MZ6mB2lPArHkhIRpVV9lfIzPcF7Hxr003M0el89erJW7 Rh+Q07Qlr4qxgucXwwwGwit5KKgX0qUpv72ipbuT0asIxT1qawG5B7A7dnx1DDCTFUjp lL7Wkjp0VApHi0rcYDDm7ncS6RlVHXNW7HU4mywGD1vNXYrHKxNjMh3XzOBYFmUtGHSs VWIsMG2hjg1pvgLP9YbiSIlVYeXy6VzGoY3YwVAe/DwE6nkJ+0h2H8WYHKlcp7LPpya9 gD3w== 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=sdRbdmTqIVWIQiBunchnjyRkLxfYXVSBe4eJv/kibxw=; fh=WHckZaAL4dFl4PKzH4+cy0iVXeukBN0TEFu97vQ1r0U=; b=uuhrLUoOezKscwfowAtQXBFYwzWXRRYTpSXeGaZBZtbbs20rXen1cjuNncIsDwGasc c0XuxO7IAoB4Cr5TjL+iMSUKDXYxZpv6d/ODy7ozi8lvUe1Cn6glfw4XpynYtmjGf7ql bhKB/Cl5Rn7bUiCvEGWtyXaOvF2v+Os26tUulbKa15w6jBLUBArqWBrE037xedASfh02 xdL0dZ2d8X1iSiPDnerd+S/shj3FrfhPVoeWEHHHY8IdpBPf7mo4snJeEv95m5xO7jQT u+1e1fquDgt+AQIBgC7nu4TS23BK5ZP7wUk4lW29Chs92NvfJ2RE7mDYIof/1driExIl UblQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=vHR5GN7t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id nl18-20020a17090b385200b002773f96df0esi1317581pjb.3.2023.10.18.20.12.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 20:12:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=vHR5GN7t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id F413080C7785; Wed, 18 Oct 2023 20:12:28 -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 S232350AbjJSDMP (ORCPT + 99 others); Wed, 18 Oct 2023 23:12:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231421AbjJSDMO (ORCPT ); Wed, 18 Oct 2023 23:12:14 -0400 Received: from out-206.mta1.migadu.com (out-206.mta1.migadu.com [95.215.58.206]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1F189F for ; Wed, 18 Oct 2023 20:12:11 -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=1697685130; 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=sdRbdmTqIVWIQiBunchnjyRkLxfYXVSBe4eJv/kibxw=; b=vHR5GN7t5FJjTs1VvuImp+7zOdtNGQlU0ySVTFZU+yxOoUt2DxLABScqPbYIkzj11DuKZw /gyc2aFR1pFTiC5SteAxlrtBAXD5B945anS0l4FWU0q8MLKEqnHuWgkjei8yr3z0wuncdS B3bWZtfRqaOVgKY+Oys9gr5mtqFt/TM= Mime-Version: 1.0 Subject: Re: [PATCH v8 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: <20231019023113.345257-3-mike.kravetz@oracle.com> Date: Thu, 19 Oct 2023 11:11:06 +0800 Cc: Linux-MM , LKML , Muchun Song , Joao Martins , Konrad Dybcio , Oscar Salvador , David Hildenbrand , Miaohe Lin , David Rientjes , Anshuman Khandual , Naoya Horiguchi , Barry Song <21cnbao@gmail.com>, Michal Hocko , Matthew Wilcox , Xiongchun Duan , Sergey Senozhatsky , Usama Arif , Andrew Morton Content-Transfer-Encoding: 7bit Message-Id: <367C3465-B07D-402A-9647-9E0890130107@linux.dev> References: <20231019023113.345257-1-mike.kravetz@oracle.com> <20231019023113.345257-3-mike.kravetz@oracle.com> To: Mike Kravetz X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-0.8 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]); Wed, 18 Oct 2023 20:12:29 -0700 (PDT) > On Oct 19, 2023, at 10:31, 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 The difference is small compared with v7. So Reviewed-by: Muchun Song Thanks.