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: 13182970 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CA26C7619A for ; Tue, 21 Mar 2023 17:06:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3B99C900002; Tue, 21 Mar 2023 13:06:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 36B2F6B0082; Tue, 21 Mar 2023 13:06:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 231CF900002; Tue, 21 Mar 2023 13:06:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 173C36B007E for ; Tue, 21 Mar 2023 13:06:03 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id A628B120189 for ; Tue, 21 Mar 2023 17:06:02 +0000 (UTC) X-FDA: 80593532964.20.952ABEF Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf19.hostedemail.com (Postfix) with ESMTP id 07DA51A0019 for ; Tue, 21 Mar 2023 17:06:00 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=O1+3RUxV; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf19.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1679418361; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=MttPxKfS7bmKT4fSDkwg48DkJEC0sOYSGnYJY9/40uo=; b=GwCUTXAzcXGAXvlUumdpGHqaD8Wl2l2lsTFJI3k59ojNbytoN4NHwkUGKw7aZKYWAnwK0H 59AcUaW0n0yeoUmgjyUKkSsfKMYtV5MIYJHqaNkZtH80lBrLNZ8n3R1n4tJVdqbUM6FQ7G STrqpAbTIa8EC1OdAJVlbq/C86yxI+Y= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=O1+3RUxV; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf19.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1679418361; a=rsa-sha256; cv=none; b=s9I7F6iYqm01dGedgYdGbbAp2MFn3C42VjRpoxdxnJnqIBFNfzShUYZZ9Wnkh+c7uXPsGY 4iJlzI8wSy0rEm6FjNP2+0OPBfQpHX6M7jtkDtRjOjUAO8ZtIHVd1XLZgY9tO8+K+HQdhh LEMrMdCxZ9v6F6faLX3sqgg6CadVW58= 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 2D19A61D4E; 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-Rspamd-Queue-Id: 07DA51A0019 X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: ob9oqt871zy1r55pqufft8qpys79jfqi X-HE-Tag: 1679418360-896362 X-HE-Meta: U2FsdGVkX195gcEfGD4b3q/sSRq9MKZo+bwQlx3mOsQCBkIU3FZONX0bZAPDfqgcugczhZ6CMQnPB4dyOuykM3l79c26sb9LGh47Jwz8DZHNGDH/2i56y9kULrnnI08fegcZHwYC/aRPaN9OkK9gRGms6usc7KlSj7UBIsG4ZN1O1mIj7+AeFw/O3hHP7TJ4/FJQmOXbyfPgFHdqzpYflar8lgJ76uv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wFmEyZGF6ICLAV37uKXlvEwdku0Xx1NOzk5qlyUm4CveZahdjKThAQxBDXCDuFdIIvtZJPAkYxeOc7z8B+b/wkwQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 */