[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202203291115.wkIFarm7-lkp@intel.com>
Date: Tue, 29 Mar 2022 11:27:26 +0800
From: kernel test robot <lkp@...el.com>
To: Peifeng Li <lipeifeng@...o.com>
Cc: kbuild-all@...ts.01.org,
GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>,
linux-kernel@...r.kernel.org, Todd Kjos <tkjos@...gle.com>
Subject: [ammarfaizi2-block:google/android/kernel/common/android12-kiwi-5.10
9998/9999] mm/vmscan.c:673:15: warning: no previous prototype for
'shrink_slab'
tree: https://github.com/ammarfaizi2/linux-block google/android/kernel/common/android12-kiwi-5.10
head: 9c6bdae16301919fcab74129dee1083eba844952
commit: 71d560e017415ead361cfc10cc50ef36a0545cc2 [9998/9999] ANDROID: vendor_hooks: export shrink_slab
config: arm64-randconfig-r022-20220327 (https://download.01.org/0day-ci/archive/20220329/202203291115.wkIFarm7-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/ammarfaizi2/linux-block/commit/71d560e017415ead361cfc10cc50ef36a0545cc2
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block google/android/kernel/common/android12-kiwi-5.10
git checkout 71d560e017415ead361cfc10cc50ef36a0545cc2
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> mm/vmscan.c:673:15: warning: no previous prototype for 'shrink_slab' [-Wmissing-prototypes]
673 | unsigned long shrink_slab(gfp_t gfp_mask, int nid,
| ^~~~~~~~~~~
vim +/shrink_slab +673 mm/vmscan.c
652
653 /**
654 * shrink_slab - shrink slab caches
655 * @gfp_mask: allocation context
656 * @nid: node whose slab caches to target
657 * @memcg: memory cgroup whose slab caches to target
658 * @priority: the reclaim priority
659 *
660 * Call the shrink functions to age shrinkable caches.
661 *
662 * @nid is passed along to shrinkers with SHRINKER_NUMA_AWARE set,
663 * unaware shrinkers will receive a node id of 0 instead.
664 *
665 * @memcg specifies the memory cgroup to target. Unaware shrinkers
666 * are called only if it is the root cgroup.
667 *
668 * @priority is sc->priority, we take the number of objects and >> by priority
669 * in order to get the scan target.
670 *
671 * Returns the number of reclaimed slab objects.
672 */
> 673 unsigned long shrink_slab(gfp_t gfp_mask, int nid,
674 struct mem_cgroup *memcg,
675 int priority)
676 {
677 unsigned long ret, freed = 0;
678 struct shrinker *shrinker;
679 bool bypass = false;
680
681 trace_android_vh_shrink_slab_bypass(gfp_mask, nid, memcg, priority, &bypass);
682 if (bypass)
683 return 0;
684
685 /*
686 * The root memcg might be allocated even though memcg is disabled
687 * via "cgroup_disable=memory" boot parameter. This could make
688 * mem_cgroup_is_root() return false, then just run memcg slab
689 * shrink, but skip global shrink. This may result in premature
690 * oom.
691 */
692 if (!mem_cgroup_disabled() && !mem_cgroup_is_root(memcg))
693 return shrink_slab_memcg(gfp_mask, nid, memcg, priority);
694
695 if (!down_read_trylock(&shrinker_rwsem))
696 goto out;
697
698 list_for_each_entry(shrinker, &shrinker_list, list) {
699 struct shrink_control sc = {
700 .gfp_mask = gfp_mask,
701 .nid = nid,
702 .memcg = memcg,
703 };
704
705 ret = do_shrink_slab(&sc, shrinker, priority);
706 if (ret == SHRINK_EMPTY)
707 ret = 0;
708 freed += ret;
709 /*
710 * Bail out if someone want to register a new shrinker to
711 * prevent the registration from being stalled for long periods
712 * by parallel ongoing shrinking.
713 */
714 if (rwsem_is_contended(&shrinker_rwsem)) {
715 freed = freed ? : 1;
716 break;
717 }
718 }
719
720 up_read(&shrinker_rwsem);
721 out:
722 cond_resched();
723 return freed;
724 }
725 EXPORT_SYMBOL_GPL(shrink_slab);
726
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists