Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9285498ybi; Wed, 10 Jul 2019 07:45:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwBJt6jAqGOpcW3mcE0GTqPFtjSjygCCAvAs94yO7jSVX62adQkM0KqgR9FTe2qigaMzJ/4 X-Received: by 2002:a17:902:7c90:: with SMTP id y16mr39909897pll.238.1562769907514; Wed, 10 Jul 2019 07:45:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562769907; cv=none; d=google.com; s=arc-20160816; b=S3Pwu0LvzK0mbQUtKwdYAGWa1nW2IeFY22qplyONMBacxetYQuCPBxSSFsb528fkRX we8Io/QkT9bY5LP/yDA1/UwHP0jO07dYAntLLNAqiUWaQ4cON7ygN4ZH0H010TaCht6E rdeGVkzSJvUjbzp+nVuwa8Xcm38l7eSv/H4KrbWzZZQwPcqS/dEn2jNmovTHLVxk018n 9O5l1TIaE1dNrRDFF6tP5FaiI4/ut5vSnXNznXP8RTihlwzs9nL2XwN8Sbwl5TdfDAWn 1suw6Q4PGCrcM4c/5VLZHaa92qOnj5xFhN/Sh19GfGNSCQdpNeeAmgt7cqfDhXvmbu6+ Zgkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Ck/YeyAaKtna4PjEWRnG32x3dv0rmRssT+mcO4Vtd3k=; b=rs2uNcSlMyZ5qQmT1PMyNb2zYzRuGCA/3TIkF3pDI/zYU12K0Joc1MVGEzECKBmR2i 4bc2uWw6Sb8oIhibnbVZmRu3Gsap5qULs1E9BFPurrPsNbErWd4C30CSP/GZbx3EI+5C QwiJyIDejafwmO/cCooNr98+WPEWnq737P4ihXesJMGVqQ8IFqrAxowT+E1B3pFBWli3 Ijnz4G4RXS1VhWUDWK+pNGn+j7ACu7aRrT6ci4ub8zE7cqlpmXm5H5mS6L+BgzvbK0tI TAaFKlPuLAh7mPHX8zb3tmobNOlbzw4Fwobj88lwYvDlkchQX+eUC4JrYRT6F2mWRXM1 UKWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s123si2282895pgs.124.2019.07.10.07.44.50; Wed, 10 Jul 2019 07:45:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727859AbfGJOYz (ORCPT + 99 others); Wed, 10 Jul 2019 10:24:55 -0400 Received: from mx2.suse.de ([195.135.220.15]:47116 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727373AbfGJOYy (ORCPT ); Wed, 10 Jul 2019 10:24:54 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 98CBAAE62; Wed, 10 Jul 2019 14:24:53 +0000 (UTC) Date: Wed, 10 Jul 2019 16:24:52 +0200 From: Michal Hocko To: Denis Efremov Cc: Arun KS , Andrew Morton , Vlastimil Babka , Oscar Salvador , Pavel Tatashin , Mel Gorman , Mike Rapoport , Alexander Duyck , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: remove the exporting of totalram_pages Message-ID: <20190710142452.GN29695@dhcp22.suse.cz> References: <20190710141031.15642-1-efremov@linux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190710141031.15642-1-efremov@linux.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 > --- > 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