Re: [PATCH v3] mm: Proactive compaction
From: Andrew Morton
Date: Mon Apr 20 2020 - 23:26:19 EST
On Tue, 10 Mar 2020 15:25:39 -0700 Nitin Gupta <nigupta@xxxxxxxxxx> wrote:
> For some applications we need to allocate almost all memory as
> hugepages. However, on a running system, higher order allocations can
> fail if the memory is fragmented. Linux kernel currently does on-demand
> compaction as we request more hugepages but this style of compaction
> incurs very high latency. Experiments with one-time full memory
> compaction (followed by hugepage allocations) shows that kernel is able
> to restore a highly fragmented memory state to a fairly compacted memory
> state within <1 sec for a 32G system. Such data suggests that a more
> proactive compaction can help us allocate a large fraction of memory as
> hugepages keeping allocation latencies low.
hn, there was plenty of feedback for earlier versions, but then
everyone went quiet. I guess it's time for a refresh and resend,
please.
With some code comments, please! Is the code really so self-evident
that this:
+/* Compact all zones within a node according to proactiveness */
is the only thing which needs to be said about it? How is the reader
to know what proactive compaction actually *is*?
What does extfrag_for_order() do and what does its return value mean?
Please document /sys/kernel/mm/compaction/proactiveness in the
appropriate place under Documentation/