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 06BE9CE7B05 for ; Thu, 28 Sep 2023 08:33:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231271AbjI1IdZ (ORCPT ); Thu, 28 Sep 2023 04:33:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229639AbjI1IdU (ORCPT ); Thu, 28 Sep 2023 04:33:20 -0400 Received: from out-195.mta1.migadu.com (out-195.mta1.migadu.com [95.215.58.195]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1893B7 for ; Thu, 28 Sep 2023 01:33:18 -0700 (PDT) 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=1695889997; 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=EK+Jf0tqtbrhgvVtYbc6M1gK2luKPcAwtjtGkN+0G7E=; b=DyrIRUf26UR/UJTU1Ws6FpvKsQg1V3IOLHQBP6BKhTzqv3DgfxHgWIVDmW9HhYKlmfWGRf cOFntnToBVir4TJMYBQsKAdjlCmjdhRrW1zo3tgjZZoATXInL4qUVAVLFU+7q4QrVuHual DwKiW7TDEJuWib4S5r80VzNQaEeY3J4= From: Yajun Deng To: akpm@linux-foundation.org, rppt@kernel.org Cc: mike.kravetz@oracle.com, muchun.song@linux.dev, willy@infradead.org, david@redhat.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yajun Deng Subject: [PATCH v4 0/2] mm: Don't set and reset page count in MEMINIT_EARLY Date: Thu, 28 Sep 2023 16:33:00 +0800 Message-Id: <20230928083302.386202-1-yajun.deng@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org __init_single_page would set page count and __free_pages_core would reset it. A lot of pages don't need to do this when in MEMINIT_EARLY context. It's unnecessary and time-consuming. The 1st patch is pass page count and reserved to __init_single_page. It's in preparation for the 2nd patch, it didn't change anything. The 2nd patch only set page count for the reserved region, not all of the region. Yajun Deng (2): mm: pass page count and reserved to __init_single_page mm: Init page count in reserve_bootmem_region when MEMINIT_EARLY mm/hugetlb.c | 2 +- mm/internal.h | 8 +++++++- mm/mm_init.c | 38 ++++++++++++++++++++++++-------------- mm/page_alloc.c | 20 ++++++++++++-------- 4 files changed, 44 insertions(+), 24 deletions(-) -- 2.25.1