From: Michal Hocko <mhocko@kernel.org>
To: Denis Efremov <efremov@linux.com>
Cc: Arun KS <arunks@codeaurora.org>,
Andrew Morton <akpm@linux-foundation.org>,
Vlastimil Babka <vbabka@suse.cz>,
Oscar Salvador <osalvador@suse.de>,
Pavel Tatashin <pavel.tatashin@microsoft.com>,
Mel Gorman <mgorman@techsingularity.net>,
Mike Rapoport <rppt@linux.ibm.com>,
Alexander Duyck <alexander.h.duyck@linux.intel.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: remove the exporting of totalram_pages
Date: Wed, 10 Jul 2019 16:24:52 +0200 [thread overview]
Message-ID: <20190710142452.GN29695@dhcp22.suse.cz> (raw)
In-Reply-To: <20190710141031.15642-1-efremov@linux.com>
On Wed 10-07-19 17:10:31, Denis Efremov wrote:
> Previously totalram_pages was the global variable. Currently,
> totalram_pages is the static inline function from the include/linux/mm.h
> However, the function is also marked as EXPORT_SYMBOL, which is at best
> an odd combination. Because there is no point for the static inline
> function from a public header to be exported, this commit removes the
> EXPORT_SYMBOL() marking. It will be still possible to use the function in
> modules because all the symbols it depends on are exported.
>
> Fixes: ca79b0c211af6 ("mm: convert totalram_pages and totalhigh_pages variables to atomic")
> Signed-off-by: Denis Efremov <efremov@linux.com>
I have to confess I am not entirely sure what the export actually does in this
case. I _think_ it will simply create a symbol and the code will be same
as the static inline. But it certainly is not what we want/need.
Acked-by: Michal Hocko <mhocko@suse.com>
> ---
> mm/page_alloc.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 8e3bc949ebcc..060303496094 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -224,8 +224,6 @@ int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES] = {
> [ZONE_MOVABLE] = 0,
> };
>
> -EXPORT_SYMBOL(totalram_pages);
> -
> static char * const zone_names[MAX_NR_ZONES] = {
> #ifdef CONFIG_ZONE_DMA
> "DMA",
> --
> 2.21.0
--
Michal Hocko
SUSE Labs
prev parent reply other threads:[~2019-07-10 14:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-10 14:10 Denis Efremov
2019-07-10 14:24 ` Michal Hocko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190710142452.GN29695@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=alexander.h.duyck@linux.intel.com \
--cc=arunks@codeaurora.org \
--cc=efremov@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=osalvador@suse.de \
--cc=pavel.tatashin@microsoft.com \
--cc=rppt@linux.ibm.com \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox