From patchwork Sun Mar 19 21:59:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 71899 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp893447wrt; Sun, 19 Mar 2023 15:06:28 -0700 (PDT) X-Google-Smtp-Source: AK7set/xWVoKRyp1+/pl6Qrq6b9f587IuRwseAyt7zZ1qDjB9jD47PENCuJ4/o4kpsROTRGFJeQL X-Received: by 2002:a17:90b:17c5:b0:23f:abfd:1241 with SMTP id me5-20020a17090b17c500b0023fabfd1241mr2134715pjb.1.1679263588110; Sun, 19 Mar 2023 15:06:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679263588; cv=none; d=google.com; s=arc-20160816; b=o+rq9IUXIyMQBJIvFg32LzJp3Fx3f+ESgxC+tlzgtNIqcWH/2+DUVeVnc51PA5xG2E 5s9+ymLMfsVD4YoonjtRECNJDApXzS9sUgACVrsEO1vlnq7IZL3OEyEIkgqI7/VEZo/j m5t4Od9DKFaABWRkS59xHn2cqfvKQ/RH80hLZ36+/9RESiHtw23mW+Gs32zwV6uvPPuq Fpzz0sQL4YP6AsZhKuieUgmaY7yovHz9XXzNP+ntNk1gtkIgSKHPTLTjp9b0MS78q5Er KUhHRmid0Pxj9IiVilDeAtnTNbYiEEy7FOSryuSdKZrA261cmHdidoTvLWbcBA0zMU6x SJ0Q== 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=p9nYhEji8q09j2pqGE1YEx7t+yWFyRXv7pJkAKXalmU=; b=ldAhBfuns7V18FKCT8HxSp0BQBNKfTW0n7ejqTm1m7/oHMh17O4LPUDdL5ga8GlXJP GDa6GxVjNYoo+lPHW6gt73AuzrYzdLOIPlU/ISd6sBK6dQfje8YHbslIJ4UdJHHG2i3o eNXoZZ54mir3AknsrOGIB4ZZ98cx0Ua82zoXlMO8h3M6598+REugDgrrzQNj3ddjk0GN 9kKF511XTTRqkGiTyru6xl/rYPcmJ/FUj5G+GSFJt5QhQTb63Mw4165ey5D8/6bOIwK1 lJGkNPbY/a2eX7xmZO67jI8MWRg41kp3Dz8loYj84GgZ6pCVi0zikzPOxNXu3FVizcnr WYqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fTcFp2H2; 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 nv15-20020a17090b1b4f00b0023fc5456b4asi18599pjb.63.2023.03.19.15.06.15; Sun, 19 Mar 2023 15:06:28 -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=fTcFp2H2; 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 S230157AbjCSWBW (ORCPT + 99 others); Sun, 19 Mar 2023 18:01:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230285AbjCSWAy (ORCPT ); Sun, 19 Mar 2023 18:00:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0D4B14E86; Sun, 19 Mar 2023 15:00:46 -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 1F40C611D1; Sun, 19 Mar 2023 22:00:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80A58C4339C; Sun, 19 Mar 2023 22:00:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679263244; bh=IbslJwQtSp0K62Trj6TOitHikiCkl9yMUWR56UtzbLs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fTcFp2H2uu/R1vYPaYke53LsDbKWDgvSDvKi6CPldoQ/4qufDzX2VtUQ0zZ1Z/CFN NPPheSGYydZPKT/k0QdXU4FJq87qVBloqwv6g+zJzdsOpy64g6V1HlZIqFHbu5kUo6 MayyWZ9S797/6gOCwr9bEPdKm5KJEZG/tbH4xglxgNkQtyk2r12nS9dYcTgCRKmoHJ /CvzMpSJyTiyHCmEp2VDwtwLtMIjMial4FQA+bZYa9DcemqT0CXTyvjrnGzrs+2T+3 9+Bg3zKcIhgO0QtCAMyQkyUVGz+4V8M3zxYZCvAmlLvmuz8EbA26S/KcwArdLNVJ2r s5tv4IVeWfZ4g== From: Mike Rapoport To: Andrew Morton Cc: David Hildenbrand , 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 06/15] mm/page_alloc: rename page_alloc_init() to page_alloc_init_cpuhp() Date: Sun, 19 Mar 2023 23:59:59 +0200 Message-Id: <20230319220008.2138576-7-rppt@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230319220008.2138576-1-rppt@kernel.org> References: <20230319220008.2138576-1-rppt@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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?1760835496206032623?= X-GMAIL-MSGID: =?utf-8?q?1760835496206032623?= 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 --- 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;