From: kernel test robot <lkp@intel.com>
To: Barry Song <v-songbaohua@oppo.com>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [linux-next:master 6728/7105] mm/rmap.c:1413: warning: Function parameter or struct member 'flags' not described in 'folio_add_new_anon_rmap'
Date: Thu, 20 Jun 2024 00:41:48 +0800 [thread overview]
Message-ID: <202406200059.tVU9semU-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 2102cb0d050d34d50b9642a3a50861787527e922
commit: 41bb9aa5f614423659ced668d0f1ff0c1da6552e [6728/7105] mm: extend rmap flags arguments for folio_add_new_anon_rmap
config: arm-pxa910_defconfig (https://download.01.org/0day-ci/archive/20240620/202406200059.tVU9semU-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240620/202406200059.tVU9semU-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/202406200059.tVU9semU-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> mm/rmap.c:1413: warning: Function parameter or struct member 'flags' not described in 'folio_add_new_anon_rmap'
vim +1413 mm/rmap.c
8bd5130070fbf2 David Hildenbrand 2023-12-20 1398
43d8eac44f28d3 Randy Dunlap 2008-03-19 1399 /**
4d510f3da4c216 Matthew Wilcox (Oracle 2023-01-11 1400) * folio_add_new_anon_rmap - Add mapping to a new anonymous folio.
4d510f3da4c216 Matthew Wilcox (Oracle 2023-01-11 1401) * @folio: The folio to add the mapping to.
9617d95e6e9ffd Nicholas Piggin 2006-01-06 1402 * @vma: the vm area in which the mapping is added
9617d95e6e9ffd Nicholas Piggin 2006-01-06 1403 * @address: the user virtual address mapped
40f2bbf71161fa David Hildenbrand 2022-05-09 1404 *
84f0169e6c8a61 David Hildenbrand 2023-12-20 1405 * Like folio_add_anon_rmap_*() but must only be called on *new* folios.
9617d95e6e9ffd Nicholas Piggin 2006-01-06 1406 * This means the inc-and-test can be bypassed.
4d510f3da4c216 Matthew Wilcox (Oracle 2023-01-11 1407) * The folio does not have to be locked.
4d510f3da4c216 Matthew Wilcox (Oracle 2023-01-11 1408) *
41bb9aa5f61442 Barry Song 2024-06-18 1409 * If the folio is pmd-mappable, it is accounted as a THP.
9617d95e6e9ffd Nicholas Piggin 2006-01-06 1410 */
4d510f3da4c216 Matthew Wilcox (Oracle 2023-01-11 1411) void folio_add_new_anon_rmap(struct folio *folio, struct vm_area_struct *vma,
41bb9aa5f61442 Barry Song 2024-06-18 1412 unsigned long address, rmap_t flags)
9617d95e6e9ffd Nicholas Piggin 2006-01-06 @1413 {
372cbd4d5a0665 Ryan Roberts 2023-12-07 1414 int nr = folio_nr_pages(folio);
c2784aaa21dc56 Yosry Ahmed 2024-05-06 1415 int nr_pmdmapped = 0;
41bb9aa5f61442 Barry Song 2024-06-18 1416 bool exclusive = flags & RMAP_EXCLUSIVE;
d281ee61451835 Kirill A. Shutemov 2016-01-15 1417
a4ea18641d8330 David Hildenbrand 2023-12-20 1418 VM_WARN_ON_FOLIO(folio_test_hugetlb(folio), folio);
372cbd4d5a0665 Ryan Roberts 2023-12-07 1419 VM_BUG_ON_VMA(address < vma->vm_start ||
372cbd4d5a0665 Ryan Roberts 2023-12-07 1420 address + (nr << PAGE_SHIFT) > vma->vm_end, vma);
4d510f3da4c216 Matthew Wilcox (Oracle 2023-01-11 1421) __folio_set_swapbacked(folio);
41bb9aa5f61442 Barry Song 2024-06-18 1422 __folio_set_anon(folio, vma, address, exclusive);
d8dd5e979d09c7 Hugh Dickins 2022-11-09 1423
372cbd4d5a0665 Ryan Roberts 2023-12-07 1424 if (likely(!folio_test_large(folio))) {
d8dd5e979d09c7 Hugh Dickins 2022-11-09 1425 /* increment count (starts at -1) */
4d510f3da4c216 Matthew Wilcox (Oracle 2023-01-11 1426) atomic_set(&folio->_mapcount, 0);
41bb9aa5f61442 Barry Song 2024-06-18 1427 if (exclusive)
372cbd4d5a0665 Ryan Roberts 2023-12-07 1428 SetPageAnonExclusive(&folio->page);
372cbd4d5a0665 Ryan Roberts 2023-12-07 1429 } else if (!folio_test_pmd_mappable(folio)) {
372cbd4d5a0665 Ryan Roberts 2023-12-07 1430 int i;
372cbd4d5a0665 Ryan Roberts 2023-12-07 1431
372cbd4d5a0665 Ryan Roberts 2023-12-07 1432 for (i = 0; i < nr; i++) {
372cbd4d5a0665 Ryan Roberts 2023-12-07 1433 struct page *page = folio_page(folio, i);
372cbd4d5a0665 Ryan Roberts 2023-12-07 1434
372cbd4d5a0665 Ryan Roberts 2023-12-07 1435 /* increment count (starts at -1) */
372cbd4d5a0665 Ryan Roberts 2023-12-07 1436 atomic_set(&page->_mapcount, 0);
41bb9aa5f61442 Barry Song 2024-06-18 1437 if (exclusive)
372cbd4d5a0665 Ryan Roberts 2023-12-07 1438 SetPageAnonExclusive(page);
372cbd4d5a0665 Ryan Roberts 2023-12-07 1439 }
372cbd4d5a0665 Ryan Roberts 2023-12-07 1440
05c5323b2a344c David Hildenbrand 2024-04-09 1441 /* increment count (starts at -1) */
05c5323b2a344c David Hildenbrand 2024-04-09 1442 atomic_set(&folio->_large_mapcount, nr - 1);
372cbd4d5a0665 Ryan Roberts 2023-12-07 1443 atomic_set(&folio->_nr_pages_mapped, nr);
d8dd5e979d09c7 Hugh Dickins 2022-11-09 1444 } else {
53f9263baba69f Kirill A. Shutemov 2016-01-15 1445 /* increment count (starts at -1) */
4d510f3da4c216 Matthew Wilcox (Oracle 2023-01-11 1446) atomic_set(&folio->_entire_mapcount, 0);
05c5323b2a344c David Hildenbrand 2024-04-09 1447 /* increment count (starts at -1) */
05c5323b2a344c David Hildenbrand 2024-04-09 1448 atomic_set(&folio->_large_mapcount, 0);
e78a13fd16bb9d David Hildenbrand 2023-12-20 1449 atomic_set(&folio->_nr_pages_mapped, ENTIRELY_MAPPED);
41bb9aa5f61442 Barry Song 2024-06-18 1450 if (exclusive)
372cbd4d5a0665 Ryan Roberts 2023-12-07 1451 SetPageAnonExclusive(&folio->page);
c2784aaa21dc56 Yosry Ahmed 2024-05-06 1452 nr_pmdmapped = nr;
d281ee61451835 Kirill A. Shutemov 2016-01-15 1453 }
d8dd5e979d09c7 Hugh Dickins 2022-11-09 1454
c2784aaa21dc56 Yosry Ahmed 2024-05-06 1455 __folio_mod_stat(folio, nr, nr_pmdmapped);
9617d95e6e9ffd Nicholas Piggin 2006-01-06 1456 }
9617d95e6e9ffd Nicholas Piggin 2006-01-06 1457
:::::: The code at line 1413 was first introduced by commit
:::::: 9617d95e6e9ffd883cf90a89724fe60d7ab22f9a [PATCH] mm: rmap optimisation
:::::: TO: Nick Piggin <nickpiggin@yahoo.com.au>
:::::: CC: Linus Torvalds <torvalds@g5.osdl.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2024-06-19 16:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-19 16:41 kernel test robot [this message]
2024-06-19 21:06 ` [linux-next:master 6728/7105] mm/rmap.c:1413: warning: Function parameter or struct member 'flags' not described in 'folio_add_new_anon_rmap' Barry Song
2024-06-20 6:57 ` Liu, Yujie
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=202406200059.tVU9semU-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=v-songbaohua@oppo.com \
/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 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.