linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* mm/zswap.c:744:52: error: 'struct zswap_lruvec_state' has no member named 'nr_disk_swapins'
@ 2024-10-02  8:00 kernel test robot
  2024-10-02 18:13 ` Nhat Pham
  0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2024-10-02  8:00 UTC (permalink / raw)
  To: Nhat Pham
  Cc: oe-kbuild-all, linux-kernel, Andrew Morton, Linux Memory Management List

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e32cde8d2bd7d251a8f9b434143977ddf13dcec6
commit: e31c38e037621c445bb4393fd77e0a76e6e0899a zswap: implement a second chance algorithm for dynamic zswap shrinker
date:   4 weeks ago
config: x86_64-randconfig-r133-20240215 (https://download.01.org/0day-ci/archive/20241002/202410021530.DnNbPqfN-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241002/202410021530.DnNbPqfN-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410021530.DnNbPqfN-lkp@intel.com/

All errors (new ones prefixed by >>):

   mm/zswap.c:97:33: error: 'CONFIG_ZSWAP_COMPRESSOR_DEFAULT' undeclared here (not in a function)
      97 | static char *zswap_compressor = CONFIG_ZSWAP_COMPRESSOR_DEFAULT;
         |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   mm/zswap.c:109:33: error: 'CONFIG_ZSWAP_ZPOOL_DEFAULT' undeclared here (not in a function); did you mean 'CONFIG_NR_CPUS_DEFAULT'?
     109 | static char *zswap_zpool_type = CONFIG_ZSWAP_ZPOOL_DEFAULT;
         |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                 CONFIG_NR_CPUS_DEFAULT
   mm/zswap.c:132:6: error: redefinition of 'zswap_is_enabled'
     132 | bool zswap_is_enabled(void)
         |      ^~~~~~~~~~~~~~~~
   In file included from include/linux/mmzone.h:25,
                    from include/linux/gfp.h:7,
                    from include/linux/umh.h:4,
                    from include/linux/kmod.h:9,
                    from include/linux/module.h:17,
                    from mm/zswap.c:16:
   include/linux/zswap.h:62:20: note: previous definition of 'zswap_is_enabled' with type 'bool(void)' {aka '_Bool(void)'}
      62 | static inline bool zswap_is_enabled(void)
         |                    ^~~~~~~~~~~~~~~~
   mm/zswap.c:137:6: error: redefinition of 'zswap_never_enabled'
     137 | bool zswap_never_enabled(void)
         |      ^~~~~~~~~~~~~~~~~~~
   include/linux/zswap.h:67:20: note: previous definition of 'zswap_never_enabled' with type 'bool(void)' {aka '_Bool(void)'}
      67 | static inline bool zswap_never_enabled(void)
         |                    ^~~~~~~~~~~~~~~~~~~
   mm/zswap.c: In function 'swap_zswap_tree':
   mm/zswap.c:244:20: error: 'SWAP_ADDRESS_SPACE_SHIFT' undeclared (first use in this function)
     244 |                 >> SWAP_ADDRESS_SPACE_SHIFT];
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~
   mm/zswap.c:244:20: note: each undeclared identifier is reported only once for each function it appears in
   mm/zswap.c: At top level:
   mm/zswap.c:489:15: warning: no previous prototype for 'zswap_total_pages' [-Wmissing-prototypes]
     489 | unsigned long zswap_total_pages(void)
         |               ^~~~~~~~~~~~~~~~~
   mm/zswap.c:742:6: error: redefinition of 'zswap_lruvec_state_init'
     742 | void zswap_lruvec_state_init(struct lruvec *lruvec)
         |      ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/zswap.h:59:20: note: previous definition of 'zswap_lruvec_state_init' with type 'void(struct lruvec *)'
      59 | static inline void zswap_lruvec_state_init(struct lruvec *lruvec) {}
         |                    ^~~~~~~~~~~~~~~~~~~~~~~
   mm/zswap.c: In function 'zswap_lruvec_state_init':
>> mm/zswap.c:744:52: error: 'struct zswap_lruvec_state' has no member named 'nr_disk_swapins'
     744 |         atomic_long_set(&lruvec->zswap_lruvec_state.nr_disk_swapins, 0);
         |                                                    ^
   mm/zswap.c: At top level:
   mm/zswap.c:747:6: error: redefinition of 'zswap_folio_swapin'
     747 | void zswap_folio_swapin(struct folio *folio)
         |      ^~~~~~~~~~~~~~~~~~
   include/linux/zswap.h:60:20: note: previous definition of 'zswap_folio_swapin' with type 'void(struct folio *)'
      60 | static inline void zswap_folio_swapin(struct folio *folio) {}
         |                    ^~~~~~~~~~~~~~~~~~
   mm/zswap.c: In function 'zswap_folio_swapin':
   mm/zswap.c:753:60: error: 'struct zswap_lruvec_state' has no member named 'nr_disk_swapins'
     753 |                 atomic_long_inc(&lruvec->zswap_lruvec_state.nr_disk_swapins);
         |                                                            ^
   mm/zswap.c: At top level:
   mm/zswap.c:767:6: error: redefinition of 'zswap_memcg_offline_cleanup'
     767 | void zswap_memcg_offline_cleanup(struct mem_cgroup *memcg)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/zswap.h:58:20: note: previous definition of 'zswap_memcg_offline_cleanup' with type 'void(struct mem_cgroup *)'
      58 | static inline void zswap_memcg_offline_cleanup(struct mem_cgroup *memcg) {}
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   mm/zswap.c: In function 'zswap_writeback_entry':
   mm/zswap.c:1029:17: error: implicit declaration of function '__read_swap_cache_async' [-Werror=implicit-function-declaration]
    1029 |         folio = __read_swap_cache_async(swpentry, GFP_KERNEL, mpol,
         |                 ^~~~~~~~~~~~~~~~~~~~~~~
   mm/zswap.c:1029:15: warning: assignment to 'struct folio *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1029 |         folio = __read_swap_cache_async(swpentry, GFP_KERNEL, mpol,
         |               ^
   mm/zswap.c:1065:24: error: 'ZSWPWB' undeclared (first use in this function)
    1065 |         count_vm_event(ZSWPWB);
         |                        ^~~~~~
   mm/zswap.c:1078:9: error: implicit declaration of function '__swap_writepage'; did you mean 'swap_writepage'? [-Werror=implicit-function-declaration]
    1078 |         __swap_writepage(folio, &wbc);
         |         ^~~~~~~~~~~~~~~~
         |         swap_writepage
   mm/zswap.c: In function 'zswap_shrinker_count':
   mm/zswap.c:1218:44: error: 'struct zswap_lruvec_state' has no member named 'nr_disk_swapins'
    1218 |                 &lruvec->zswap_lruvec_state.nr_disk_swapins;
         |                                            ^
   mm/zswap.c: At top level:
   mm/zswap.c:1458:6: error: redefinition of 'zswap_store'
    1458 | bool zswap_store(struct folio *folio)
         |      ^~~~~~~~~~~
   include/linux/zswap.h:42:20: note: previous definition of 'zswap_store' with type 'bool(struct folio *)' {aka '_Bool(struct folio *)'}
      42 | static inline bool zswap_store(struct folio *folio)
         |                    ^~~~~~~~~~~
   mm/zswap.c: In function 'zswap_store':
   mm/zswap.c:1547:42: error: 'ZSWPOUT' undeclared (first use in this function); did you mean 'PSWPOUT'?
    1547 |                 count_objcg_event(objcg, ZSWPOUT);
         |                                          ^~~~~~~
         |                                          PSWPOUT
   mm/zswap.c: At top level:
   mm/zswap.c:1597:6: error: redefinition of 'zswap_load'
    1597 | bool zswap_load(struct folio *folio)
         |      ^~~~~~~~~~
   include/linux/zswap.h:47:20: note: previous definition of 'zswap_load' with type 'bool(struct folio *)' {aka '_Bool(struct folio *)'}
      47 | static inline bool zswap_load(struct folio *folio)
         |                    ^~~~~~~~~~
   mm/zswap.c: In function 'zswap_load':
   mm/zswap.c:1646:24: error: 'ZSWPIN' undeclared (first use in this function); did you mean 'PSWPIN'?
    1646 |         count_vm_event(ZSWPIN);
         |                        ^~~~~~
         |                        PSWPIN
   mm/zswap.c: At top level:
   mm/zswap.c:1659:6: error: redefinition of 'zswap_invalidate'
    1659 | void zswap_invalidate(swp_entry_t swp)
         |      ^~~~~~~~~~~~~~~~
   include/linux/zswap.h:52:20: note: previous definition of 'zswap_invalidate' with type 'void(swp_entry_t)'
      52 | static inline void zswap_invalidate(swp_entry_t swp) {}
         |                    ^~~~~~~~~~~~~~~~
   mm/zswap.c:1670:5: error: redefinition of 'zswap_swapon'
    1670 | int zswap_swapon(int type, unsigned long nr_pages)
         |     ^~~~~~~~~~~~
   include/linux/zswap.h:53:19: note: previous definition of 'zswap_swapon' with type 'int(int,  long unsigned int)'
      53 | static inline int zswap_swapon(int type, unsigned long nr_pages)
         |                   ^~~~~~~~~~~~
   In file included from include/vdso/const.h:5,
                    from include/linux/const.h:4,
                    from include/linux/list.h:9,
                    from include/linux/module.h:12:
   mm/zswap.c: In function 'zswap_swapon':
   mm/zswap.c:1675:37: error: 'SWAP_ADDRESS_SPACE_PAGES' undeclared (first use in this function)
    1675 |         nr = DIV_ROUND_UP(nr_pages, SWAP_ADDRESS_SPACE_PAGES);
         |                                     ^~~~~~~~~~~~~~~~~~~~~~~~
   include/uapi/linux/const.h:34:46: note: in definition of macro '__KERNEL_DIV_ROUND_UP'
      34 | #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
         |                                              ^
   mm/zswap.c:1675:14: note: in expansion of macro 'DIV_ROUND_UP'
    1675 |         nr = DIV_ROUND_UP(nr_pages, SWAP_ADDRESS_SPACE_PAGES);
         |              ^~~~~~~~~~~~
   mm/zswap.c: At top level:
   mm/zswap.c:1690:6: error: redefinition of 'zswap_swapoff'
    1690 | void zswap_swapoff(int type)
         |      ^~~~~~~~~~~~~
   include/linux/zswap.h:57:20: note: previous definition of 'zswap_swapoff' with type 'void(int)'
      57 | static inline void zswap_swapoff(int type) {}
         |                    ^~~~~~~~~~~~~
   mm/zswap.c: In function 'swap_zswap_tree':
   mm/zswap.c:245:1: warning: control reaches end of non-void function [-Wreturn-type]
     245 | }
         | ^


vim +744 mm/zswap.c

   741	
   742	void zswap_lruvec_state_init(struct lruvec *lruvec)
   743	{
 > 744		atomic_long_set(&lruvec->zswap_lruvec_state.nr_disk_swapins, 0);
   745	}
   746	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


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

* Re: mm/zswap.c:744:52: error: 'struct zswap_lruvec_state' has no member named 'nr_disk_swapins'
  2024-10-02  8:00 mm/zswap.c:744:52: error: 'struct zswap_lruvec_state' has no member named 'nr_disk_swapins' kernel test robot
@ 2024-10-02 18:13 ` Nhat Pham
  2024-10-02 18:43   ` Yosry Ahmed
  2024-10-03 15:11   ` Philip Li
  0 siblings, 2 replies; 4+ messages in thread
