From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: mm/damon/paddr.c:321 damon_pa_pageout() error: uninitialized symbol 'folio'.
Date: Wed, 28 May 2025 02:50:58 +0800 [thread overview]
Message-ID: <202505280224.t2xtsPZP-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: SeongJae Park <sj@kernel.org>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b1456f6dc167f7f101746e495bede2bac3d0e19f
commit: 94ba17adaba0f651fdcf745c8891a88e2e028cfa mm/damon: avoid applying DAMOS action to same entity multiple times
date: 2 months ago
:::::: branch date: 3 hours ago
:::::: commit date: 2 months ago
config: i386-randconfig-141-20250527 (https://download.01.org/0day-ci/archive/20250528/202505280224.t2xtsPZP-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202505280224.t2xtsPZP-lkp@intel.com/
smatch warnings:
mm/damon/paddr.c:321 damon_pa_pageout() error: uninitialized symbol 'folio'.
mm/damon/paddr.c:354 damon_pa_mark_accessed_or_deactivate() error: uninitialized symbol 'folio'.
mm/damon/paddr.c:522 damon_pa_migrate() error: uninitialized symbol 'folio'.
mm/damon/paddr.c:558 damon_pa_stat() error: uninitialized symbol 'folio'.
vim +/folio +321 mm/damon/paddr.c
94ba17adaba0f6 SeongJae Park 2025-02-07 267
96f1971dabca71 SeongJae Park 2025-01-06 268 static unsigned long damon_pa_pageout(struct damon_region *r, struct damos *s,
96f1971dabca71 SeongJae Park 2025-01-06 269 unsigned long *sz_filter_passed)
57223ac295845b SeongJae Park 2021-11-05 270 {
0e92c2ee9f4595 SeongJae Park 2022-01-14 271 unsigned long addr, applied;
07bb1fbaa2bbd2 Kefeng Wang 2022-12-30 272 LIST_HEAD(folio_list);
ebd3f70c630a9a SeongJae Park 2024-04-29 273 bool install_young_filter = true;
69a5f999176d10 SeongJae Park 2024-04-29 274 struct damos_filter *filter;
94ba17adaba0f6 SeongJae Park 2025-02-07 275 struct folio *folio;
69a5f999176d10 SeongJae Park 2024-04-29 276
ebd3f70c630a9a SeongJae Park 2024-04-29 277 /* check access in page level again by default */
69a5f999176d10 SeongJae Park 2024-04-29 278 damos_for_each_filter(filter, s) {
69a5f999176d10 SeongJae Park 2024-04-29 279 if (filter->type == DAMOS_FILTER_TYPE_YOUNG) {
ebd3f70c630a9a SeongJae Park 2024-04-29 280 install_young_filter = false;
69a5f999176d10 SeongJae Park 2024-04-29 281 break;
69a5f999176d10 SeongJae Park 2024-04-29 282 }
69a5f999176d10 SeongJae Park 2024-04-29 283 }
ebd3f70c630a9a SeongJae Park 2024-04-29 284 if (install_young_filter) {
e2fbfedad03401 SeongJae Park 2025-01-09 285 filter = damos_new_filter(
e2fbfedad03401 SeongJae Park 2025-01-09 286 DAMOS_FILTER_TYPE_YOUNG, true, false);
ebd3f70c630a9a SeongJae Park 2024-04-29 287 if (!filter)
ebd3f70c630a9a SeongJae Park 2024-04-29 288 return 0;
ebd3f70c630a9a SeongJae Park 2024-04-29 289 damos_add_filter(s, filter);
ebd3f70c630a9a SeongJae Park 2024-04-29 290 }
57223ac295845b SeongJae Park 2021-11-05 291
3a06696305e757 Usama Arif 2025-02-07 292 addr = r->ar.start;
3a06696305e757 Usama Arif 2025-02-07 293 while (addr < r->ar.end) {
94ba17adaba0f6 SeongJae Park 2025-02-07 294 folio = damon_get_folio(PHYS_PFN(addr));
94ba17adaba0f6 SeongJae Park 2025-02-07 295 if (damon_pa_invalid_damos_folio(folio, s)) {
3a06696305e757 Usama Arif 2025-02-07 296 addr += PAGE_SIZE;
57223ac295845b SeongJae Park 2021-11-05 297 continue;
3a06696305e757 Usama Arif 2025-02-07 298 }
57223ac295845b SeongJae Park 2021-11-05 299
dd411433129c07 Kefeng Wang 2023-03-08 300 if (damos_pa_filter_out(s, folio))
dd411433129c07 Kefeng Wang 2023-03-08 301 goto put_folio;
96f1971dabca71 SeongJae Park 2025-01-06 302 else
96f1971dabca71 SeongJae Park 2025-01-06 303 *sz_filter_passed += folio_size(folio);
18250e78f9c759 SeongJae Park 2022-12-05 304
07bb1fbaa2bbd2 Kefeng Wang 2022-12-30 305 folio_clear_referenced(folio);
07bb1fbaa2bbd2 Kefeng Wang 2022-12-30 306 folio_test_clear_young(folio);
dd411433129c07 Kefeng Wang 2023-03-08 307 if (!folio_isolate_lru(folio))
dd411433129c07 Kefeng Wang 2023-03-08 308 goto put_folio;
3f98c9a62c338b andrew.yang 2023-02-22 309 if (folio_test_unevictable(folio))
07bb1fbaa2bbd2 Kefeng Wang 2022-12-30 310 folio_putback_lru(folio);
3f98c9a62c338b andrew.yang 2023-02-22 311 else
07bb1fbaa2bbd2 Kefeng Wang 2022-12-30 312 list_add(&folio->lru, &folio_list);
dd411433129c07 Kefeng Wang 2023-03-08 313 put_folio:
3a06696305e757 Usama Arif 2025-02-07 314 addr += folio_size(folio);
07bb1fbaa2bbd2 Kefeng Wang 2022-12-30 315 folio_put(folio);
57223ac295845b SeongJae Park 2021-11-05 316 }
ebd3f70c630a9a SeongJae Park 2024-04-29 317 if (install_young_filter)
ebd3f70c630a9a SeongJae Park 2024-04-29 318 damos_destroy_filter(filter);
14f5be2a2d9bb7 SeongJae Park 2024-04-29 319 applied = reclaim_pages(&folio_list);
57223ac295845b SeongJae Park 2021-11-05 320 cond_resched();
94ba17adaba0f6 SeongJae Park 2025-02-07 @321 s->last_applied = folio;
0e92c2ee9f4595 SeongJae Park 2022-01-14 322 return applied * PAGE_SIZE;
57223ac295845b SeongJae Park 2021-11-05 323 }
57223ac295845b SeongJae Park 2021-11-05 324
8193321ac90d52 SeongJae Park 2022-09-13 325 static inline unsigned long damon_pa_mark_accessed_or_deactivate(
96f1971dabca71 SeongJae Park 2025-01-06 326 struct damon_region *r, struct damos *s, bool mark_accessed,
96f1971dabca71 SeongJae Park 2025-01-06 327 unsigned long *sz_filter_passed)
8cdcc532268df0 SeongJae Park 2022-06-13 328 {
8cdcc532268df0 SeongJae Park 2022-06-13 329 unsigned long addr, applied = 0;
94ba17adaba0f6 SeongJae Park 2025-02-07 330 struct folio *folio;
8cdcc532268df0 SeongJae Park 2022-06-13 331
3a06696305e757 Usama Arif 2025-02-07 332 addr = r->ar.start;
3a06696305e757 Usama Arif 2025-02-07 333 while (addr < r->ar.end) {
94ba17adaba0f6 SeongJae Park 2025-02-07 334 folio = damon_get_folio(PHYS_PFN(addr));
94ba17adaba0f6 SeongJae Park 2025-02-07 335 if (damon_pa_invalid_damos_folio(folio, s)) {
3a06696305e757 Usama Arif 2025-02-07 336 addr += PAGE_SIZE;
8cdcc532268df0 SeongJae Park 2022-06-13 337 continue;
3a06696305e757 Usama Arif 2025-02-07 338 }
18250e78f9c759 SeongJae Park 2022-12-05 339
b6993be23601c8 Kefeng Wang 2023-03-08 340 if (damos_pa_filter_out(s, folio))
b6993be23601c8 Kefeng Wang 2023-03-08 341 goto put_folio;
96f1971dabca71 SeongJae Park 2025-01-06 342 else
96f1971dabca71 SeongJae Park 2025-01-06 343 *sz_filter_passed += folio_size(folio);
18250e78f9c759 SeongJae Park 2022-12-05 344
8193321ac90d52 SeongJae Park 2022-09-13 345 if (mark_accessed)
f70da5ee8fe15b Vishal Moola (Oracle 2022-12-21 346) folio_mark_accessed(folio);
8193321ac90d52 SeongJae Park 2022-09-13 347 else
5a9e34747c9f73 Vishal Moola (Oracle 2022-12-21 348) folio_deactivate(folio);
f70da5ee8fe15b Vishal Moola (Oracle 2022-12-21 349) applied += folio_nr_pages(folio);
b6993be23601c8 Kefeng Wang 2023-03-08 350 put_folio:
3a06696305e757 Usama Arif 2025-02-07 351 addr += folio_size(folio);
dd52a61da0dd8b SeongJae Park 2023-03-04 352 folio_put(folio);
8cdcc532268df0 SeongJae Park 2022-06-13 353 }
94ba17adaba0f6 SeongJae Park 2025-02-07 @354 s->last_applied = folio;
8cdcc532268df0 SeongJae Park 2022-06-13 355 return applied * PAGE_SIZE;
8cdcc532268df0 SeongJae Park 2022-06-13 356 }
8cdcc532268df0 SeongJae Park 2022-06-13 357
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2025-05-27 18:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-27 18:50 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-09-09 13:21 mm/damon/paddr.c:321 damon_pa_pageout() error: uninitialized symbol 'folio' kernel test robot
2025-12-21 22:04 kernel test robot
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=202505280224.t2xtsPZP-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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.