summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorWei Yang <richard.weiyang@gmail.com>2025-10-22 00:21:40 +0300
committerAndrew Morton <akpm@linux-foundation.org>2025-11-17 04:28:19 +0300
commit092ef3899707ac2a5ad195b96bcfb3c85d97f25c (patch)
tree25317a82c5591acff4346f5b08a8b624b8785d63 /include/linux
parentef0258857d40dd8e33c52e28ea3a1c82099a6879 (diff)
downloadlinux-092ef3899707ac2a5ad195b96bcfb3c85d97f25c.tar.xz
mm/huge_memory: update folio stat after successful split
The current implementation complicates this process: * It iterates over the resulting new folios. * It uses a flag (@stop_split) to conditionally skip updating the stat for the folio at @split_at during the loop. * It then attempts to update the skipped stat on a subsequent failure path. This logic is unnecessarily hard to follow. This commit refactors the code to update the folio statistics only after a successful split. This makes the logic much cleaner and sets the stage for further simplification of the stat-handling code. Link: https://lkml.kernel.org/r/20251021212142.25766-3-richard.weiyang@gmail.com Signed-off-by: Wei Yang <richard.weiyang@gmail.com> Acked-by: David Hildenbrand <david@redhat.com> Reviewed-by: Zi Yan <ziy@nvidia.com> Reviewed-by: wang lian <lianux.mm@gmail.com> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Cc: Baolin Wang <baolin.wang@linux.alibaba.com> Cc: Barry Song <baohua@kernel.org> Cc: Dev Jain <dev.jain@arm.com> Cc: Lance Yang <lance.yang@linux.dev> Cc: Liam Howlett <liam.howlett@oracle.com> Cc: Mariano Pache <npache@redhat.com> Cc: Ryan Roberts <ryan.roberts@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions