From patchwork Tue Mar 21 17:05:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 13182967 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 5E4E9C761AF for ; Tue, 21 Mar 2023 17:05:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F054C6B0082; Tue, 21 Mar 2023 13:05:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EB5096B0083; Tue, 21 Mar 2023 13:05:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D7CCE6B0085; Tue, 21 Mar 2023 13:05:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id C25226B0082 for ; Tue, 21 Mar 2023 13:05:52 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 8D4DC1C1ADC for ; Tue, 21 Mar 2023 17:05:52 +0000 (UTC) X-FDA: 80593532544.30.5318EB5 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf17.hostedemail.com (Postfix) with ESMTP id D9D8D40012 for ; Tue, 21 Mar 2023 17:05:50 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=A9Gkip7t; spf=pass (imf17.hostedemail.com: domain of rppt@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1679418351; 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=kvcwqUrzrhqPvyPskr2rojJqkqhUPb6jqYry2NEmk40=; b=lVbPt+Qtdzs+1yLFF2RUln+3XWdc7yibuOC0WQSybyA86pDk+mgB5vfzi7+PMJbpcb1oMA CGsgoT2/13fdZrfeJ1x0bErDVICP9th6JRa/MTl98bfYs7HeIlox9DnfFYv2clW6Wt35gf Je8lVPriNaYpg9IGEiuxo7/TxrzVfxA= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=A9Gkip7t; spf=pass (imf17.hostedemail.com: domain of rppt@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1679418351; a=rsa-sha256; cv=none; b=knWltrBcp2UqtyZEUC74SYXUTBvEPQNhTYaM5B0XY3vDj0Y3wPW7s6IxjF0AszmjA97+eU fkuW7kvkdhtE4sn81Q6jnCop5nS+MVaTYaGRHQMgoFo2C5d1Ypos0q3kZVpJLJtYQCJDT9 g9IvTg/e5fYw/xAS7TxGdft+CkMCOQY= 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 ams.source.kernel.org (Postfix) with ESMTPS id 74072B818F2; Tue, 21 Mar 2023 17:05:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACEA9C4339E; Tue, 21 Mar 2023 17:05:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679418348; bh=yFWOiCGTMb0kxnXPUeW5UI17+2jMfP/fnjpb1q+J7gk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A9Gkip7tvni7Mnk6n8TnDZm1hR1VR1sJVwbjOXRQMBdSY6XQ/jhJ8WEU/oTZwSlE1 GP/lFo6JYzaIYubsVYtTlwq8hx6XR2v8y1h712a2FPq/Pa6aFUL5xK/t99zP5SJIuD sZvf8FuC7AqYl3VSwrRJSJYzLka8040ITH3d7XbHNuTpDpF3wPabprMDq7Ru72qm6x K62Om+CkOZFw3ZN4t3JSw3GkOICBNja2MmgJ33e9HWVB2x0mXlLMBEa7RGxcSegz3g NEoSCfxTQ69n+/jiDvPFYL2WiWcO7I0PhFAnazvV+AZWMATjfg2SvTCTTdOdaWWfJD 7j6iOQu0oR4Pw== 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 05/14] mm/page_alloc: rename page_alloc_init() to page_alloc_init_cpuhp() Date: Tue, 21 Mar 2023 19:05:04 +0200 Message-Id: <20230321170513.2401534-6-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-Server: rspam07 X-Rspamd-Queue-Id: D9D8D40012 X-Rspam-User: X-Stat-Signature: czsc58pqcgawmur4s6gmnudsr91m3e7k X-HE-Tag: 1679418350-303145 X-HE-Meta: U2FsdGVkX187qMWCNHIE+B4ez1E6sZbLKZxChT+22bjzQcIMOLBUCg5i5L2s1pnv0pufVwIUmTWtatQjlMN+B+JMOp9HxPt4TB7Trh2s6dOylSk2grJoA4JBt86Z4T23HPePLO2OhyVIJCEdx0330vVSDZ0AtsRQoApj9K7zvQkn2wmoxc0R00fFh64F3dFr9lNyEKjR0m53C28g+RW4kVhVuQjv/YaMzrr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Awbpmyx2qdhh+hYJ5Vc8GGm8r9XOk3uQj2jnh+ej9v5U9R7u5zUgrR0MeUQmHGS8S6bguoJf3HXF9nPX82LahzVWaf48AGn31qJRTU= 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)" The page_alloc_init() name is really misleading because all this function does is sets up CPU hotplug callbacks for the page allocator. Rename it to page_alloc_init_cpuhp() so that name will reflect what the function does. Signed-off-by: Mike Rapoport (IBM) Reviewed-by: David Hildenbrand Reviewed-by: Vlastimil Babka --- include/linux/gfp.h | 2 +- init/main.c | 2 +- mm/page_alloc.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 7c554e4bd49f..ed8cb537c6a7 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -319,7 +319,7 @@ extern void page_frag_free(void *addr); #define __free_page(page) __free_pages((page), 0) #define free_page(addr) free_pages((addr), 0) -void page_alloc_init(void); +void page_alloc_init_cpuhp(void); void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp); void drain_all_pages(struct zone *zone); void drain_local_pages(struct zone *zone); diff --git a/init/main.c b/init/main.c index 4425d1783d5c..b2499bee7a3c 100644 --- a/init/main.c +++ b/init/main.c @@ -969,7 +969,7 @@ asmlinkage __visible void __init __no_sanitize_address start_kernel(void) boot_cpu_hotplug_init(); build_all_zonelists(NULL); - page_alloc_init(); + page_alloc_init_cpuhp(); pr_notice("Kernel command line: %s\n", saved_command_line); /* parameters may set static keys */ diff --git a/mm/page_alloc.c b/mm/page_alloc.c index ff6a2fff2880..d1276bfe7a30 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -6383,7 +6383,7 @@ static int page_alloc_cpu_online(unsigned int cpu) return 0; } -void __init page_alloc_init(void) +void __init page_alloc_init_cpuhp(void) { int ret;