Re: [PATCH v5 14/36] mm/damon: skip private node memory in DAMON migration and pageout
[email protected] Tue, 21 Jul 2026 18:18:20 +0000
| Newsgroups | dev.linux.lists.nvdimm,dev.linux.lists.damon,org.kernel.vger.kvm,org.kernel.vger.linux-cxl |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] Inconsistent placement of the `folio_is_private_node()` check causes incorrect `sz_filter_passed` accounting and unnecessary filter side-effects in `damon_pa_migrate()` compared to `damon_pa_pageout()`. -- --- Patch [14]: [PATCH v5 14/36] mm/damon: skip private node memory in DAMON migration and pageout --- commit eb373ee8a3d83be1e35d66f74d2720ee3b1c26fa Author: Gregory Price <[email protected]> mm/damon: skip private node memory in DAMON migration and pageout This commit updates DAMON's physical address operations to skip private-node folios during both migration and pageout reclaim paths. > diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c > index e4f98d67461f5..c741a94319750 100644 > --- a/mm/damon/paddr.c > +++ b/mm/damon/paddr.c > @@ -250,6 +251,10 @@ static unsigned long damon_pa_pageout(struct damon_region *r, > continue; > } > > + /* private node memory is not reclaimable by default */ > + if (folio_is_private_node(folio)) > + goto put_folio; > + > if (damos_pa_filter_out(s, folio)) > goto put_folio; > else [ ... ] > @@ -344,6 +349,10 @@ static unsigned long damon_pa_migrate(struct damon_region *r, > else > *sz_filter_passed += folio_size(folio) / addr_unit; > > + /* private nodes do not support migration by default */ > + if (folio_is_private_node(folio)) > + goto put_folio; > + [Severity: Medium] Does placing this check after the filter evaluation cause incorrect DAMON statistics? Because the check happens here rather than before the filter evaluation, it appears unmigratable private node folios will be erroneously counted in sz_filter_passed. This might also trigger unnecessary filter logic evaluations before we ultimately skip the folio. Could we move this up before damos_pa_filter_out() in damon_pa_migrate() so it matches the logic flow used earlier in damon_pa_pageout()? > if (!folio_isolate_lru(folio)) > goto put_folio; > list_add(&folio->lru, &folio_list); -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=14