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 38CD0EB8FAF for ; Wed, 6 Sep 2023 07:31:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233186AbjIFHbN (ORCPT ); Wed, 6 Sep 2023 03:31:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231543AbjIFHbL (ORCPT ); Wed, 6 Sep 2023 03:31:11 -0400 Received: from out-217.mta1.migadu.com (out-217.mta1.migadu.com [95.215.58.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F9E594 for ; Wed, 6 Sep 2023 00:31:08 -0700 (PDT) Message-ID: <15aeb29a-1201-f86c-2cc5-cc583120fe4e@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1693985466; 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=f3ppfk56efEHNQGtV1sgKxnNQuIzA3XOagl7ZL/qaVE=; b=N1Wxqjk/C0HAV7YtzNKEK7+UYUneBo5JOIPKVEqRDPDAOu0Pflq5G6U6UgqldDbXme1df9 fSojoaocrgtojVLfXJ9RZBqxsmry7PIz4YMd50br8wcous9pqPuq15XMR37TRCbqLPIpRA yZEcdWaE0irdJ28tgXqR/mgkaciiaVs= Date: Wed, 6 Sep 2023 15:30:41 +0800 MIME-Version: 1.0 Subject: Re: [PATCH v2 06/11] hugetlb: perform vmemmap optimization on a list of pages To: Mike Kravetz , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Muchun Song , Joao Martins , Oscar Salvador , David Hildenbrand , Miaohe Lin , David Rientjes , Anshuman Khandual , Naoya Horiguchi , Barry Song , Michal Hocko , Matthew Wilcox , Xiongchun Duan , Andrew Morton References: <20230905214412.89152-1-mike.kravetz@oracle.com> <20230905214412.89152-7-mike.kravetz@oracle.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: <20230905214412.89152-7-mike.kravetz@oracle.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/9/6 05:44, 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. > > 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.