All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Andrea Arcangeli <aarcange@redhat.com>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: Borislav Petkov <bp@alien8.de>,
	Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
	Michal Hocko <mhocko@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	x86-ml <x86@kernel.org>, linux-mm <linux-mm@kvack.org>,
	Hugh Dickins <hughd@google.com>
Subject: Re: kernel BUG at mm/swap.c:134! - page dumped because: VM_BUG_ON_PAGE(page_mapcount(page) != 0)
Date: Sat, 25 Apr 2015 00:42:25 +0300	[thread overview]
Message-ID: <20150424214225.GA18804@node.dhcp.inet.fi> (raw)
In-Reply-To: <20150423162311.GB19709@redhat.com>

On Thu, Apr 23, 2015 at 06:23:11PM +0200, Andrea Arcangeli wrote:
> On Wed, Apr 22, 2015 at 12:26:55PM -0700, Linus Torvalds wrote:
> > On Wed, Apr 22, 2015 at 11:33 AM, Kirill A. Shutemov
> > <kirill@shutemov.name> wrote:
> > >
> > > Could you try patch below instead? This can give a clue what's going on.
> > 
> > Just FYI, I've done the revert in my tree.
> > 
> > Trying to figure out what is going on despite that is obviously a good
> > idea, but I'm hoping that my merge window is winding down, so I am
> > trying to make sure it's all "good to go"..
> 
> Sounds safer to defer it, agreed.
> 
> Unfortunately I also can only reproduce it only on a workstation where
> it wasn't very handy to debug it as it'd disrupt my workflow and it
> isn't equipped with reliable logging either (and the KMS mode didn't
> switch to console to show me the oops either). It just got it logged
> once in syslog before freezing.
> 
> The problem has to be that there's some get_page/put_page activity
> before and after a PageAnon transition and it looks like a tail page
> got mapped by hand in userland by some driver using 4k ptes which
> isn't normal

Compound pages mapped with PTEs predates THP. See f3d48f0373c1.

> but apparently safe before the patch was applied. Before
> the patch, the tail page accounting would be symmetric regardless of
> the PageAnon transition.
> 
> page:ffffea0010226040 count:0 mapcount:1 mapping:          (null) index:0x0
> flags: 0x8000000000008010(dirty|tail)
> page dumped because: VM_BUG_ON_PAGE(page_mapcount(page) != 0)
> ------------[ cut here ]------------
> kernel BUG at mm/swap.c:134!

I looked into code a bit more. And the VM_BUG_ON_PAGE() is bogus. See
explanation in commit message below.

Tail page refcounting is mess. Please consider reviewing my patchset which
drops it [1]. ;)

Linus, how should we proceed with reverted patch? Should I re-submit it to
Andrew? Or you'll re-revert it?

[1] lkml.kernel.org/g/1429823043-157133-1-git-send-email-kirill.shutemov@linux.intel.com

  reply	other threads:[~2015-04-24 21:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20150418205656.GA7972@pd.tnic>
2015-04-18 21:27 ` kernel BUG at mm/swap.c:134! - page dumped because: VM_BUG_ON_PAGE(page_mapcount(page) != 0) Linus Torvalds
2015-04-18 21:56   ` Kirill A. Shutemov
2015-04-18 21:59     ` Linus Torvalds
2015-04-18 22:08       ` Borislav Petkov
2015-04-18 22:16         ` Borislav Petkov
2015-04-18 22:16           ` Borislav Petkov
2015-04-22 13:12         ` Borislav Petkov
2015-04-22 18:33           ` Kirill A. Shutemov
2015-04-22 18:40             ` Borislav Petkov
2015-04-22 18:43               ` Kirill A. Shutemov
2015-04-22 19:18                 ` Borislav Petkov
2015-04-22 19:26             ` Linus Torvalds
2015-04-23 16:23               ` Andrea Arcangeli
2015-04-24 21:42                 ` Kirill A. Shutemov [this message]
2015-04-27 16:40                   ` Andrea Arcangeli
2015-04-18 22:12       ` Linus Torvalds
2015-04-20  0:02         ` Naoya Horiguchi

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=20150424214225.GA18804@node.dhcp.inet.fi \
    --to=kirill@shutemov.name \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=hughd@google.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.cz \
    --cc=n-horiguchi@ah.jp.nec.com \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.