linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sasha.levin@oracle.com>
To: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Hugh Dickins <hughd@google.com>
Cc: Dave Hansen <dave.hansen@intel.com>, Mel Gorman <mgorman@suse.de>,
	Rik van Riel <riel@redhat.com>, Vlastimil Babka <vbabka@suse.cz>,
	Christoph Lameter <cl@gentwo.org>,
	Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
	Steve Capper <steve.capper@linaro.org>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@suse.cz>,
	Jerome Marchand <jmarchan@redhat.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCHv3 14/24] thp: implement new split_huge_page()
Date: Thu, 12 Feb 2015 12:07:58 -0500	[thread overview]
Message-ID: <54DCDDEE.5030501@oracle.com> (raw)
In-Reply-To: <1423757918-197669-15-git-send-email-kirill.shutemov@linux.intel.com>

On 02/12/2015 11:18 AM, Kirill A. Shutemov wrote:
> +void __get_page_tail(struct page *page);
>  static inline void get_page(struct page *page)
>  {
> -	struct page *page_head = compound_head(page);
> -	VM_BUG_ON_PAGE(atomic_read(&page_head->_count) <= 0, page);
> -	atomic_inc(&page_head->_count);
> +	if (unlikely(PageTail(page)))
> +		return __get_page_tail(page);
> +
> +	/*
> +	 * Getting a normal page or the head of a compound page
> +	 * requires to already have an elevated page->_count.
> +	 */
> +	VM_BUG_ON_PAGE(atomic_read(&page->_count) <= 0, page);

This BUG_ON seems to get hit:

[  612.180784] page:ffffea00004cb180 count:0 mapcount:0 mapping:          (null) index:0x2
[  612.188538] flags: 0x1fffff80000000()
[  612.190452] page dumped because: VM_BUG_ON_PAGE(atomic_read(&page->_count) <= 0)
[  612.195857] ------------[ cut here ]------------
[  612.196636] kernel BUG at include/linux/mm.h:463!
[  612.196636] invalid opcode: 0000 [#1] PREEMPT SMP KASAN
[  612.196636] Dumping ftrace buffer:
[  612.196636]    (ftrace buffer empty)
[  612.196636] Modules linked in:
[  612.196636] CPU: 21 PID: 16300 Comm: trinity-c99 Not tainted 3.19.0-next-20150212-sasha-00072-gdc1aa32 #1913
[  612.196636] task: ffff880012dbb000 ti: ffff880012df8000 task.ti: ffff880012df8000
[  612.196636] RIP: copy_page_range (include/linux/mm.h:463 mm/memory.c:921 mm/memory.c:971 mm/memory.c:993 mm/memory.c:1055)
[  612.196636] RSP: 0018:ffff880012dffad0  EFLAGS: 00010286
[  612.196636] RAX: dffffc0000000000 RBX: 00000000132c6100 RCX: 0000000000000000
[  612.196636] RDX: 1ffffd4000099637 RSI: 0000000000000000 RDI: ffffea00004cb1b8
[  612.196636] RBP: ffff880012dffc60 R08: 0000000000000001 R09: 0000000000000000
[  612.196636] R10: ffffffffa5875ce8 R11: 0000000000000001 R12: ffff880012df6630
[  612.196636] R13: ffff880711fe6630 R14: 00007f33954c6000 R15: 0000000000000010
[  612.196636] FS:  00007f33993b0700(0000) GS:ffff880712800000(0000) knlGS:0000000000000000
[  612.196636] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  612.196636] CR2: 00007f33993b06c8 CR3: 000000002ab33000 CR4: 00000000000007a0
[  612.196636] DR0: ffffffff80000fff DR1: 0000000000000000 DR2: 0000000000000000
[  612.196636] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000b1060a
[  612.196636] Stack:
[  612.196636]  ffffffffa1937460 0000000000000002 ffff880012dffb30 ffffffff944141f6
[  612.196636]  ffff880012df8010 0000000000000020 ffff880012dffbf0 0000000000000000
[  612.196636]  0000000008100073 1ffff100025bff7a ffff880012df1e50 1ffff100025bf002
[  612.196636] Call Trace:
[  612.196636] ? __lock_is_held (kernel/locking/lockdep.c:3518)
[  612.196636] ? apply_to_page_range (mm/memory.c:1002)
[  612.196636] ? __vma_link_rb (mm/mmap.c:633)
[  612.196636] ? anon_vma_fork (mm/rmap.c:351)
[  612.196636] copy_process (kernel/fork.c:470 kernel/fork.c:869 kernel/fork.c:923 kernel/fork.c:1395)
[  612.196636] ? __cleanup_sighand (kernel/fork.c:1196)
[  612.196636] do_fork (kernel/fork.c:1659)
[  612.196636] ? trace_hardirqs_on_caller (kernel/locking/lockdep.c:2554 kernel/locking/lockdep.c:2601)
[  612.196636] ? fork_idle (kernel/fork.c:1636)
[  612.196636] ? syscall_trace_enter_phase2 (arch/x86/kernel/ptrace.c:1598)
[  612.196636] SyS_clone (kernel/fork.c:1748)
[  612.196636] stub_clone (arch/x86/kernel/entry_64.S:517)
[  612.196636] ? tracesys_phase2 (arch/x86/kernel/entry_64.S:422)
[ 612.196636] Code: ff df 48 89 f9 48 c1 e9 03 80 3c 11 00 0f 85 4c 04 00 00 48 8b 48 30 e9 fe f9 ff ff 48 c7 c6 40 34 f4 9e 48 89 c7 e8 0e ca fe ff <0f> 0b 0f 0b 48 89 c7 e8 12 2a ff ff e9 df fb ff ff 0f 0b 0f 0b
All code
========
   0:   ff df                   lcallq *<internal disassembler error>
   2:   48 89 f9                mov    %rdi,%rcx
   5:   48 c1 e9 03             shr    $0x3,%rcx
   9:   80 3c 11 00             cmpb   $0x0,(%rcx,%rdx,1)
   d:   0f 85 4c 04 00 00       jne    0x45f
  13:   48 8b 48 30             mov    0x30(%rax),%rcx
  17:   e9 fe f9 ff ff          jmpq   0xfffffffffffffa1a
  1c:   48 c7 c6 40 34 f4 9e    mov    $0xffffffff9ef43440,%rsi
  23:   48 89 c7                mov    %rax,%rdi
  26:   e8 0e ca fe ff          callq  0xfffffffffffeca39
  2b:*  0f 0b                   ud2             <-- trapping instruction
  2d:   0f 0b                   ud2
  2f:   48 89 c7                mov    %rax,%rdi
  32:   e8 12 2a ff ff          callq  0xffffffffffff2a49
  37:   e9 df fb ff ff          jmpq   0xfffffffffffffc1b
  3c:   0f 0b                   ud2
  3e:   0f 0b                   ud2
        ...

Code starting with the faulting instruction
===========================================
   0:   0f 0b                   ud2
   2:   0f 0b                   ud2
   4:   48 89 c7                mov    %rax,%rdi
   7:   e8 12 2a ff ff          callq  0xffffffffffff2a1e
   c:   e9 df fb ff ff          jmpq   0xfffffffffffffbf0
  11:   0f 0b                   ud2
  13:   0f 0b                   ud2
        ...
[  612.196636] RIP copy_page_range (include/linux/mm.h:463 mm/memory.c:921 mm/memory.c:971 mm/memory.c:993 mm/memory.c:1055)
[  612.196636]  RSP <ffff880012dffad0>


Thanks,
Sasha

--
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>

  reply	other threads:[~2015-02-12 17:08 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-12 16:18 [PATCHv3 00/24] THP refcounting redesign Kirill A. Shutemov
2015-02-12 16:18 ` [PATCHv3 01/24] thp: cluster split_huge_page* code together Kirill A. Shutemov
2015-02-12 16:18 ` [PATCHv3 02/24] mm: change PageAnon() and page_anon_vma() to work on tail pages Kirill A. Shutemov
2015-02-12 16:18 ` [PATCHv3 03/24] mm: avoid PG_locked " Kirill A. Shutemov
2015-02-12 19:55   ` Rik van Riel
2015-02-12 20:10     ` Rik van Riel
2015-03-03 13:21       ` Aneesh Kumar K.V
2015-03-03 13:35         ` Kirill A. Shutemov
2015-03-03 15:21           ` Aneesh Kumar K.V
2015-02-12 16:18 ` [PATCHv3 04/24] rmap: add argument to charge compound page Kirill A. Shutemov
2015-02-12 21:10   ` Rik van Riel
2015-02-16 15:20     ` Kirill A. Shutemov
2015-02-20 17:39       ` Jerome Marchand
2015-02-23 16:21   ` Vlastimil Babka
2015-03-04 11:52     ` Kirill A. Shutemov
2015-03-04 12:09       ` Vlastimil Babka
2015-03-04 13:26         ` Kirill A. Shutemov
2015-02-12 16:18 ` [PATCHv3 05/24] mm, proc: adjust PSS calculation Kirill A. Shutemov
2015-02-20 17:31   ` Jerome Marchand
2015-02-23 13:52     ` Kirill A. Shutemov
2015-02-12 16:18 ` [PATCHv3 06/24] mm: store mapcount for compound page separately Kirill A. Shutemov
2015-02-12 16:18 ` [PATCHv3 07/24] mm, thp: adjust conditions when we can reuse the page on WP fault Kirill A. Shutemov
2015-02-12 16:18 ` [PATCHv3 08/24] mm: adjust FOLL_SPLIT for new refcounting Kirill A. Shutemov
2015-02-12 16:18 ` [PATCHv3 09/24] thp, mlock: do not allow huge pages in mlocked area Kirill A. Shutemov
2015-02-12 16:18 ` [PATCHv3 10/24] khugepaged: ignore pmd tables with THP mapped with ptes Kirill A. Shutemov
2015-02-12 16:18 ` [PATCHv3 11/24] thp: rename split_huge_page_pmd() to split_huge_pmd() Kirill A. Shutemov
2015-02-12 16:18 ` [PATCHv3 12/24] thp: PMD splitting without splitting compound page Kirill A. Shutemov
2015-02-12 16:18 ` [PATCHv3 13/24] mm, vmstats: new THP splitting event Kirill A. Shutemov
2015-02-12 16:18 ` [PATCHv3 14/24] thp: implement new split_huge_page() Kirill A. Shutemov
2015-02-12 17:07   ` Sasha Levin [this message]
2015-02-12 19:24     ` Sasha Levin
2015-02-16 15:57       ` Kirill A. Shutemov
2015-02-12 16:18 ` [PATCHv3 15/24] mm, thp: remove infrastructure for handling splitting PMDs Kirill A. Shutemov
2015-02-12 16:18 ` [PATCHv3 16/24] x86, " Kirill A. Shutemov
2015-02-12 16:18 ` [PATCHv3 17/24] futex, thp: remove special case for THP in get_futex_key Kirill A. Shutemov
2015-02-12 16:18 ` [PATCHv3 18/24] thp, mm: split_huge_page(): caller need to lock page Kirill A. Shutemov
2015-02-12 16:18 ` [PATCHv3 19/24] thp, mm: use migration entries to freeze page counts on split Kirill A. Shutemov
2015-02-12 16:18 ` [PATCHv3 20/24] mm, thp: remove compound_lock Kirill A. Shutemov
2015-02-12 16:18 ` [PATCHv3 21/24] thp: introduce deferred_split_huge_page() Kirill A. Shutemov
2015-02-12 16:18 ` [PATCHv3 22/24] memcg: adjust to support new THP refcounting Kirill A. Shutemov
2015-02-12 16:18 ` [PATCHv3 23/24] ksm: split huge pages on follow_page() Kirill A. Shutemov
2015-02-12 16:18 ` [PATCHv3 24/24] thp: update documentation Kirill A. Shutemov

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=54DCDDEE.5030501@oracle.com \
    --to=sasha.levin@oracle.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=cl@gentwo.org \
    --cc=dave.hansen@intel.com \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=jmarchan@redhat.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.cz \
    --cc=n-horiguchi@ah.jp.nec.com \
    --cc=riel@redhat.com \
    --cc=steve.capper@linaro.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