Thread (11 messages) 11 messages, 5 authors, 2012-06-26

Re: [patch] mm, thp: abort compaction if migration page cannot be charged to memcg

From: Rik van Riel <hidden>
Date: 2012-06-25 20:41:57
Also in: lkml

On 06/21/2012 02:52 AM, David Rientjes wrote:
If page migration cannot charge the new page to the memcg,
migrate_pages() will return -ENOMEM.  This isn't considered in memory
compaction however, and the loop continues to iterate over all pageblocks
trying in a futile attempt to continue migrations which are only bound to
fail.

This will short circuit and fail memory compaction if migrate_pages()
returns -ENOMEM.  COMPACT_PARTIAL is returned in case some migrations
were successful so that the page allocator will retry.
The patch makes sense, however I wonder if it would make
more sense in the long run to allow migrate/compaction to
temporarily exceed the memcg memory limit for a cgroup,
because the original page will get freed again soon anyway.

That has the potential to improve compaction success, and
reduce compaction related CPU use.

--
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>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help