linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] mm/compaction: allow more aggressive proactive compaction
@ 2025-01-27 21:50 Michal Clapinski
  2025-01-27 21:50 ` [PATCH v3 1/2] mm/compaction: remove low watermark cap for " Michal Clapinski
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Michal Clapinski @ 2025-01-27 21:50 UTC (permalink / raw)
  To: Andrew Morton, Vlastimil Babka, Pasha Tatashin
  Cc: linux-mm, linux-kernel, Michal Clapinski

Our goal is to keep memory usage of a VM low on the host. For that
reason, we use free page reporting which by default reports free pages
of order 9 and larger to the host to be freed. The feature works well
only if the memory in the guest is not fragmented below pages of order
9. Proactive compaction can be reused to achieve defragmentation after
some parameter tweaking.

When the fragmentation score (lower is better) gets larger than the
high watermark, proactive compaction kicks in. Compaction stops when
the score goes below the low watermark (or no progress is made and
backoff kicks in). Let's define the difference between high and low
watermarks as leeway. Before these changes, the minimum possible value
for low watermark was 5 and the leeway was hardcoded to 10 (so minimum
possible value for high watermark was 15).

v3: Remove gerrit ids from commit msgs.
v2: Change commit msgs and document the new sysctl.

Michal Clapinski (2):
  mm/compaction: remove low watermark cap for proactive compaction
  mm/compaction: make proactive compaction high watermark configurable
    via sysctl

 Documentation/admin-guide/sysctl/vm.rst | 17 +++++++++++++++++
 mm/compaction.c                         | 14 ++++++++++++--
 2 files changed, 29 insertions(+), 2 deletions(-)

-- 
2.48.1.262.g85cc9f2d1e-goog



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-03-17  1:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-27 21:50 [PATCH v3 0/2] mm/compaction: allow more aggressive proactive compaction Michal Clapinski
2025-01-27 21:50 ` [PATCH v3 1/2] mm/compaction: remove low watermark cap for " Michal Clapinski
2025-01-28  1:17   ` Andrew Morton
2025-01-27 21:50 ` [PATCH v3 2/2] mm/compaction: make proactive compaction high watermark configurable via sysctl Michal Clapinski
2025-01-28  1:18   ` Andrew Morton
2025-01-30 14:18     ` Vlastimil Babka
2025-01-30 18:15       ` Michał Cłapiński
2025-01-28  1:07 ` [PATCH v3 0/2] mm/compaction: allow more aggressive proactive compaction Andrew Morton
2025-03-17  1:02 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox