On Tue 29-01-13 21:44:44, Sha Zhengju wrote: > On Mon, Jan 28, 2013 at 10:10 PM, Michal Hocko <mhocko@xxxxxxx> wrote: [...] > >> But CPU-B may do "moving" in advance that > >> "old_memcg->nr_dirty --" will make old_memcg->nr_dirty incorrect but > >> soon CPU-A will do "memcg->nr_dirty ++" finally that amend the stats. > > > > The counter is per-cpu so we are safe wrt. atomic increments and we can > > probably tolerate off-by 1 temporal errors (mem_cgroup_read_stat would > > need val = min(val, 0);). > > Sorry, I cannot catch the 'min(val, 0)' part.. or do you mean max? Ohh, yeah. Head was telling max, fingers disagreed. -- Michal Hocko SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe cgroups" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html