On Fri, 29 Apr 2011, Tejun Heo wrote: > > I am content to be maintaining the vm statistics.... But Shaohua may want > > to have a look at it? > > It would be nice if vmstat can be merged with percpu counter tho so > that the flushing can be done together. If we such piggybacking, the > flushing overhead becomes much easier to justify. Right. We could put the folding of the percpu counters diffs into the vmstats function. See vmstat.c:refresh_cpu_vm_stats(). They would be folded with the same logic as the VM stats. percpu counters are a linked list though and therefore its expensive to scan that list. Maybe we can convert that to a vmalloced table? > How does vmstat collect the percpu counters? Does one cpu visit all > of them or each cpu flush local counter to global one periodically? Each cpu folds its differentials into the per zone and the global counter every N seconds. The seconds are configurable via /proc/sys/vm/stats_interval. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx 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>