News: 0001614551

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Linux 7.0 Speeds Up Reclaiming File-Backed Large Folios By 50~75%

([Linux Kernel] 6 Hours Ago Nice Improvement)


Merged on Wednesday were some additional memory management "MM" updates for the Linux 7.0 merge window. Most interesting out of these latest three dozen patches is support for batched unmapping of file-backed large folios.

The patches to support batch checking of references and unmapping for large folios is showing very nice performance numbers for reclaiming file-backed large folios. This work was carried out by Alibaba engineer Baolin Wang. He explained back on [1]the patch series :

"Currently, folio_referenced_one() always checks the young flag for each PTE sequentially, which is inefficient for large folios. This inefficiency is especially noticeable when reclaiming clean file-backed large folios, where folio_referenced() is observed as a significant performance hotspot.

Moreover, on Arm architecture, which supports contiguous PTEs, there is already an optimization to clear the young flags for PTEs within a contiguous range. However, this is not sufficient. We can extend this to perform batched operations for the entire large folio (which might exceed the contiguous range: CONT_PTE_SIZE)."

When the patch series concludes with the batched unmapping for file large folios is where the numbers come out and are quite enticing:

"Performance testing:

Allocate 10G clean file-backed folios by mmap() in a memory cgroup, and try to reclaim 8G file-backed folios via the memory.reclaim interface. I can observe 75% performance improvement on my Arm64 32-core server (and 50%+ improvement on my X86 machine) with this patch."

Some nice gains and with the increasing use of folios throughout the Linux kernel.

See [2]this MM pull request for those interested in these latest patches now merged for Linux 7.0.



[1] https://lore.kernel.org/lkml/cover.1770645603.git.baolin.wang@linux.alibaba.com/

[2] https://lore.kernel.org/lkml/20260218200016.8906fb904af9439e7b496327@linux-foundation.org/



Brief History Of Linux (#11)
Birth of Gates and the Anti-Gates

October 28, 1955 saw the birth of William H. Gates, who would rise above
his humble beginnings as the son of Seattle's most powerful millionaire
lawyer and become the World's Richest Man(tm). A classic American
rags-to-riches story (with "rags" referring to the dollar bills that the
Gates family used for toilet paper), Bill Gates is now regarded as the
world's most respected businessman by millions of clueless people that
have obviously never touched a Windows machine.

Nature is all about balance. The birth of Gates in 1955 tipped the cosmic
scales toward evil, but the birth of Linus Torvalds in 1969 finally
balanced them out. Linus' destiny as the savior of Unix and the slayer of
money-breathing Redmond dragons was sealed when, just mere hours after his
birth, the Unix epoch began January 1st, 1970. While the baseline for Unix
timekeeping might be arbitrary, we here at Humorix like to thank the its
proximity of Linus' birth is no coincidence.