From patchwork Thu Jun 29 10:43:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13296856 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 7E3E4EB64D9 for ; Thu, 29 Jun 2023 10:29:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A3BB38D0003; Thu, 29 Jun 2023 06:29:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9EBC78D0001; Thu, 29 Jun 2023 06:29:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8DA478D0003; Thu, 29 Jun 2023 06:29:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 7FF458D0001 for ; Thu, 29 Jun 2023 06:29:47 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 3C60DA0DD4 for ; Thu, 29 Jun 2023 10:29:47 +0000 (UTC) X-FDA: 80955414414.06.AE2D869 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf18.hostedemail.com (Postfix) with ESMTP id 8576B1C001A for ; Thu, 29 Jun 2023 10:29:44 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf18.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1688034585; 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-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=vkgKP77SDnEhj4rS0VRn4p/ovz+0zkidAvOxOJalkuI=; b=A185G5UuWCTc1yUBemOvXoKykf15Dcb98xkMkxJTvdaLdo1KekiKZTyyl8YsqaJv/1uo7j gAVg8sQc/mXLlEIEpzzSD+be9sXO4EnYjaEk79WF1ccpofwMWPE2sKbcEhmvEWLLST9t0U N/VLMO9vP3Uq/6E9HjUP2DjvWzkNOrY= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf18.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1688034585; a=rsa-sha256; cv=none; b=ag/1IFR7XiLj8bRH7TTUSgfnn/+3I7qjuLU57CNab94J3BM8zB21VsUnZsv4Ia4qvhaxZd pGzqVNkOh1KUvLkuVT0yidC7+J+gGDH48HGURg52poYFz/3Q1kEi9kk7xdl3zwKQOvb/yo bkX69Tieov2X+1gvDgYiWnGkiZRy+TU= Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4QsF736dJkz1HCTM; Thu, 29 Jun 2023 18:29:19 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm100001.china.huawei.com (7.185.36.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 29 Jun 2023 18:29:37 +0800 From: Kefeng Wang To: Andrew Morton CC: , , , Greg Kroah-Hartman , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Kefeng Wang Subject: [PATCH 1/2] mm: remove arguments of show_mem() Date: Thu, 29 Jun 2023 18:43:56 +0800 Message-ID: <20230629104357.35455-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 8576B1C001A X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: phk3my36sjg6r5rnzkhr843cn5ubcqto X-HE-Tag: 1688034584-341945 X-HE-Meta: U2FsdGVkX1/TCnaZyHeIb1LSj8PEih/3CNGUAGSy9vcVwWSwOW8GAWiM+6ewxA1hbt5bctFjgqtoTJpzZuv7S0uMehCmng8q1cxX8JasD+L1KKn3vYtGhw4hkni7EpkY3ptq+SkYGXxxEpP4YEl4W/xyuL4luZ2D16UFpZf4MUz/0GqkEMIWDWsEnRNs8+gcX6h5GVn0gEOb/kMnE9whdN56uRKxNx8LdEQz1zz0LqHWcOgbyPbEOB9vrQRhBJaz0cfFqq4zQvrEAIkpaBnd69/FbcC+cjgVyTkMow7hy6CtUIbyNXs08DwxBgie/obFKZ1mx+3RqhqwyuxeW2jZInzZqOcCwYUZUnM9lRQ8rWxU/Tf82OjzAbkvWEtadEWbW6gcRNXrfOS9JRc4se9KQKfufQT5B2c0gnWMY76xdEmPFcDIT1Sg9QPakXJPTdvXlvbGMagr/CtmqXYSB+wQ+QKk4SGARHN/dhEX9bBSRLjn6SQbnrMCDUWqCaScE8RhEGMSt20iCZKd88sfVyd86OI5Ql6iL6fBEUHjb98MgOA7RZqX3pjBzXlt48r6tl+wGFFeCt8eDyZ83QJOgI9nsF6LMnEPvGdNUb9EKdcE/EVmjRvH8gEoFZkJ3uuY50CZtVhLhR0xNM/2NQGafHJ1jbCmjnvD/4BU1iSfyvjchFNW4yvd/N+S7XrcGycZKwgkQaoWwG7AY0BGGbFnAugoCbU1rx7iXX3abM3YXGslYvFt8BJ80sr1g4yH7Cjl90bOidVtgdXF20aGwzRczjvf95T66Wb0gpYQfoy/ncwjHKLa6X5PkPKm9izeic+WUdZ9jnIHN7J8CQTLoFcNEitFME6IcgHDKp8R22sjSvdYvvcJ6/okZqbqFnUJwOCOw1LJUCJ4cPZUEeRT0sb5AaCLLCnacmoDrYn3Kd1TzNXodtpPS5fTxtqidY5MFiPAg/+1owkpm2g80WwlTn1DQzb pwwjkPrl qvmDoOUqsxWUzFAhQIkYqEy1aA+uWG7Pq+n7wkOE7FZEkJKNJx6l6xr7178+A02RtWHxEp3wK5janBe4ZENd8qVdklgOlsIGfB+pDhu7+WoRzuHokZr42hZhRmEByitUTEi/YsuOMLBzR7CZeydgvTZLtPlJ0cG++NWboGX/GFfd58460sK0cR34eEkzOqeUpi+bp 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: Directly call __show_mem(0, NULL, MAX_NR_ZONES - 1) in show_mem() to remove the arguments of show_mem(). Signed-off-by: Kefeng Wang --- arch/powerpc/xmon/xmon.c | 2 +- drivers/tty/sysrq.c | 2 +- drivers/tty/vt/keyboard.c | 2 +- include/linux/mm.h | 4 ++-- init/initramfs.c | 2 +- kernel/panic.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index fae747cc57d2..ee17270d35d0 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -1084,7 +1084,7 @@ cmds(struct pt_regs *excp) memzcan(); break; case 'i': - show_mem(0, NULL); + show_mem(); break; default: termch = cmd; diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c index b6e70c5cfa17..e1df63a88aac 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c @@ -342,7 +342,7 @@ static const struct sysrq_key_op sysrq_ftrace_dump_op = { static void sysrq_handle_showmem(int key) { - show_mem(0, NULL); + show_mem(); } static const struct sysrq_key_op sysrq_showmem_op = { .handler = sysrq_handle_showmem, diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c index be8313cdbac3..358f216c6cd6 100644 --- a/drivers/tty/vt/keyboard.c +++ b/drivers/tty/vt/keyboard.c @@ -606,7 +606,7 @@ static void fn_scroll_back(struct vc_data *vc) static void fn_show_mem(struct vc_data *vc) { - show_mem(0, NULL); + show_mem(); } static void fn_show_state(struct vc_data *vc) diff --git a/include/linux/mm.h b/include/linux/mm.h index eef34f6a0351..ddb140e14f3a 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -3047,9 +3047,9 @@ extern void mem_init(void); extern void __init mmap_init(void); extern void __show_mem(unsigned int flags, nodemask_t *nodemask, int max_zone_idx); -static inline void show_mem(unsigned int flags, nodemask_t *nodemask) +static inline void show_mem(void) { - __show_mem(flags, nodemask, MAX_NR_ZONES - 1); + __show_mem(0, NULL, MAX_NR_ZONES - 1); } extern long si_mem_available(void); extern void si_meminfo(struct sysinfo * val); diff --git a/init/initramfs.c b/init/initramfs.c index e7a01c2ccd1b..8d0fd946cdd2 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -61,7 +61,7 @@ static void __init error(char *x) } #define panic_show_mem(fmt, ...) \ - ({ show_mem(0, NULL); panic(fmt, ##__VA_ARGS__); }) + ({ show_mem(); panic(fmt, ##__VA_ARGS__); }) /* link hash */ diff --git a/kernel/panic.c b/kernel/panic.c index 10effe40a3fa..07239d4ad81e 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -216,7 +216,7 @@ static void panic_print_sys_info(bool console_flush) show_state(); if (panic_print & PANIC_PRINT_MEM_INFO) - show_mem(0, NULL); + show_mem(); if (panic_print & PANIC_PRINT_TIMER_INFO) sysrq_timer_list_show(); From patchwork Thu Jun 29 10:43:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13296855 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 9BDD7EB64DD for ; Thu, 29 Jun 2023 10:29:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E32958D0001; Thu, 29 Jun 2023 06:29:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DE2D18D0005; Thu, 29 Jun 2023 06:29:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CD1BF8D0001; Thu, 29 Jun 2023 06:29:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id B1FE48D0005 for ; Thu, 29 Jun 2023 06:29:47 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 78BF780E89 for ; Thu, 29 Jun 2023 10:29:47 +0000 (UTC) X-FDA: 80955414414.28.4573DC5 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf07.hostedemail.com (Postfix) with ESMTP id BF4F740003 for ; Thu, 29 Jun 2023 10:29:43 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf07.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1688034585; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oJJfgsfgkH/X0UA1b55zdiVQs1EUi80mLrDPWu5eYQI=; b=k1hdWtG9U1uv5MELmgBONWcyEkX4fJ8iw6nbVhtO3gLJiabsDlPQPYTlSmnAeV9edCuctz zuWLQSAy2Sw2g+52VXklJTf6+KGz94f2H0Dj3nX3xZDoUy7b1MAepg9WCwTEiAlHkdO9Uk QMXFTmiEwiuYwANzTgn+B4OZQmbjchA= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf07.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1688034585; a=rsa-sha256; cv=none; b=bwU4zVV6PrMVHQJ45btFx48Tc6wuOalgS6lMU2k2XevpxNDAKNLzyvv8H2j7nNmmz1Emkm cjxT96h4w5Id9gPyH77lF7Ym8f8p2G8ycY5WPDatBOUYAUS4PwX9/6Jrmy6Sg7tdlNTFFf Sj/DkA5IyWqrZKULcs3N8Z1FYEPEMZU= Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4QsF4D3ZqWzqVBq; Thu, 29 Jun 2023 18:26:52 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm100001.china.huawei.com (7.185.36.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 29 Jun 2023 18:29:37 +0800 From: Kefeng Wang To: Andrew Morton CC: , , , Greg Kroah-Hartman , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Kefeng Wang Subject: [PATCH 2/2] mm: make show_free_areas() static Date: Thu, 29 Jun 2023 18:43:57 +0800 Message-ID: <20230629104357.35455-2-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230629104357.35455-1-wangkefeng.wang@huawei.com> References: <20230629104357.35455-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: BF4F740003 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: xna3h4hy5dwd5hyq5qzz7bjwqehi1ujn X-HE-Tag: 1688034583-573052 X-HE-Meta: U2FsdGVkX1/06v3o1B57FNei1SUEQ/I5d1rF8OrfuutZ7v251QaePaXS1fRrmt006KfA5BSQiYZie7LiTSApo/D/yUxcP4D9Vz9itUuFxjjYABRVpwDWsGDD3EA1qEY0M+bRJ9b3JFd43Tuk1KJT2zw06mawO3qlKJaZRbBFcWAXrZ9YYEtXPolWXCkRWnDJIgeBAPRPfXsHBo2CtbZqdkUgF5/gBCMGIq3unastwIXvr8Zr8GZzh/HcQ4n/QPtoPxt9yPkDZchTVD19DuNrFCPrmNIYYNM03/YD/EFe/S9/Px87TdSR3o36d6MU3XqXtIhvXJQEcnYOR68ZK/UdGDasrWT/SddL8zJD+ea931gfxwueJDUrYRa51r2IdDaw049E/KDnX5SFbST9ih/p5zFLz9m7aW3yt0H6JiQra7pOoph5HEWb2s8m0sypi9E2seoMQcVpz/A9vsXc3j7hHB6OrkOC7hfhTcoAOzF6gDACRLwa/wgjhRSpGqotvTsO6/a/vcHkM5qKMSuwBHQk2ZgYlETgveKJbj2U228NbSaKZLUGpqvRSbuBWeBcuV27kWwWcBxcx2UJn6cAwD9ZT7G5S+sYxnmf39Xf14nGWNUE3l5YmEGqEqHsyVGoQVcrr3/mNfmB+0KgL0NaJtmeTMa0Avbr+zjEZymMoyXhMECom0n6/rFEXcRB7PLEo4a6xkAmUJW5hiUNRBtGQQvusHCTWMj2fsobwhACni0w/ZmLJ5+5IhW/CP9LhgCrgTnEa8jVZ/dZCy//0kwmZP/uxnL01ICim4p3kcjJ19VVsIxpOhZUpJoC43GZWIEvO4XRTzfM7IXgfB3uIqcn9g1cUZLxSGxowzDXb/tXbUr/osgekOpRALiDoUluVVC+izhsrALn6IoDLMQj3oNqpvNYj+Jc/+0Trb3ZHU7B8HkO/JhP6rJzbkcnc18pfQNv/yNeqWaTv3AYzuLYH4WluSs hVZj6VgW s16GQzvVW93VgsX9Gpkkk0pU7CQnyt6orf6B3PQQYFOoOcav/krgY4bI2l49zN1jw6eIdBvHtkw8Ma1iSs7DhQ3+p04EI9Wj6FEpiwT0Po+yG/X0fF6k8OJbL56ijoZ/DRGa9gpysuchFr1IKHkzuUmoIwa5BhmadKtHULXGGbbvh+rS+mIP2VYFLsQuh43L6fPjM 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: Directly use show_mem() instead of show_free_areas(0, NULL), then make show_free_areas() a static function. Signed-off-by: Kefeng Wang --- arch/sparc/kernel/setup_32.c | 2 +- include/linux/mm.h | 12 ------------ mm/internal.h | 6 ++++++ mm/nommu.c | 6 +++--- mm/show_mem.c | 4 ++-- 5 files changed, 12 insertions(+), 18 deletions(-) diff --git a/arch/sparc/kernel/setup_32.c b/arch/sparc/kernel/setup_32.c index 1adf5c1c16b8..34ef7febf0d5 100644 --- a/arch/sparc/kernel/setup_32.c +++ b/arch/sparc/kernel/setup_32.c @@ -83,7 +83,7 @@ static void prom_sync_me(void) "nop\n\t" : : "r" (&trapbase)); prom_printf("PROM SYNC COMMAND...\n"); - show_free_areas(0, NULL); + show_mem(); if (!is_idle_task(current)) { local_irq_enable(); ksys_sync(); diff --git a/include/linux/mm.h b/include/linux/mm.h index ddb140e14f3a..0a1314a3ffae 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2218,18 +2218,6 @@ extern void pagefault_out_of_memory(void); #define offset_in_thp(page, p) ((unsigned long)(p) & (thp_size(page) - 1)) #define offset_in_folio(folio, p) ((unsigned long)(p) & (folio_size(folio) - 1)) -/* - * Flags passed to show_mem() and show_free_areas() to suppress output in - * various contexts. - */ -#define SHOW_MEM_FILTER_NODES (0x0001u) /* disallowed nodes */ - -extern void __show_free_areas(unsigned int flags, nodemask_t *nodemask, int max_zone_idx); -static void __maybe_unused show_free_areas(unsigned int flags, nodemask_t *nodemask) -{ - __show_free_areas(flags, nodemask, MAX_NR_ZONES - 1); -} - /* * Parameter block passed down to zap_pte_range in exceptional cases. */ diff --git a/mm/internal.h b/mm/internal.h index a7d9e980429a..721ed07d7fd6 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -61,6 +61,12 @@ void page_writeback_init(void); #define COMPOUND_MAPPED 0x800000 #define FOLIO_PAGES_MAPPED (COMPOUND_MAPPED - 1) +/* + * Flags passed to __show_mem() and show_free_areas() to suppress output in + * various contexts. + */ +#define SHOW_MEM_FILTER_NODES (0x0001u) /* disallowed nodes */ + /* * How many individual pages have an elevated _mapcount. Excludes * the folio's entire_mapcount. diff --git a/mm/nommu.c b/mm/nommu.c index f670d9979a26..5b179234ce89 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -990,7 +990,7 @@ static int do_mmap_private(struct vm_area_struct *vma, enomem: pr_err("Allocation of length %lu from process %d (%s) failed\n", len, current->pid, current->comm); - show_free_areas(0, NULL); + show_mem(); return -ENOMEM; } @@ -1223,13 +1223,13 @@ unsigned long do_mmap(struct file *file, kmem_cache_free(vm_region_jar, region); pr_warn("Allocation of vma for %lu byte allocation from process %d failed\n", len, current->pid); - show_free_areas(0, NULL); + show_mem(); return -ENOMEM; error_getting_region: pr_warn("Allocation of vm region for %lu byte allocation from process %d failed\n", len, current->pid); - show_free_areas(0, NULL); + show_mem(); return -ENOMEM; error_vma_iter_prealloc: diff --git a/mm/show_mem.c b/mm/show_mem.c index 01f8e9905817..09c7d036d49e 100644 --- a/mm/show_mem.c +++ b/mm/show_mem.c @@ -186,7 +186,7 @@ static bool node_has_managed_zones(pg_data_t *pgdat, int max_zone_idx) * SHOW_MEM_FILTER_NODES: suppress nodes that are not allowed by current's * cpuset. */ -void __show_free_areas(unsigned int filter, nodemask_t *nodemask, int max_zone_idx) +static void show_free_areas(unsigned int filter, nodemask_t *nodemask, int max_zone_idx) { unsigned long free_pcp = 0; int cpu, nid; @@ -406,7 +406,7 @@ void __show_mem(unsigned int filter, nodemask_t *nodemask, int max_zone_idx) struct zone *zone; printk("Mem-Info:\n"); - __show_free_areas(filter, nodemask, max_zone_idx); + show_free_areas(filter, nodemask, max_zone_idx); for_each_populated_zone(zone) {