Re: [PATCH] mm: Do not stall in synchronous compaction for THP allocations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 15, 2011 at 01:07:51PM -0800, David Rientjes wrote:
> On Tue, 15 Nov 2011, Mel Gorman wrote:
> 
> > Fine control is limited. If it is really needed, I would not oppose
> > a patch that allows the use of sync compaction via a new setting in
> > /sys/kernel/mm/transparent_hugepage/defrag. However, I think it is
> > a slippery slope to expose implementation details like this and I'm
> > not currently planning to implement such a patch.
> > 
> 
> This doesn't expose any implementation detail, the "defrag" tunable is 
> supposed to limit defragmentation efforts in the VM if the hugepages 
> aren't immediately available and simply fallback to using small pages.  

The current settings are "always", "madvise" and "never" which matches
the settings for /sys/kernel/mm/transparent_hugepage/enabled and are
fairly straight forward.

Adding sync here could obviously be implemented although it may
require both always-sync and madvise-sync. Alternatively, something
like an options file could be created to create a bitmap similar to
what ftrace does. Whatever the mechanism, it exposes the fact that
"sync compaction" is used. If that turns out to be not enough, then
you may want to add other steps like aggressively reclaiming memory
which also potentially may need to be controlled via the sysfs file
and this is the slippery slope.

> Given that definition, it would make sense to allow for synchronous 
> defragmentation (i.e. sync_compaction) on the second iteration of the page 
> allocator slowpath if set.  So where's the disconnect between this 
> proposed behavior and the definition of the tunable in 
> Documentation/vm/transhuge.txt?

The transhuge.txt file does not describe how defrag works or whether it
uses sync compaction internally.

-- 
Mel Gorman
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]