Re: non-atomic rss_stat modifications

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]