[Devel] [PATCH hci-8.2 v2 2/3] mm/memcontrol: say where the numa_migrate code comes from
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Tue Nov 17 19:28:02 MSK 2026
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] mm: memcg_numa_migrate_new_folio() comment wrongly says gfp
follows alloc_migration_target()
--
commit 2b0b5c5c2e0f48e28f410ad926fddeacad923c4a
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
mm/memcontrol: say where the numa_migrate code comes from
The patch replaces the rebase-history comment in memcg_numa_isolate_pages() with the names of the upstream functions it copies. It also names alloc_migration_target() as the original of the allocator and removes leftover commented-out conditions. No functional change is intended.
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index a82d5e7bc869..4c3c06cfcf9f 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
[ ... ]
> @@ -3473,7 +3473,8 @@ struct memcg_numa_migrate_struct {
>
> /*
> * Used as an argument for migrate_pages(). Allocated pages are spread evenly
> - * among destination nodes.
> + * among destination nodes. The order and gfp choice follow
> + * alloc_migration_target().
> */
> static struct folio *memcg_numa_migrate_new_folio(struct folio *old_folio,
> unsigned long private)
[Severity: Low]
Is the claim that the gfp choice follows alloc_migration_target() accurate?
Only the order matches. alloc_migration_target() clears __GFP_RECLAIM and ORs in GFP_TRANSHUGE for large folios. It also adds __GFP_HIGHMEM based on the source zone. memcg_numa_migrate_new_folio() hardcodes GFP_HIGHUSER_MOVABLE | __GFP_NORETRY | __GFP_NOWARN. For large folios it uses GFP_TRANSHUGE_LIGHT | __GFP_THISNODE, and it has no hugetlb or zone-based highmem handling.
The commit message says the point is to give a rebase the functions to compare against, so a comment claiming gfp parity could mislead that rebase. Could the comment be limited to the large-folio order and the __folio_alloc() usage, and say that the gfp mask is deliberately different? The series tip (f81bad5580ae) still carries this comment text, so a later patch does not correct it.
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261117-b4-prep-khorenko-vstor-152197-numa-migrate-cleanup-v2-0-1dce69bd115c@virtuozzo.com?part=2
More information about the Devel
mailing list