From: Nhat Pham @ 2024-10-02 18:13 UTC (permalink / raw)
  To: kernel test robot
  Cc: oe-kbuild-all, linux-kernel, Andrew Morton,
	Linux Memory Management List, Yosry Ahmed, Johannes Weiner,
	Chengming Zhou

On Wed, Oct 2, 2024 at 1:01 AM kernel test robot <lkp@intel.com> wrote:
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   e32cde8d2bd7d251a8f9b434143977ddf13dcec6
> commit: e31c38e037621c445bb4393fd77e0a76e6e0899a zswap: implement a second chance algorithm for dynamic zswap shrinker
> date:   4 weeks ago
> config: x86_64-randconfig-r133-20240215 (https://download.01.org/0day-ci/archive/20241002/202410021530.DnNbPqfN-lkp@intel.com/config)
> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241002/202410021530.DnNbPqfN-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202410021530.DnNbPqfN-lkp@intel.com/
>

I'm stumped...I downloaded this config file, and used the same
reproducer build commands, and it built successfully for me :(

Fellow zswappers, anyone managed to reproduce this? Or is this a false
positive...


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

* Re: mm/zswap.c:744:52: error: 'struct zswap_lruvec_state' has no member named 'nr_disk_swapins'
  2024-10-02 18:13 ` Nhat Pham
@ 2024-10-02 18:43   ` Yosry Ahmed
  2024-10-03 15:11   ` Philip Li
  1 sibling, 0 replies; 4+ messages in thread
From: Yosry Ahmed @ 2024-10-02 18:43 UTC (permalink / raw)
  To: Nhat Pham
  Cc: kernel test robot, oe-kbuild-all, linux-kernel, Andrew Morton,
	Linux Memory Management List, Johannes Weiner, Chengming Zhou

On Wed, Oct 2, 2024 at 11:13 AM Nhat Pham <nphamcs@gmail.com> wrote:
>
> On Wed, Oct 2, 2024 at 1:01 AM kernel test robot <lkp@intel.com> wrote:
> >
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head:   e32cde8d2bd7d251a8f9b434143977ddf13dcec6
> > commit: e31c38e037621c445bb4393fd77e0a76e6e0899a zswap: implement a second chance algorithm for dynamic zswap shrinker
> > date:   4 weeks ago
> > config: x86_64-randconfig-r133-20240215 (https://download.01.org/0day-ci/archive/20241002/202410021530.DnNbPqfN-lkp@intel.com/config)
> > compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241002/202410021530.DnNbPqfN-lkp@intel.com/reproduce)
> >
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202410021530.DnNbPqfN-lkp@intel.com/
> >
>
> I'm stumped...I downloaded this config file, and used the same
> reproducer build commands, and it built successfully for me :(

There seems to be tons of existing build problems with zswap.h and
zswap.c, I am not sure what's going on.

>
> Fellow zswappers, anyone managed to reproduce this? Or is this a false
> positive...

No luck here.


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

* Re: mm/zswap.c:744:52: error: 'struct zswap_lruvec_state' has no member named 'nr_disk_swapins'
  2024-10-02 18:13 ` Nhat Pham
  2024-10-02 18:43   ` Yosry Ahmed
@ 2024-10-03 15:11   ` Philip Li
  1 sibling, 0 replies; 4+ messages in thread
From: Philip Li @ 2024-10-03 15:11 UTC (permalink / raw)
  To: Nhat Pham
  Cc: kernel test robot, oe-kbuild-all, linux-kernel, Andrew Morton,
	Linux Memory Management List, Yosry Ahmed, Johannes Weiner,
	Chengming Zhou

On Wed, Oct 02, 2024 at 11:13:24AM -0700, Nhat Pham wrote:
> On Wed, Oct 2, 2024 at 1:01 AM kernel test robot <lkp@intel.com> wrote:
> >
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head:   e32cde8d2bd7d251a8f9b434143977ddf13dcec6
> > commit: e31c38e037621c445bb4393fd77e0a76e6e0899a zswap: implement a second chance algorithm for dynamic zswap shrinker
> > date:   4 weeks ago
> > config: x86_64-randconfig-r133-20240215 (https://download.01.org/0day-ci/archive/20241002/202410021530.DnNbPqfN-lkp@intel.com/config)
> > compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241002/202410021530.DnNbPqfN-lkp@intel.com/reproduce)
> >
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202410021530.DnNbPqfN-lkp@intel.com/
> >
> 
> I'm stumped...I downloaded this config file, and used the same
> reproducer build commands, and it built successfully for me :(

Sorry about false report, kindly ignore this. The bot side will look
into the detail to resolve the issue asap.

> 
> Fellow zswappers, anyone managed to reproduce this? Or is this a false
> positive...
> 


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

end of thread, other threads:[~2024-10-03 15:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-02  8:00 mm/zswap.c:744:52: error: 'struct zswap_lruvec_state' has no member named 'nr_disk_swapins' kernel test robot
2024-10-02 18:13 ` Nhat Pham
2024-10-02 18:43   ` Yosry Ahmed
2024-10-03 15:11   ` Philip Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox