On Thu, 30 Jul 2015, Mel Gorman wrote:

> There will be different opinions on periodic compaction but to be honest,
> periodic compaction also could be implemented from userspace using the
> compact_node sysfs files. The risk with periodic compaction is that it
> can cause stalls in applications that do not care if they fault the pages
> being migrated. This may happen even though there are zero requirements
> for high-order pages from anybody.
> 

When thp is enabled, I think there is always a non-zero requirement for 
high-order pages.  That's why we've shown an increase of 1.4% in cpu 
utilization over all our machines by doing periodic memory compaction.  
It's essential when thp is enabled and no amount of background compaction 
kicked off with a trigger similar to kswapd (which I have agreed with in 
this thread) is going to assist when a very large process is exec'd.

That's why my proposal was for background compaction through kcompactd 
kicked off in the allocator slowpath and for periodic compaction on, at 
the minimum, thp configurations to keep fragmentation low.  Dave Chinner 
seems to also have a usecase absent thp for high-order page cache 
allocation.

I think it would depend on how aggressive you are proposing background 
compaction to be, whether it will ever be MIGRATE_SYNC over all memory, or 
whether it will only terminate when a fragmentation index meets a 
threshold.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to