linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Mel Gorman <mgorman@suse.de>
Cc: kbuild-all@lists.01.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-stable-rc:linux-4.4.y 9983/9999] mm/page_alloc.c:2024:2: warning: ISO C90 forbids mixed declarations and code
Date: Tue, 12 Nov 2019 02:27:55 +0800	[thread overview]
Message-ID: <201911120240.kewQARuu%lkp@intel.com> (raw)

[-- 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 --]

             reply	other threads:[~2019-11-11 18:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11 18:27 kbuild test robot [this message]
2019-11-12  8:56 ` Mel Gorman
2019-11-12 10:21   ` Greg Kroah-Hartman

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=201911120240.kewQARuu%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    /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