linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-stable-rc:linux-4.4.y 9983/9999] mm/page_alloc.c:2024:2: warning: ISO C90 forbids mixed declarations and code
@ 2019-11-11 18:27 kbuild test robot
  2019-11-12  8:56 ` Mel Gorman
  0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2019-11-11 18:27 UTC (permalink / raw)
  To: Mel Gorman
  Cc: kbuild-all, Greg Kroah-Hartman, Andrew Morton,
	Linux Memory Management List

[-- Attachment #1: Type: text/plain, Size: 6318 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.4.y
head:   56cfa226aa2348915cd4ced0b72542dc35ca2467
commit: df82285ab4b974f2040f31dbabdd11e055a282c2 [9983/9999] mm, meminit: recalculate pcpu batch and high limits after init completes
config: i386-defconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
        git checkout df82285ab4b974f2040f31dbabdd11e055a282c2
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   mm/page_alloc.c: In function 'drain_all_pages':
>> mm/page_alloc.c:2024:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     static cpumask_t cpus_with_pcps;
     ^~~~~~

vim +2024 mm/page_alloc.c

9f8f2172537de7 Christoph Lameter 2008-02-04  1996  
9f8f2172537de7 Christoph Lameter 2008-02-04  1997  /*
74046494ea6867 Gilad Ben-Yossef  2012-03-28  1998   * Spill all the per-cpu pages from all CPUs back into the buddy allocator.
74046494ea6867 Gilad Ben-Yossef  2012-03-28  1999   *
93481ff0e5a0c7 Vlastimil Babka   2014-12-10  2000   * When zone parameter is non-NULL, spill just the single zone's pages.
93481ff0e5a0c7 Vlastimil Babka   2014-12-10  2001   *
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2002   * Note that this code is protected against sending an IPI to an offline
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2003   * CPU but does not guarantee sending an IPI to newly hotplugged CPUs:
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2004   * on_each_cpu_mask() blocks hotplug and won't talk to offlined CPUs but
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2005   * nothing keeps CPUs from showing up after we populated the cpumask and
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2006   * before the call to on_each_cpu_mask().
9f8f2172537de7 Christoph Lameter 2008-02-04  2007   */
93481ff0e5a0c7 Vlastimil Babka   2014-12-10  2008  void drain_all_pages(struct zone *zone)
9f8f2172537de7 Christoph Lameter 2008-02-04  2009  {
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2010  	int cpu;
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2011  
df82285ab4b974 Mel Gorman        2019-11-05  2012  	/*
df82285ab4b974 Mel Gorman        2019-11-05  2013  	 * The number of managed pages has changed due to the initialisation
df82285ab4b974 Mel Gorman        2019-11-05  2014  	 * so the pcpu batch and high limits needs to be updated or the limits
df82285ab4b974 Mel Gorman        2019-11-05  2015  	 * will be artificially small.
df82285ab4b974 Mel Gorman        2019-11-05  2016  	 */
df82285ab4b974 Mel Gorman        2019-11-05  2017  	for_each_populated_zone(zone)
df82285ab4b974 Mel Gorman        2019-11-05  2018  		zone_pcp_update(zone);
df82285ab4b974 Mel Gorman        2019-11-05  2019  
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2020  	/*
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2021  	 * Allocate in the BSS so we wont require allocation in
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2022  	 * direct reclaim path for CONFIG_CPUMASK_OFFSTACK=y
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2023  	 */
74046494ea6867 Gilad Ben-Yossef  2012-03-28 @2024  	static cpumask_t cpus_with_pcps;
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2025  
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2026  	/*
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2027  	 * We don't care about racing with CPU hotplug event
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2028  	 * as offline notification will cause the notified
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2029  	 * cpu to drain that CPU pcps and on_each_cpu_mask
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2030  	 * disables preemption as part of its processing
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2031  	 */
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2032  	for_each_online_cpu(cpu) {
93481ff0e5a0c7 Vlastimil Babka   2014-12-10  2033  		struct per_cpu_pageset *pcp;
93481ff0e5a0c7 Vlastimil Babka   2014-12-10  2034  		struct zone *z;
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2035  		bool has_pcps = false;
93481ff0e5a0c7 Vlastimil Babka   2014-12-10  2036  
93481ff0e5a0c7 Vlastimil Babka   2014-12-10  2037  		if (zone) {
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2038  			pcp = per_cpu_ptr(zone->pageset, cpu);
93481ff0e5a0c7 Vlastimil Babka   2014-12-10  2039  			if (pcp->pcp.count)
93481ff0e5a0c7 Vlastimil Babka   2014-12-10  2040  				has_pcps = true;
93481ff0e5a0c7 Vlastimil Babka   2014-12-10  2041  		} else {
93481ff0e5a0c7 Vlastimil Babka   2014-12-10  2042  			for_each_populated_zone(z) {
93481ff0e5a0c7 Vlastimil Babka   2014-12-10  2043  				pcp = per_cpu_ptr(z->pageset, cpu);
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2044  				if (pcp->pcp.count) {
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2045  					has_pcps = true;
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2046  					break;
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2047  				}
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2048  			}
93481ff0e5a0c7 Vlastimil Babka   2014-12-10  2049  		}
93481ff0e5a0c7 Vlastimil Babka   2014-12-10  2050  
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2051  		if (has_pcps)
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2052  			cpumask_set_cpu(cpu, &cpus_with_pcps);
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2053  		else
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2054  			cpumask_clear_cpu(cpu, &cpus_with_pcps);
74046494ea6867 Gilad Ben-Yossef  2012-03-28  2055  	}
93481ff0e5a0c7 Vlastimil Babka   2014-12-10  2056  	on_each_cpu_mask(&cpus_with_pcps, (smp_call_func_t) drain_local_pages,
93481ff0e5a0c7 Vlastimil Babka   2014-12-10  2057  								zone, 1);
9f8f2172537de7 Christoph Lameter 2008-02-04  2058  }
9f8f2172537de7 Christoph Lameter 2008-02-04  2059  

:::::: The code at line 2024 was first introduced by commit
:::::: 74046494ea68676d29ef6501a4bd950f08112a2c mm: only IPI CPUs to drain local pages if they exist

:::::: TO: Gilad Ben-Yossef <gilad@benyossef.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 23934 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-stable-rc:linux-4.4.y 9983/9999] mm/page_alloc.c:2024:2: warning: ISO C90 forbids mixed declarations and code
  2019-11-11 18:27 [linux-stable-rc:linux-4.4.y 9983/9999] mm/page_alloc.c:2024:2: warning: ISO C90 forbids mixed declarations and code kbuild test robot
@ 2019-11-12  8:56 ` Mel Gorman
  2019-11-12 10:21   ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Mel Gorman @ 2019-11-12  8:56 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: kbuild-all, Andrew Morton, Linux Memory Management List

