diff options
| author | Pedro Demarchi Gomes <pedrodemargomes@gmail.com> | 2025-11-05 21:49:11 +0300 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2025-11-17 04:28:28 +0300 |
| commit | 5d4939fc2258e80e0eda2a8a190c9e4f78f52456 (patch) | |
| tree | bfb18b6902a0413beb625a05c442301273bc7355 /include/linux | |
| parent | 912aa825957f556a29d781c8f4cb4f4dfd938a9d (diff) | |
| download | linux-5d4939fc2258e80e0eda2a8a190c9e4f78f52456.tar.xz | |
ksm: perform a range-walk in break_ksm
Make break_ksm() receive an address range and change break_ksm_pmd_entry()
to perform a range-walk and return the address of the first ksm page
found.
This change allows break_ksm() to skip unmapped regions instead of
iterating every page address. When unmerging large sparse VMAs, this
significantly reduces runtime.
In a benchmark unmerging a 32 TiB sparse virtual address space where only
one page was populated, the runtime dropped from 9 minutes to less then 5
seconds.
Link: https://lkml.kernel.org/r/20251105184912.186329-3-pedrodemargomes@gmail.com
Signed-off-by: Pedro Demarchi Gomes <pedrodemargomes@gmail.com>
Suggested-by: David Hildenbrand (Red Hat) <david@kernel.org>
Acked-by: David Hildenbrand (Red Hat) <david@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
