Srivatsa S. Bhat: Linux VM Infrastructure to support Memory Power Management

August 4, 2013

Participants: Srivatsa S. Bhat, Tony Luck, Dave Hansen, Matthew Wilcox, Kamezawa Hiroyuki, Lai Jiangshan, Yasuaki Ishimatsu, Johannes Weiner, Arjan van de Ven, Srinivas Pandruvada H. Peter Anvin.

People tagged: Andrew Morton, Mel Gorman, Dave Hansen, Matthew Garrett, Arjan Van de Ven, Srinivas Pandruvada, Len Brown, Yasuaki Ishimatsu.

Srivatsa S. Bhat proposes discussion memory power management, where unused memory is powered down, and also where data is moved in memory in order to free up a sufficiently large and well-aligned region that can be then powered down. Tony Luck wants this same sort of functionality for RAS, for example, for freeing up a removable memory unit prior to powering it off and removing it from the machine. Matthew Wilcox also wants similar mechanisms for upcoming persistent-RAM technology. Yasuaki Ishimatsu pointed out that current memory-hotplug support requires manual intervention, and could therefore stand improvement if it is to be used for energy conservation. Johannes Weiner noted a tradeoff between shutting down memory (thus conserving power) and increased work (e.g., paging) due to smaller memory (thus wasting power), noting also that it can be difficult to determine how much memory is enough. Srivatsa Bhat hopes to avoid this tradeoff by consolidating allocations and doing page migrations only to free up almost-empty regions. Srivatsa posted test results showing that his approach does in fact result in many more completely unused regions than does the vanilla kernel. This resulted in some debate over workloads. Arjan van de Ven further noted that the tradeoffs are a function of the hardware, so that the optimal tuning will change over time as well as from one system to another. Arjan suggested that auto-tuning was “important but interesting.” Srinivas Pandruvada expects that memory controllers will become smarter, so that idle memory will consume minimal power. Srinivas also likes the idea of grouping tasks into memory regions (presumably so that running a given task lights up a minimal set of memory regions). Discussion continued on detailed optimizations.

Dave Hansen pointed out that this sort of approach means that memory is no longer uniform, that an “allocate anywhere” approach no longer works. Dave attested to the importance of the topic, but questioned whether it would be better for Plumbers or the MM summit than for the kernel summit.

Lai Jiangshan seconded Tony's desire for removal of memory for RAS, but also calling for its use for load balancing.