From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF3EBCE7A94 for ; Mon, 25 Sep 2023 10:25:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231384AbjIYKZi (ORCPT ); Mon, 25 Sep 2023 06:25:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbjIYKZe (ORCPT ); Mon, 25 Sep 2023 06:25:34 -0400 Received: from out-201.mta1.migadu.com (out-201.mta1.migadu.com [95.215.58.201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB9838E for ; Mon, 25 Sep 2023 03:25:27 -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=1695637526; 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=yxFAw7nLddeOwtmNKD8bf5RBQDwgBmyQvveBR6J5fJc=; b=QrV5dHooV0sNdc21vKmdxXgl33U78NkIKXuflqcD0/5sodkrFghgo3HrHr/RYT4sYAQrN9 QZst+umX1KRxopPYytR1SFUzAQvoDxvIT6dcxH0OuyJOByZNSVAQ9DA4P2WhgWZtm8CS1O IoxDLv+av824/6TvRxNpcQSBen82elM= Mime-Version: 1.0 Subject: Re: [PATCH v5 3/8] hugetlb: perform vmemmap optimization on a list of pages X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: <20230925003953.142620-4-mike.kravetz@oracle.com> Date: Mon, 25 Sep 2023 18:24:39 +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: References: <20230925003953.142620-1-mike.kravetz@oracle.com> <20230925003953.142620-4-mike.kravetz@oracle.com> To: Mike Kravetz X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Sep 25, 2023, at 08:39, Mike Kravetz wrote: > > When adding hugetlb pages to the pool, we first create a list of the > allocated pages before adding to the pool. Pass this list of pages to a > new routine hugetlb_vmemmap_optimize_folios() for vmemmap optimization. > > Due to significant differences in vmemmmap initialization for bootmem > allocated hugetlb pages, a new routine prep_and_add_bootmem_folios > is created. > > We also modify the routine vmemmap_should_optimize() to check for pages > that are already optimized. There are code paths that might request > vmemmap optimization twice and we want to make sure this is not > attempted. > > Signed-off-by: Mike Kravetz Reviewed-by: Muchun Song Thanks.