Message ID | 20230922070923.355656-1-yajun.deng@linux.dev |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp5710600vqi; Fri, 22 Sep 2023 09:28:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEOVsohQScFYphJxFi3YDjRgBVkSMNBcW9D8N7C5AGYsxW2/AevK0AlqSnCDlNcf70AB0Qv X-Received: by 2002:a17:902:d4ce:b0:1b8:76ce:9dab with SMTP id o14-20020a170902d4ce00b001b876ce9dabmr8869146plg.41.1695400131076; Fri, 22 Sep 2023 09:28:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695400131; cv=none; d=google.com; s=arc-20160816; b=EMER+KAMJ9djbYQQM3ZvXmnwm8cT3CYUt+C2/4V6x3aVh8xBMIkQA4GXnkJIUXl9QN 2+8JMMcyG2gJLeQ+a2L+lKPx9Jx4AM93rueGXTI/Fzg/IkZ/WuAX/0mIH/zMJwMPBKsH 7+ybeV/1ig3Syq4TxqDz0skN4qstG3Z5TfVn2pNvPrnXahjWfbrzNOHCypT8HObnm9fw lMfO/C/sa/ZagZZaav2KDPmt9Cahp/AlSSay1tHiLWRMOeY0w4pD0Kdc0PQcdLuDg5W8 MVws7T6wo+t85BEj0BI9PQvGqaEpLM/MlM0mJjgkrifMmxNCQ9usEEiW/pJxkYr9pN8V ZpbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=STMVv9/CmiXKMmwvCbzFA6MyMoHyyxo+IXJElKifvKA=; fh=KSy1dDf6lUvgdoPctzpy47/Mjv6bi14N3nvpkZLQDdc=; b=yet5yAMqRqsbgMry7eT8l2oG1uPv3eetnUrzI4Suq9t7WgS2EZVSj6/rFFPT/BKGEX +NouxcKub6LFWWp3aHYG8In7lA17ZAqaN5jbA7B811MHki2hEP9mqC2YN167MyEHrI7e j6QEWByk0Ltidu8PbsM5lHRCDVYFfhImlc87LrMYSZzJAyTh2zhJPLX1XqzRxYGhV4+V eZog67RhVLMjC+IiaTfrgiUQ4cRfOQ9Duidnwb8ft8MVaEbBlc30kTraCp6ucVXTlc3w HFMjQnah8Gr9f7IQFTWtZH1B8U+cMu0qpQECNO2tkRwxvnTlHrbcMbn/c7t1DGXxoXmY ZgFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=j0GTHFYy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id l17-20020a170902f69100b001bb9f190bafsi4494534plg.526.2023.09.22.09.28.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 09:28:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=j0GTHFYy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id 1338E837E67C; Fri, 22 Sep 2023 00:10:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230333AbjIVHJy (ORCPT <rfc822;chrisfriedt@gmail.com> + 30 others); Fri, 22 Sep 2023 03:09:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230000AbjIVHJx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 22 Sep 2023 03:09:53 -0400 Received: from out-218.mta0.migadu.com (out-218.mta0.migadu.com [91.218.175.218]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10F9618F for <linux-kernel@vger.kernel.org>; Fri, 22 Sep 2023 00:09:46 -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=1695366584; 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=STMVv9/CmiXKMmwvCbzFA6MyMoHyyxo+IXJElKifvKA=; b=j0GTHFYy9Rk5aQNPly91khvCvLtwROqnl6vRLK2YLT+q+Ckq9y7J8JmUPeMGSeIGl6ob14 RQel5IHpBuyun/wEWjeoBxFMWPpb5arxb/E6E05pBTu3mlyQ0pzqEI0SX+E2uvTNOdnRHG 8GUu92LCbxLU8/Bk8txAzluhMqfxjas= From: Yajun Deng <yajun.deng@linux.dev> To: akpm@linux-foundation.org, mike.kravetz@oracle.com, muchun.song@linux.dev, glider@google.com, elver@google.com, dvyukov@google.com, rppt@kernel.org, david@redhat.com, osalvador@suse.de Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, Yajun Deng <yajun.deng@linux.dev> Subject: [PATCH 0/4] mm: Don't set and reset page count in MEMINIT_EARLY Date: Fri, 22 Sep 2023 15:09:19 +0800 Message-Id: <20230922070923.355656-1-yajun.deng@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Fri, 22 Sep 2023 00:10:08 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777755887415010984 X-GMAIL-MSGID: 1777755887415010984 |
Series |
mm: Don't set and reset page count in MEMINIT_EARLY
|
|
Message
Yajun Deng
Sept. 22, 2023, 7:09 a.m. UTC
__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 first two patches are in preparation for the next two, they didn't change anything. The third patch only set page count for the reserved region, not all of the region. The fourth patch removes the set paget count in deferred_init_pages. Yajun Deng (4): mm: pass set_count and set_reserved to __init_single_page mm: Introduce MEMINIT_LATE context mm: Set page count and mark page reserved in reserve_bootmem_region mm: don't set page count in deferred_init_pages include/linux/mmzone.h | 1 + mm/hugetlb.c | 2 +- mm/internal.h | 10 +++++--- mm/kmsan/init.c | 2 +- mm/memblock.c | 4 +-- mm/memory_hotplug.c | 2 +- mm/mm_init.c | 57 +++++++++++++++++++++++++----------------- mm/page_alloc.c | 22 +++++++++------- 8 files changed, 59 insertions(+), 41 deletions(-)