From: Michal Hocko <mhocko@suse.cz>
To: Dave Jones <davej@redhat.com>
Cc: linux-mm@kvack.org
Subject: Re: non-atomic rss_stat modifications
Date: Mon, 17 Mar 2014 12:00:29 +0100 [thread overview]
Message-ID: <20140317110029.GB4777@dhcp22.suse.cz> (raw)
In-Reply-To: <20140314021745.GA4894@redhat.com>
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@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2014-03-17 11:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-14 2:17 Dave Jones
2014-03-17 11:00 ` Michal Hocko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140317110029.GB4777@dhcp22.suse.cz \
--to=mhocko@suse.cz \
--cc=davej@redhat.com \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox