All of lore.kernel.org
 help / color / mirror / Atom feed
* [mel:mm-percpu-local_lock-v4r4 22/29] mm/vmstat.c:1018:13: error: invalid storage class for function 'fill_contig_page_info'
@ 2021-04-19 16:14 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-04-19 16:14 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mel/linux.git mm-percpu-local_lock-v4r4
head:   85d43239ceaed47c1a4e646aba1ebc09ad46734e
commit: c1617f38ab5c8401a4d5c6288c59aaf02e2a6788 [22/29] mm/vmstat: Convert NUMA statistics to basic NUMA counters
config: i386-randconfig-r001-20210419 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/mel/linux.git/commit/?id=c1617f38ab5c8401a4d5c6288c59aaf02e2a6788
        git remote add mel https://git.kernel.org/pub/scm/linux/kernel/git/mel/linux.git
        git fetch --no-tags mel mm-percpu-local_lock-v4r4
        git checkout c1617f38ab5c8401a4d5c6288c59aaf02e2a6788
        # save the attached .config to linux build tree
        make W=1 W=1 ARCH=i386 

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

All errors (new ones prefixed by >>):

   mm/vmstat.c: In function 'refresh_cpu_vm_stats':
   mm/vmstat.c:781:34: warning: unused variable 'pcp' [-Wunused-variable]
     781 |   struct per_cpu_pages __percpu *pcp = zone->per_cpu_pageset;
         |                                  ^~~
   mm/vmstat.c: In function 'cpu_vm_stats_fold':
   mm/vmstat.c:913:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     913 | void drain_zonestat(struct zone *zone, struct per_cpu_zonestat *pzstats)
         | ^~~~
>> mm/vmstat.c:1018:13: error: invalid storage class for function 'fill_contig_page_info'
    1018 | static void fill_contig_page_info(struct zone *zone,
         |             ^~~~~~~~~~~~~~~~~~~~~
>> mm/vmstat.c:1052:12: error: invalid storage class for function '__fragmentation_index'
    1052 | static int __fragmentation_index(unsigned int order, struct contig_page_info *info)
         |            ^~~~~~~~~~~~~~~~~~~~~
>> mm/vmstat.c:1338:14: error: invalid storage class for function 'frag_start'
    1338 | static void *frag_start(struct seq_file *m, loff_t *pos)
         |              ^~~~~~~~~~
>> mm/vmstat.c:1351:14: error: invalid storage class for function 'frag_next'
    1351 | static void *frag_next(struct seq_file *m, void *arg, loff_t *pos)
         |              ^~~~~~~~~
>> mm/vmstat.c:1359:13: error: invalid storage class for function 'frag_stop'
    1359 | static void frag_stop(struct seq_file *m, void *arg)
         |             ^~~~~~~~~
>> mm/vmstat.c:1367:13: error: invalid storage class for function 'walk_zones_in_node'
    1367 | static void walk_zones_in_node(struct seq_file *m, pg_data_t *pgdat,
         |             ^~~~~~~~~~~~~~~~~~
>> mm/vmstat.c:1389:13: error: invalid storage class for function 'frag_show_print'
    1389 | static void frag_show_print(struct seq_file *m, pg_data_t *pgdat,
         |             ^~~~~~~~~~~~~~~
>> mm/vmstat.c:1403:12: error: invalid storage class for function 'frag_show'
    1403 | static int frag_show(struct seq_file *m, void *arg)
         |            ^~~~~~~~~
>> mm/vmstat.c:1410:13: error: invalid storage class for function 'pagetypeinfo_showfree_print'
    1410 | static void pagetypeinfo_showfree_print(struct seq_file *m,
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> mm/vmstat.c:1453:12: error: invalid storage class for function 'pagetypeinfo_showfree'
    1453 | static int pagetypeinfo_showfree(struct seq_file *m, void *arg)
         |            ^~~~~~~~~~~~~~~~~~~~~
>> mm/vmstat.c:1469:13: error: invalid storage class for function 'pagetypeinfo_showblockcount_print'
    1469 | static void pagetypeinfo_showblockcount_print(struct seq_file *m,
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> mm/vmstat.c:1502:12: error: invalid storage class for function 'pagetypeinfo_showblockcount'
    1502 | static int pagetypeinfo_showblockcount(struct seq_file *m, void *arg)
         |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> mm/vmstat.c:1523:13: error: invalid storage class for function 'pagetypeinfo_showmixedcount'
    1523 | static void pagetypeinfo_showmixedcount(struct seq_file *m, pg_data_t *pgdat)
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> mm/vmstat.c:1547:12: error: invalid storage class for function 'pagetypeinfo_show'
    1547 | static int pagetypeinfo_show(struct seq_file *m, void *arg)
         |            ^~~~~~~~~~~~~~~~~
>> mm/vmstat.c:1566:11: error: initializer element is not constant
    1566 |  .start = frag_start,
         |           ^~~~~~~~~~
   mm/vmstat.c:1566:11: note: (near initialization for 'fragmentation_op.start')
   mm/vmstat.c:1567:10: error: initializer element is not constant
    1567 |  .next = frag_next,
         |          ^~~~~~~~~
   mm/vmstat.c:1567:10: note: (near initialization for 'fragmentation_op.next')
   mm/vmstat.c:1568:10: error: initializer element is not constant
    1568 |  .stop = frag_stop,
         |          ^~~~~~~~~
   mm/vmstat.c:1568:10: note: (near initialization for 'fragmentation_op.stop')
   mm/vmstat.c:1569:10: error: initializer element is not constant
    1569 |  .show = frag_show,
         |          ^~~~~~~~~
   mm/vmstat.c:1569:10: note: (near initialization for 'fragmentation_op.show')
   mm/vmstat.c:1573:11: error: initializer element is not constant
    1573 |  .start = frag_start,
         |           ^~~~~~~~~~
   mm/vmstat.c:1573:11: note: (near initialization for 'pagetypeinfo_op.start')
   mm/vmstat.c:1574:10: error: initializer element is not constant
    1574 |  .next = frag_next,
         |          ^~~~~~~~~
   mm/vmstat.c:1574:10: note: (near initialization for 'pagetypeinfo_op.next')
   mm/vmstat.c:1575:10: error: initializer element is not constant
    1575 |  .stop = frag_stop,
         |          ^~~~~~~~~
   mm/vmstat.c:1575:10: note: (near initialization for 'pagetypeinfo_op.stop')
   mm/vmstat.c:1576:10: error: initializer element is not constant
    1576 |  .show = pagetypeinfo_show,
         |          ^~~~~~~~~~~~~~~~~
   mm/vmstat.c:1576:10: note: (near initialization for 'pagetypeinfo_op.show')
>> mm/vmstat.c:1579:13: error: invalid storage class for function 'is_zone_first_populated'
    1579 | static bool is_zone_first_populated(pg_data_t *pgdat, struct zone *zone)
         |             ^~~~~~~~~~~~~~~~~~~~~~~
>> mm/vmstat.c:1593:13: error: invalid storage class for function 'zoneinfo_show_print'
    1593 | static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
         |             ^~~~~~~~~~~~~~~~~~~
>> mm/vmstat.c:1685:12: error: invalid storage class for function 'zoneinfo_show'
    1685 | static int zoneinfo_show(struct seq_file *m, void *arg)
         |            ^~~~~~~~~~~~~
   mm/vmstat.c:1693:11: error: initializer element is not constant
    1693 |  .start = frag_start, /* iterate over all zones. The same as in
         |           ^~~~~~~~~~
   mm/vmstat.c:1693:11: note: (near initialization for 'zoneinfo_op.start')
   mm/vmstat.c:1695:10: error: initializer element is not constant
    1695 |  .next = frag_next,
         |          ^~~~~~~~~
   mm/vmstat.c:1695:10: note: (near initialization for 'zoneinfo_op.next')
   mm/vmstat.c:1696:10: error: initializer element is not constant
    1696 |  .stop = frag_stop,
         |          ^~~~~~~~~
   mm/vmstat.c:1696:10: note: (near initialization for 'zoneinfo_op.stop')
   mm/vmstat.c:1697:10: error: initializer element is not constant
    1697 |  .show = zoneinfo_show,
         |          ^~~~~~~~~~~~~
   mm/vmstat.c:1697:10: note: (near initialization for 'zoneinfo_op.show')
>> mm/vmstat.c:1707:14: error: invalid storage class for function 'vmstat_start'
    1707 | static void *vmstat_start(struct seq_file *m, loff_t *pos)
         |              ^~~~~~~~~~~~
>> mm/vmstat.c:1750:14: error: invalid storage class for function 'vmstat_next'
    1750 | static void *vmstat_next(struct seq_file *m, void *arg, loff_t *pos)
         |              ^~~~~~~~~~~
   mm/vmstat.c:1758:12: error: invalid storage class for function 'vmstat_show'
    1758 | static int vmstat_show(struct seq_file *m, void *arg)
         |            ^~~~~~~~~~~
   mm/vmstat.c:1777:13: error: invalid storage class for function 'vmstat_stop'
    1777 | static void vmstat_stop(struct seq_file *m, void *arg)
         |             ^~~~~~~~~~~
   mm/vmstat.c:1784:11: error: initializer element is not constant
    1784 |  .start = vmstat_start,
         |           ^~~~~~~~~~~~
   mm/vmstat.c:1784:11: note: (near initialization for 'vmstat_op.start')
   mm/vmstat.c:1785:10: error: initializer element is not constant
    1785 |  .next = vmstat_next,
         |          ^~~~~~~~~~~
   mm/vmstat.c:1785:10: note: (near initialization for 'vmstat_op.next')
   mm/vmstat.c:1786:10: error: initializer element is not constant
    1786 |  .stop = vmstat_stop,
         |          ^~~~~~~~~~~
   mm/vmstat.c:1786:10: note: (near initialization for 'vmstat_op.stop')
   mm/vmstat.c:1787:10: error: initializer element is not constant
    1787 |  .show = vmstat_show,
         |          ^~~~~~~~~~~
   mm/vmstat.c:1787:10: note: (near initialization for 'vmstat_op.show')
   In file included from include/asm-generic/percpu.h:7,
                    from arch/x86/include/asm/percpu.h:390,
                    from arch/x86/include/asm/preempt.h:6,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/wait.h:9,
                    from include/linux/wait_bit.h:8,
                    from include/linux/fs.h:6,
                    from mm/vmstat.c:13:
   include/linux/percpu-defs.h:92:33: error: section attribute cannot be specified for local variables
      92 |  extern __PCPU_DUMMY_ATTRS char __pcpu_unique_##name;  \
         |                                 ^~~~~~~~~~~~~~
   include/linux/percpu-defs.h:115:2: note: in expansion of macro 'DEFINE_PER_CPU_SECTION'
     115 |  DEFINE_PER_CPU_SECTION(type, name, "")
         |  ^~~~~~~~~~~~~~~~~~~~~~
   mm/vmstat.c:1792:8: note: in expansion of macro 'DEFINE_PER_CPU'
    1792 | static DEFINE_PER_CPU(struct delayed_work, vmstat_work);
         |        ^~~~~~~~~~~~~~
   include/linux/percpu-defs.h:93:26: error: section attribute cannot be specified for local variables
      93 |  __PCPU_DUMMY_ATTRS char __pcpu_unique_##name;   \
         |                          ^~~~~~~~~~~~~~
   include/linux/percpu-defs.h:115:2: note: in expansion of macro 'DEFINE_PER_CPU_SECTION'
     115 |  DEFINE_PER_CPU_SECTION(type, name, "")
         |  ^~~~~~~~~~~~~~~~~~~~~~
   mm/vmstat.c:1792:8: note: in expansion of macro 'DEFINE_PER_CPU'
    1792 | static DEFINE_PER_CPU(struct delayed_work, vmstat_work);
         |        ^~~~~~~~~~~~~~
   include/linux/percpu-defs.h:93:26: error: declaration of '__pcpu_unique_vmstat_work' with no linkage follows extern declaration
      93 |  __PCPU_DUMMY_ATTRS char __pcpu_unique_##name;   \
         |                          ^~~~~~~~~~~~~~
   include/linux/percpu-defs.h:115:2: note: in expansion of macro 'DEFINE_PER_CPU_SECTION'
     115 |  DEFINE_PER_CPU_SECTION(type, name, "")
         |  ^~~~~~~~~~~~~~~~~~~~~~
   mm/vmstat.c:1792:8: note: in expansion of macro 'DEFINE_PER_CPU'
    1792 | static DEFINE_PER_CPU(struct delayed_work, vmstat_work);
         |        ^~~~~~~~~~~~~~
   include/linux/percpu-defs.h:92:33: note: previous declaration of '__pcpu_unique_vmstat_work' was here
      92 |  extern __PCPU_DUMMY_ATTRS char __pcpu_unique_##name;  \
         |                                 ^~~~~~~~~~~~~~
   include/linux/percpu-defs.h:115:2: note: in expansion of macro 'DEFINE_PER_CPU_SECTION'
     115 |  DEFINE_PER_CPU_SECTION(type, name, "")
         |  ^~~~~~~~~~~~~~~~~~~~~~
   mm/vmstat.c:1792:8: note: in expansion of macro 'DEFINE_PER_CPU'
    1792 | static DEFINE_PER_CPU(struct delayed_work, vmstat_work);
         |        ^~~~~~~~~~~~~~
   mm/vmstat.c:1792:44: error: section attribute cannot be specified for local variables
    1792 | static DEFINE_PER_CPU(struct delayed_work, vmstat_work);
         |                                            ^~~~~~~~~~~
   include/linux/percpu-defs.h:94:44: note: in definition of macro 'DEFINE_PER_CPU_SECTION'
      94 |  extern __PCPU_ATTRS(sec) __typeof__(type) name;   \
         |                                            ^~~~
   mm/vmstat.c:1792:8: note: in expansion of macro 'DEFINE_PER_CPU'
    1792 | static DEFINE_PER_CPU(struct delayed_work, vmstat_work);
         |        ^~~~~~~~~~~~~~
   mm/vmstat.c:1792:44: error: section attribute cannot be specified for local variables
    1792 | static DEFINE_PER_CPU(struct delayed_work, vmstat_work);
         |                                            ^~~~~~~~~~~
   include/linux/percpu-defs.h:95:44: note: in definition of macro 'DEFINE_PER_CPU_SECTION'
      95 |  __PCPU_ATTRS(sec) __weak __typeof__(type) name
         |                                            ^~~~
   mm/vmstat.c:1792:8: note: in expansion of macro 'DEFINE_PER_CPU'
    1792 | static DEFINE_PER_CPU(struct delayed_work, vmstat_work);
         |        ^~~~~~~~~~~~~~
   mm/vmstat.c:1792:44: error: weak declaration of 'vmstat_work' must be public
    1792 | static DEFINE_PER_CPU(struct delayed_work, vmstat_work);
         |                                            ^~~~~~~~~~~
   include/linux/percpu-defs.h:95:44: note: in definition of macro 'DEFINE_PER_CPU_SECTION'
      95 |  __PCPU_ATTRS(sec) __weak __typeof__(type) name
         |                                            ^~~~
   mm/vmstat.c:1792:8: note: in expansion of macro 'DEFINE_PER_CPU'
    1792 | static DEFINE_PER_CPU(struct delayed_work, vmstat_work);
         |        ^~~~~~~~~~~~~~
   mm/vmstat.c:1792:44: error: declaration of 'vmstat_work' with no linkage follows extern declaration
    1792 | static DEFINE_PER_CPU(struct delayed_work, vmstat_work);
         |                                            ^~~~~~~~~~~
   include/linux/percpu-defs.h:95:44: note: in definition of macro 'DEFINE_PER_CPU_SECTION'


vim +/fill_contig_page_info +1018 mm/vmstat.c

d7a5752c0c1975 Mel Gorman 2010-05-24  1009  
d7a5752c0c1975 Mel Gorman 2010-05-24  1010  /*
d7a5752c0c1975 Mel Gorman 2010-05-24  1011   * Calculate the number of free pages in a zone, how many contiguous
d7a5752c0c1975 Mel Gorman 2010-05-24  1012   * pages are free and how many are large enough to satisfy an allocation of
d7a5752c0c1975 Mel Gorman 2010-05-24  1013   * the target size. Note that this function makes no attempt to estimate
d7a5752c0c1975 Mel Gorman 2010-05-24  1014   * how many suitable free blocks there *might* be if MOVABLE pages were
d7a5752c0c1975 Mel Gorman 2010-05-24  1015   * migrated. Calculating that is possible, but expensive and can be
d7a5752c0c1975 Mel Gorman 2010-05-24  1016   * figured out from userspace
d7a5752c0c1975 Mel Gorman 2010-05-24  1017   */
d7a5752c0c1975 Mel Gorman 2010-05-24 @1018  static void fill_contig_page_info(struct zone *zone,
d7a5752c0c1975 Mel Gorman 2010-05-24  1019  				unsigned int suitable_order,
d7a5752c0c1975 Mel Gorman 2010-05-24  1020  				struct contig_page_info *info)
d7a5752c0c1975 Mel Gorman 2010-05-24  1021  {
d7a5752c0c1975 Mel Gorman 2010-05-24  1022  	unsigned int order;
d7a5752c0c1975 Mel Gorman 2010-05-24  1023  
d7a5752c0c1975 Mel Gorman 2010-05-24  1024  	info->free_pages = 0;
d7a5752c0c1975 Mel Gorman 2010-05-24  1025  	info->free_blocks_total = 0;
d7a5752c0c1975 Mel Gorman 2010-05-24  1026  	info->free_blocks_suitable = 0;
d7a5752c0c1975 Mel Gorman 2010-05-24  1027  
d7a5752c0c1975 Mel Gorman 2010-05-24  1028  	for (order = 0; order < MAX_ORDER; order++) {
d7a5752c0c1975 Mel Gorman 2010-05-24  1029  		unsigned long blocks;
d7a5752c0c1975 Mel Gorman 2010-05-24  1030  
d7a5752c0c1975 Mel Gorman 2010-05-24  1031  		/* Count number of free blocks */
d7a5752c0c1975 Mel Gorman 2010-05-24  1032  		blocks = zone->free_area[order].nr_free;
d7a5752c0c1975 Mel Gorman 2010-05-24  1033  		info->free_blocks_total += blocks;
d7a5752c0c1975 Mel Gorman 2010-05-24  1034  
d7a5752c0c1975 Mel Gorman 2010-05-24  1035  		/* Count free base pages */
d7a5752c0c1975 Mel Gorman 2010-05-24  1036  		info->free_pages += blocks << order;
d7a5752c0c1975 Mel Gorman 2010-05-24  1037  
d7a5752c0c1975 Mel Gorman 2010-05-24  1038  		/* Count the suitable free blocks */
d7a5752c0c1975 Mel Gorman 2010-05-24  1039  		if (order >= suitable_order)
d7a5752c0c1975 Mel Gorman 2010-05-24  1040  			info->free_blocks_suitable += blocks <<
d7a5752c0c1975 Mel Gorman 2010-05-24  1041  						(order - suitable_order);
d7a5752c0c1975 Mel Gorman 2010-05-24  1042  	}
d7a5752c0c1975 Mel Gorman 2010-05-24  1043  }
f1a5ab1210579e Mel Gorman 2010-05-24  1044  
f1a5ab1210579e Mel Gorman 2010-05-24  1045  /*
f1a5ab1210579e Mel Gorman 2010-05-24  1046   * A fragmentation index only makes sense if an allocation of a requested
f1a5ab1210579e Mel Gorman 2010-05-24  1047   * size would fail. If that is true, the fragmentation index indicates
f1a5ab1210579e Mel Gorman 2010-05-24  1048   * whether external fragmentation or a lack of memory was the problem.
f1a5ab1210579e Mel Gorman 2010-05-24  1049   * The value can be used to determine if page reclaim or compaction
f1a5ab1210579e Mel Gorman 2010-05-24  1050   * should be used
f1a5ab1210579e Mel Gorman 2010-05-24  1051   */
56de7263fcf3eb Mel Gorman 2010-05-24 @1052  static int __fragmentation_index(unsigned int order, struct contig_page_info *info)
f1a5ab1210579e Mel Gorman 2010-05-24  1053  {
f1a5ab1210579e Mel Gorman 2010-05-24  1054  	unsigned long requested = 1UL << order;
f1a5ab1210579e Mel Gorman 2010-05-24  1055  
88d6ac40c1c6b2 Wen Yang   2017-09-06  1056  	if (WARN_ON_ONCE(order >= MAX_ORDER))
88d6ac40c1c6b2 Wen Yang   2017-09-06  1057  		return 0;
88d6ac40c1c6b2 Wen Yang   2017-09-06  1058  
f1a5ab1210579e Mel Gorman 2010-05-24  1059  	if (!info->free_blocks_total)
f1a5ab1210579e Mel Gorman 2010-05-24  1060  		return 0;
f1a5ab1210579e Mel Gorman 2010-05-24  1061  
f1a5ab1210579e Mel Gorman 2010-05-24  1062  	/* Fragmentation index only makes sense when a request would fail */
f1a5ab1210579e Mel Gorman 2010-05-24  1063  	if (info->free_blocks_suitable)
f1a5ab1210579e Mel Gorman 2010-05-24  1064  		return -1000;
f1a5ab1210579e Mel Gorman 2010-05-24  1065  
f1a5ab1210579e Mel Gorman 2010-05-24  1066  	/*
f1a5ab1210579e Mel Gorman 2010-05-24  1067  	 * Index is between 0 and 1 so return within 3 decimal places
f1a5ab1210579e Mel Gorman 2010-05-24  1068  	 *
f1a5ab1210579e Mel Gorman 2010-05-24  1069  	 * 0 => allocation would fail due to lack of memory
f1a5ab1210579e Mel Gorman 2010-05-24  1070  	 * 1 => allocation would fail due to fragmentation
f1a5ab1210579e Mel Gorman 2010-05-24  1071  	 */
f1a5ab1210579e Mel Gorman 2010-05-24  1072  	return 1000 - div_u64( (1000+(div_u64(info->free_pages * 1000ULL, requested))), info->free_blocks_total);
f1a5ab1210579e Mel Gorman 2010-05-24  1073  }
56de7263fcf3eb Mel Gorman 2010-05-24  1074  

:::::: The code at line 1018 was first introduced by commit
:::::: d7a5752c0c19750312efab3a2a80d350e11fa4a2 mm: export unusable free space index via debugfs

:::::: TO: Mel Gorman <mel@csn.ul.ie>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-19 16:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-19 16:14 [mel:mm-percpu-local_lock-v4r4 22/29] mm/vmstat.c:1018:13: error: invalid storage class for function 'fill_contig_page_info' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.