mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
mm/collapse: name the per-table scan reset for what it resets
collapse_control_init_scan() resets what one scan accumulates: the node load, the allocation nodemask and the eligible-PTE bitmap. It runs before every PTE table a scan is given, not once per control, so its name points at the wrong thing. Call it collapse_scan_reset(). Preparation for giving a control a real init, run once for a whole series of scans. Two names a word apart would then stand for two different jobs. No functional change. Link: https://lore.kernel.org/20261014171145.3292736-8-kas@kernel.org Signed-off-by: Kiryl Shutsemau (Meta) <kas@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: David Hildenbrand (Arm) <david@kernel.org> Reviewed-by: Zi Yan <ziy@nvidia.com> Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com> Reviewed-by: Lance Yang <lance.yang@linux.dev> Assisted-by: LLM Cc: Lorenzo Stoakes <ljs@kernel.org> Cc: Liam R. Howlett <liam@infradead.org> Cc: Nico Pache <nico.pache@linux.dev> Cc: Ryan Roberts <ryan.roberts@arm.com> Cc: Dev Jain <dev.jain@arm.com> Cc: Barry Song <baohua@kernel.org> Cc: Usama Arif <usama.arif@linux.dev> Cc: Vlastimil Babka <vbabka@kernel.org> Cc: Jann Horn <jannh@google.com>
This commit is contained in:
parent
d5dd87dbd6
commit
e7c4148ad1
|
|
@ -532,7 +532,7 @@ void __khugepaged_exit(struct mm_struct *mm)
|
|||
}
|
||||
}
|
||||
|
||||
static void collapse_control_init_scan(struct collapse_control *cc)
|
||||
static void collapse_scan_reset(struct collapse_control *cc)
|
||||
{
|
||||
memset(cc->node_load, 0, sizeof(cc->node_load));
|
||||
nodes_clear(cc->alloc_nmask);
|
||||
|
|
@ -1607,7 +1607,7 @@ static enum scan_result collapse_scan_pmd(struct mm_struct *mm,
|
|||
goto out;
|
||||
}
|
||||
|
||||
collapse_control_init_scan(cc);
|
||||
collapse_scan_reset(cc);
|
||||
|
||||
enabled_orders = collapse_possible_orders(vma, vma->vm_flags, tva_flags);
|
||||
|
||||
|
|
@ -2681,7 +2681,7 @@ static enum scan_result collapse_scan_file(struct mm_struct *mm,
|
|||
|
||||
present = 0;
|
||||
swap = 0;
|
||||
collapse_control_init_scan(cc);
|
||||
collapse_scan_reset(cc);
|
||||
rcu_read_lock();
|
||||
xas_for_each(&xas, folio, start + HPAGE_PMD_NR - 1) {
|
||||
if (xas_retry(&xas, folio))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user