linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [LSF/MM TOPIC] wmark based pro-active compaction
@ 2016-12-30 13:14 Michal Hocko
  2016-12-30 14:06 ` Mel Gorman
  2017-03-08 14:56 ` Vlastimil Babka
  0 siblings, 2 replies; 8+ messages in thread
From: Michal Hocko @ 2016-12-30 13:14 UTC (permalink / raw)
  To: lsf-pc; +Cc: linux-mm, Vlastimil Babka, Mel Gorman, David Rientjes

Hi,
I didn't originally want to send this proposal because Vlastimil is
planning to do some work in this area so I've expected him to send
something similar. But the recent discussion about the THP defrag
options pushed me to send out my thoughts.

So what is the problem? The demand for high order pages is growing and
that seems to be the general trend. The problem is that while they can
bring performance benefit they can get be really expensive to allocate
especially when we enter the direct compaction. So we really want to
prevent from expensive path and defer as much as possible to the
background. A huge step forward was kcompactd introduced by Vlastimil.
We are still not there yet though, because it might be already quite
late when we wakeup_kcompactd(). The memory might be already fragmented
when we hit there. Moreover we do not have any way to actually tell
which orders we do care about.

Therefore I believe we need a watermark based pro-active compaction
which would keep the background compaction busy as long as we have
less pages of the configured order. kcompactd should wake up
periodically, I think, and check for the status so that we can catch
the fragmentation before we get low on memory.
The interface could look something like:
/proc/sys/vm/compact_wmark
time_period order count

There are many details that would have to be solved of course - e.g. do
not burn cycles pointlessly when we know that no further progress can be
made etc... but in principle the idea show work.
-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2017-03-08 14:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-30 13:14 [LSF/MM TOPIC] wmark based pro-active compaction Michal Hocko
2016-12-30 14:06 ` Mel Gorman
2017-01-05  9:53   ` Vlastimil Babka
2017-01-05 10:27     ` Michal Hocko
2017-01-06  8:57       ` Vlastimil Babka
2017-01-13  7:03     ` Joonsoo Kim
2017-01-19 14:18       ` Vlastimil Babka
2017-03-08 14:56 ` Vlastimil Babka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).