On Tue, Nov 12, 2019 at 02:27:55AM +0800, kbuild test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.4.y
> head:   56cfa226aa2348915cd4ced0b72542dc35ca2467
> commit: df82285ab4b974f2040f31dbabdd11e055a282c2 [9983/9999] mm, meminit: recalculate pcpu batch and high limits after init completes
> config: i386-defconfig (attached as .config)
> compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
> reproduce:
>         git checkout df82285ab4b974f2040f31dbabdd11e055a282c2
>         # save the attached .config to linux build tree
>         make ARCH=i386 
> 
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
>    mm/page_alloc.c: In function 'drain_all_pages':
> >> mm/page_alloc.c:2024:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
>      static cpumask_t cpus_with_pcps;
>      ^~~~~~
> 

Greg,

It's probably best to drop this patch from 4.4-stable for now. while in
theory the 4.4 kernel is affected, it hasn't been proven and the backport
was not properly evaluated in terms of correctness.

-- 
Mel Gorman
SUSE Labs


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-stable-rc:linux-4.4.y 9983/9999] mm/page_alloc.c:2024:2: warning: ISO C90 forbids mixed declarations and code
  2019-11-12  8:56 ` Mel Gorman
@ 2019-11-12 10:21   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2019-11-12 10:21 UTC (permalink / raw)
  To: Mel Gorman; +Cc: kbuild-all, Andrew Morton, Linux Memory Management List

On Tue, Nov 12, 2019 at 08:56:20AM +0000, Mel Gorman wrote:
> On Tue, Nov 12, 2019 at 02:27:55AM +0800, kbuild test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.4.y
> > head:   56cfa226aa2348915cd4ced0b72542dc35ca2467
> > commit: df82285ab4b974f2040f31dbabdd11e055a282c2 [9983/9999] mm, meminit: recalculate pcpu batch and high limits after init completes
> > config: i386-defconfig (attached as .config)
> > compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
> > reproduce:
> >         git checkout df82285ab4b974f2040f31dbabdd11e055a282c2
> >         # save the attached .config to linux build tree
> >         make ARCH=i386 
> > 
> > If you fix the issue, kindly add following tag
> > Reported-by: kbuild test robot <lkp@intel.com>
> > 
> > All warnings (new ones prefixed by >>):
> > 
> >    mm/page_alloc.c: In function 'drain_all_pages':
> > >> mm/page_alloc.c:2024:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
> >      static cpumask_t cpus_with_pcps;
> >      ^~~~~~
> > 
> 
> Greg,
> 
> It's probably best to drop this patch from 4.4-stable for now. while in
> theory the 4.4 kernel is affected, it hasn't been proven and the backport
> was not properly evaluated in terms of correctness.

Already gone! :)


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-12 10:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-11 18:27 [linux-stable-rc:linux-4.4.y 9983/9999] mm/page_alloc.c:2024:2: warning: ISO C90 forbids mixed declarations and code kbuild test robot
2019-11-12  8:56 ` Mel Gorman
2019-11-12 10:21   ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).