On Thu, Sep 22, 2011 at 4:15 PM, Andrew Morton <akpm@xxxxxxxxxx> wrote: > On Fri, 16 Sep 2011 20:39:12 -0700 > Michel Lespinasse <walken@xxxxxxxxxx> wrote: > >> add statistics for pages that have been idle for 1,2,5,15,30,60,120 or >> 240 scan intervals into /dev/cgroup/*/memory.idle_page_stats > > Why? What's the use case for this feature? In the fakenuma implementation of kstaled, we were able to configure a different scan rate for each container (which was represented in the kernel as a set of fakenuma nodes, rather than a memory cgroup). This was used to reclaim memory more agressively from some containers than others, by varying the interval after which pages would be considered idle. In the memcg implementation, scanning is done globally so we can't configure a per-cgroup rate. Instead, we track the number of scan cycles that each page has been observed to be idle for. At that point, we could have a per-cgroup configurable threshold and report pages that have been idle for longer than that number of scans; however it seemed nicer to provide a full histogram since the information is actually available. -- Michel "Walken" Lespinasse A program is never fully debugged until the last user dies. -- 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