On Thu 13-03-14 22:17:45, Dave Jones wrote: > I've been trying to make sense of this message which I keep seeing.. > > BUG: Bad rss-counter state mm:ffff88018bb78000 idx:0 val:1 > > Looking at the FILEPAGES counter accesses... > > $ rgrep FILEPAGES mm > mm/filemap_xip.c: dec_mm_counter(mm, MM_FILEPAGES); > mm/oom_kill.c: K(get_mm_counter(victim->mm, MM_FILEPAGES))); > mm/fremap.c: dec_mm_counter(mm, MM_FILEPAGES); > mm/memory.c: rss[MM_FILEPAGES]++; > mm/memory.c: rss[MM_FILEPAGES]++; > mm/memory.c: rss[MM_FILEPAGES]--; > mm/memory.c: rss[MM_FILEPAGES]--; > mm/memory.c: inc_mm_counter_fast(mm, MM_FILEPAGES); > mm/memory.c: dec_mm_counter_fast(mm, MM_FILEPAGES); > mm/memory.c: inc_mm_counter_fast(mm, MM_FILEPAGES); > mm/rmap.c: dec_mm_counter(mm, MM_FILEPAGES); > mm/rmap.c: dec_mm_counter(mm, MM_FILEPAGES); > mm/rmap.c: dec_mm_counter(mm, MM_FILEPAGES); > > > How come we sometimes use the atomic accessors, but in copy_one_pte() and > zap_pte_range() we don't ? Is that safe ? Those two use a local counter which is then added to the global one. See copy_pte_range (resp. zap_pte_range) and add_mm_rss_vec they use. -- Michal Hocko 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/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>