From: Michal Hocko <mhocko@suse.com>
To: Qian Cai <cai@lca.pw>
Cc: hughd@google.com, Andrea Arcangeli <aarcange@redhat.com>,
torvalds@linux-foundation.org, vbabka@suse.cz,
akpm@linux-foundation.org, Linux-MM <linux-mm@kvack.org>
Subject: Re: BUG() due to "mm: put_and_wait_on_page_locked() while page is migrated"
Date: Wed, 23 Jan 2019 10:30:02 +0100 [thread overview]
Message-ID: <20190123093002.GP4087@dhcp22.suse.cz> (raw)
In-Reply-To: <f87ecfb2-64d3-23d4-54d7-a8ac37733206@lca.pw>
On Tue 22-01-19 23:29:04, Qian Cai wrote:
> Running LTP migrate_pages03 [1] a few times triggering BUG() below on an arm64
> ThunderX2 server. Reverted the commit 9a1ea439b16b9 ("mm:
> put_and_wait_on_page_locked() while page is migrated") allows it to run
> continuously.
>
> put_and_wait_on_page_locked
> wait_on_page_bit_common
> put_page
> put_page_testzero
> VM_BUG_ON_PAGE(page_ref_count(page) == 0, page);
>
> [1]
> https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/syscalls/migrate_pages/migrate_pages03.c
>
> [ 1304.643587] page:ffff7fe0226ff000 count:2 mapcount:0 mapping:ffff8095c3406d58 index:0x7
> [ 1304.652082] xfs_address_space_operations [xfs]
[...]
> [ 1304.682652] page dumped because: VM_BUG_ON_PAGE(page_ref_count(page) == 0)
This looks like a page reference countimbalance to me. The page seemed
to be freed at the the migration code (wait_on_page_bit_common) called
put_page and immediatelly got reused for xfs allocation and that is why
we see its ref count==2. But I fail to see how that is possible as
__migration_entry_wait already does get_page_unless_zero so the
imbalance must have been preexisting.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2019-01-23 9:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-23 4:29 Qian Cai
2019-01-23 9:30 ` Michal Hocko [this message]
2019-01-25 4:19 ` Hugh Dickins
2019-01-25 4:19 ` Hugh Dickins
2019-01-25 4:31 ` Qian Cai
2019-01-25 8:51 ` Michal Hocko
2019-01-26 3:17 ` Qian Cai
2019-02-05 19:08 ` Hugh Dickins
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=20190123093002.GP4087@dhcp22.suse.cz \
--to=mhocko@suse.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=cai@lca.pw \
--cc=hughd@google.com \
--cc=linux-mm@kvack.org \
--cc=torvalds@linux-foundation.org \
--cc=vbabka@suse.cz \
/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