summaryrefslogtreecommitdiff
path: root/scripts/checkstack.pl
diff options
context:
space:
mode:
authorKiryl Shutsemau (Meta) <kas@kernel.org>2026-09-28 11:06:22 +0100
committerAndrew Morton <akpm@linux-foundation.org>2026-10-08 23:06:29 -0700
commitf9b361c644e3b972bc67f0bc6cbd441ecd492ffd (patch)
treee527af222f6429acb7af9aa19c225ad4ff7be527 /scripts/checkstack.pl
parent8f33d6d9d028ed5b14c36c73ddb9b168de943d86 (diff)
downloadlinux-next-f9b361c644e3b972bc67f0bc6cbd441ecd492ffd.tar.gz
linux-next-f9b361c644e3b972bc67f0bc6cbd441ecd492ffd.zip
mm/collapse: call collapse_file() from collapse_single_pmd()
collapse_scan_file() reads the page cache to decide whether a table is worth collapsing and, when it is, calls collapse_file() itself. The caller cannot get between the decision and the collapse. Move the collapse_file() call up into collapse_single_pmd(), so the scan stops at the decision. Two things change with it. The writeback retry re-runs collapse_file() alone instead of rescanning first; collapse_file() repeats the scan's checks under the page cache lock anyway. And mm_khugepaged_scan_file fires before the collapse, so for an accepted table its status reads SCAN_SUCCEED; what the collapse made of the table is for mm_khugepaged_collapse_file to report. Preparation for splitting a collapse into a scan under mmap_lock and a run without it. The file scan has to stop where the anonymous one will. Link: https://lore.kernel.org/20260928100630.21870-9-kirill@shutemov.name Signed-off-by: Kiryl Shutsemau (Meta) <kas@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Zi Yan <ziy@nvidia.com> Acked-by: David Hildenbrand (Arm) <david@kernel.org> Assisted-by: LLM Cc: Lorenzo Stoakes <ljs@kernel.org> Cc: Baolin Wang <baolin.wang@linux.alibaba.com> 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: Lance Yang <lance.yang@linux.dev> Cc: Usama Arif <usama.arif@linux.dev> Cc: Vlastimil Babka <vbabka@kernel.org> Cc: Jann Horn <jannh@google.com>
Diffstat (limited to 'scripts/checkstack.pl')
0 files changed, 0 insertions, 0 deletions