aboutsummaryrefslogtreecommitdiffstats
path: root/tools/workqueue
diff options
context:
space:
mode:
authorBaolin Wang <baolin.wang@linux.alibaba.com>2025-04-09 17:38:58 +0800
committerAndrew Morton <akpm@linux-foundation.org>2025-05-11 17:48:26 -0700
commit10d483f198cf35504fcffc677ac116190839a34f (patch)
tree87171420168555dc5ce434719aef9f32449137f4 /tools/workqueue
parenttools/testing/selftests: assert that anon merge cases behave as expected (diff)
downloadlinux-10d483f198cf35504fcffc677ac116190839a34f.tar.gz
linux-10d483f198cf35504fcffc677ac116190839a34f.zip
mm: huge_memory: add folio_mark_accessed() when zapping file THP
When investigating performance issues during file folio unmap, I noticed some behavioral differences in handling non-PMD-sized folios and PMD-sized folios. For non-PMD-sized file folios, it will call folio_mark_accessed() to mark the folio as having seen activity, but this is not done for PMD-sized folios. This might not cause obvious issues, but a potential problem could be that, it might lead to reclaim of hot file folios under memory pressure, as quoted from Johannes: : Sometimes file contents are only accessed through relatively short-lived : mappings. But they can nevertheless be accessed a lot and be hot. It's : important to not lose that information on unmap, and end up kicking out a : frequently used cache page. Therefore, we should also add folio_mark_accessed() for PMD-sized file folios when unmapping. [baolin.wang@linux.alibaba.com: add comment] Link: https://lkml.kernel.org/r/23fdc11d-e983-4627-89a8-79e9ecf9a45a@linux.alibaba.com Link: https://lkml.kernel.org/r/fc117f60d7b686f87067f36a0ef7cdbc3a78109c.1744190345.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Zi Yan <ziy@nvidia.com> Acked-by: David Hildenbrand <david@redhat.com> Reviewed-by: Oscar Salvador <osalvador@suse.de> Cc: Barry Song <21cnbao@gmail.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Ryan Roberts <ryan.roberts@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/workqueue')
0 files changed, 0 insertions, 0 deletions