From patchwork Tue Mar 21 17:05:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 72950 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp1905213wrt; Tue, 21 Mar 2023 10:19:47 -0700 (PDT) X-Google-Smtp-Source: AK7set/jNqO1oB9R6bp1IPML/9ANEZqcyd4qA0bWomqZ0Mhyd1s4yj2TmMqQ9hQFDfIb4QNUSLxC X-Received: by 2002:a17:902:e885:b0:19f:87b5:1873 with SMTP id w5-20020a170902e88500b0019f87b51873mr3740637plg.62.1679419186891; Tue, 21 Mar 2023 10:19:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679419186; cv=none; d=google.com; s=arc-20160816; b=luv8ZCh11xRipk2kMjjsTeI3fmGPqUBx/fvb5YykZez/55nfLn+9J8Q65/TwtKX9iT Fr592cx1Bm2doohw28/aZTzW6QfH9vexEkNt+6yjjd+NQEwXG6uVvEdXU+hkJB5MY70G NqVbyucN18tdwwglq/Xtr4LETgLpQ+ac+Ourzpy6UfWkn6oNY9KceKuF9a1EYl+y82eH vj/XmYZKKpM08mJTg7yNO02GBFDkI80BM2rmpjJVf+cLnNJGN9Ba3mgts9kisnqpKpj/ jiq00SXKIFQmYs/8Z8+mHWSfNVCd1a11MwlCnUPo4LpwP1JXqc6J6RuhlGRV/wv3SrsE EaYg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MttPxKfS7bmKT4fSDkwg48DkJEC0sOYSGnYJY9/40uo=; b=GWS13cjUU1ZfmmJ/OvWU11FX9t8OoFgJXw1iHVfpjwc9IBfDJpLPrqAHXewcgE55G0 nqdzEoS+vSjJapdz9qQHoNTenVtQytac4V3I7bQ8E0X1tVlgTDzUFABIM4f82IYzNb2b bLvMAMdNDOACoc+dSOm0qO4mjMXlhAMED65UhRJ5md30PtlPO91hEDOuaSJ6eXg3w93J eQN4u4pxEsuldLydhgUjgXGQbyKSTRyFoXrH5s0/q4YAWxfUpbRvufuRhkXpba+msjz0 +yO7V265z8ScoellOahvkTrJzXNTs+W01G3k0QTHQ3SYKTVtnpNnsF/kfZx0xfFCFIEC QuIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=O1+3RUxV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l8-20020a170903120800b001a05bb54963si14490262plh.176.2023.03.21.10.19.34; Tue, 21 Mar 2023 10:19:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=O1+3RUxV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230451AbjCURHB (ORCPT + 99 others); Tue, 21 Mar 2023 13:07:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230511AbjCURGk (ORCPT ); Tue, 21 Mar 2023 13:06:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38D7553D8D; Tue, 21 Mar 2023 10:06:02 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8EC1A61D51; Tue, 21 Mar 2023 17:06:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94EA9C433EF; Tue, 21 Mar 2023 17:05:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679418360; bh=l6knMFWLRO6NO1OlV9wEy5NTCDPOQC0mr+EPbgyJTJM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O1+3RUxV8PjdFb2Z3pJU1FBDhbdrnaFRGETGsBn//Zlj51dbwei2/lrw+AKTnP3qK qsLdEwU+0j0zaQJcDaezHRMSOUDut9/IXVVYbHpy6ARc6hmxNtTBb4JqDZdVtaZM6X 76LGkvPoFkzHwg8h5UbNJUW8+gfXg2GYAB0/nU95mx/46l8TKFO3TW0tQbKHq9/HT/ /DtKEAieU2fZHcDcpayxDcyi3p1HUnTgwmMyG/cW7RdQ8qbAjSmtDkYY+EWN8lHthX YILzxaJYNzM6fK66YFzIOp0ztAWP9rSZiErQ/EN26L3SNzNsUPYM70hZHcb757bUb1 OSSJqMpe8djdg== From: Mike Rapoport To: Andrew Morton Cc: David Hildenbrand , Doug Berger , Matthew Wilcox , Mel Gorman , Michal Hocko , Mike Rapoport , Thomas Bogendoerfer , Vlastimil Babka , linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH v2 08/14] mm: call {ptlock,pgtable}_cache_init() directly from mm_core_init() Date: Tue, 21 Mar 2023 19:05:07 +0200 Message-Id: <20230321170513.2401534-9-rppt@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230321170513.2401534-1-rppt@kernel.org> References: <20230321170513.2401534-1-rppt@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760998653119857865?= X-GMAIL-MSGID: =?utf-8?q?1760998653119857865?= From: "Mike Rapoport (IBM)" and drop pgtable_init() as it has no real value and it's name is misleading. Signed-off-by: Mike Rapoport (IBM) Signed-off-by: Mike Rapoport (IBM) Reviewed-by: David Hildenbrand Reviewed-by: Vlastimil Babka --- include/linux/mm.h | 6 ------ mm/mm_init.c | 3 ++- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 2d7f095136fc..c3c67d8bc833 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2782,12 +2782,6 @@ static inline bool ptlock_init(struct page *page) { return true; } static inline void ptlock_free(struct page *page) {} #endif /* USE_SPLIT_PTE_PTLOCKS */ -static inline void pgtable_init(void) -{ - ptlock_cache_init(); - pgtable_cache_init(); -} - static inline bool pgtable_pte_page_ctor(struct page *page) { if (!ptlock_init(page)) diff --git a/mm/mm_init.c b/mm/mm_init.c index bba73f1fb277..f1475413394d 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c @@ -2584,7 +2584,8 @@ void __init mm_core_init(void) */ page_ext_init_flatmem_late(); kmemleak_init(); - pgtable_init(); + ptlock_cache_init(); + pgtable_cache_init(); debug_objects_mem_init(); vmalloc_init(); /* If no deferred init page_ext now, as vmap is fully initialized */