tree:
https://git.kernel.org/pub/scm/linux/kernel/git/andrea/aa.git master
head: 34dd03a2fe9af1f1a9dbd7ec65eb1f247bdfe0db
commit: cfc5b41b296c2d61dc124a99904f85d16008bf57 [44/69] mm: thp: make the THP mapcount
atomic against __split_huge_pmd_locked()
config: sparc-defconfig (attached as .config)
compiler: sparc-linux-gcc (GCC) 9.3.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://git.kernel.org/pub/scm/linux/kernel/git/andrea/aa.git/commit/?id=...
git remote add aa
https://git.kernel.org/pub/scm/linux/kernel/git/andrea/aa.git
git fetch --no-tags aa master
git checkout cfc5b41b296c2d61dc124a99904f85d16008bf57
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
mm/swapfile.c: In function 'page_trans_huge_map_swapcount':
> mm/swapfile.c:1649:13: error: implicit declaration of function
'page_mapcount_seq_begin'; did you mean 'page_mapcount_reset'?
[-Werror=implicit-function-declaration]
1649 | seqcount =
page_mapcount_seq_begin(page);
| ^~~~~~~~~~~~~~~~~~~~~~~
| page_mapcount_reset
> mm/swapfile.c:1680:6: error: implicit declaration of function
'page_mapcount_seq_retry'; did you mean 'page_mapcount_reset'?
[-Werror=implicit-function-declaration]
1680 | if
(page_mapcount_seq_retry(page, seqcount))
| ^~~~~~~~~~~~~~~~~~~~~~~
| page_mapcount_reset
cc1: some warnings being treated as errors
vim +1649 mm/swapfile.c
1622
1623 static int page_trans_huge_map_swapcount(struct page *page, int *total_mapcount,
1624 int *total_swapcount)
1625 {
1626 int i, map_swapcount, _total_mapcount, _total_swapcount;
1627 unsigned long offset = 0;
1628 struct swap_info_struct *si;
1629 struct swap_cluster_info *ci = NULL;
1630 unsigned char *map = NULL;
1631 int mapcount, swapcount = 0;
1632 unsigned long seqcount;
1633
1634 /* hugetlbfs shouldn't call it */
1635 VM_BUG_ON_PAGE(PageHuge(page), page);
1636
1637 if (!IS_ENABLED(CONFIG_THP_SWAP) || likely(!PageTransCompound(page))) {
1638 mapcount = page_trans_huge_mapcount(page, total_mapcount);
1639 if (PageSwapCache(page))
1640 swapcount = page_swapcount(page);
1641 if (total_swapcount)
1642 *total_swapcount = swapcount;
1643 return mapcount + swapcount;
1644 }
1645
1646 page = compound_head(page);
1647
1648 again:
1649 seqcount = page_mapcount_seq_begin(page);
1650
1651 _total_mapcount = _total_swapcount = map_swapcount = 0;
1652 if (PageSwapCache(page)) {
1653 swp_entry_t entry;
1654
1655 entry.val = page_private(page);
1656 si = _swap_info_get(entry);
1657 if (si) {
1658 map = si->swap_map;
1659 offset = swp_offset(entry);
1660 }
1661 }
1662 if (map)
1663 ci = lock_cluster(si, offset);
1664 for (i = 0; i < HPAGE_PMD_NR; i++) {
1665 mapcount = atomic_read(&page[i]._mapcount) + 1;
1666 _total_mapcount += mapcount;
1667 if (map) {
1668 swapcount = swap_count(map[offset + i]);
1669 _total_swapcount += swapcount;
1670 }
1671 map_swapcount = max(map_swapcount, mapcount + swapcount);
1672 }
1673 unlock_cluster(ci);
1674 if (PageDoubleMap(page)) {
1675 map_swapcount -= 1;
1676 _total_mapcount -= HPAGE_PMD_NR;
1677 }
1678 mapcount = compound_mapcount(page);
1679
1680 if (page_mapcount_seq_retry(page, seqcount))
1681 goto again;
1682
1683 map_swapcount += mapcount;
1684 _total_mapcount += mapcount;
1685 if (total_mapcount)
1686 *total_mapcount = _total_mapcount;
1687 if (total_swapcount)
1688 *total_swapcount = _total_swapcount;
1689
1690 return map_swapcount;
1691 }
1692
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org