From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: "Liam R. Howlett" <Liam.Howlett@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
maple-tree@lists.infradead.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Peng Zhang <zhangpeng.00@bytedance.com>
Subject: Re: [PATCH v2 04/16] mm: Change do_vmi_align_munmap() side tree index
Date: Tue, 20 Jun 2023 21:26:19 +0900 [thread overview]
Message-ID: <20230620122619.GA2934656@google.com> (raw)
In-Reply-To: <20230612203953.2093911-5-Liam.Howlett@oracle.com>
Hello Liam,
On (23/06/12 16:39), Liam R. Howlett wrote:
[..]
> @@ -2450,17 +2452,17 @@ do_vmi_align_munmap(struct vma_iterator *vmi, struct vm_area_struct *vma,
> #if defined(CONFIG_DEBUG_VM_MAPLE_TREE)
> /* Make sure no VMAs are about to be lost. */
> {
> - MA_STATE(test, &mt_detach, start, end - 1);
> + MA_STATE(test, &mt_detach, 0, 0);
> struct vm_area_struct *vma_mas, *vma_test;
> int test_count = 0;
>
> vma_iter_set(vmi, start);
> rcu_read_lock();
> - vma_test = mas_find(&test, end - 1);
> + vma_test = mas_find(&test, count - 1);
> for_each_vma_range(*vmi, vma_mas, end) {
> BUG_ON(vma_mas != vma_test);
> test_count++;
> - vma_test = mas_next(&test, end - 1);
> + vma_test = mas_next(&test, count - 1);
> }
> rcu_read_unlock();
> BUG_ON(count != test_count);
Something isn't quite working, I'm hitting BUG_ON(vma_mas != vma_test)
[ 8.156437] ------------[ cut here ]------------
[ 8.160473] kernel BUG at mm/mmap.c:2439!
[ 8.163894] invalid opcode: 0000 [#1] PREEMPT SMP PTI
RIP: 0010:do_vmi_align_munmap+0x489/0x8a0
[ 8.207867] Call Trace:
[ 8.208463] <TASK>
[ 8.209018] ? die+0x32/0x80
[ 8.209709] ? do_trap+0xd2/0x100
[ 8.210520] ? do_vmi_align_munmap+0x489/0x8a0
[ 8.211576] ? do_vmi_align_munmap+0x489/0x8a0
[ 8.212639] ? do_error_trap+0x94/0x110
[ 8.213549] ? do_vmi_align_munmap+0x489/0x8a0
[ 8.214581] ? exc_invalid_op+0x49/0x60
[ 8.215494] ? do_vmi_align_munmap+0x489/0x8a0
[ 8.216576] ? asm_exc_invalid_op+0x16/0x20
[ 8.217562] ? do_vmi_align_munmap+0x489/0x8a0
[ 8.218626] do_vmi_munmap+0xc7/0x120
[ 8.219494] __vm_munmap+0xaa/0x1c0
[ 8.220370] __x64_sys_munmap+0x17/0x20
[ 8.221275] do_syscall_64+0x34/0x80
[ 8.222165] entry_SYSCALL_64_after_hwframe+0x63/0xcd
[ 8.223359] RIP: 0033:0x7fdb0e2fca97
[ 8.224224] Code: ff ff ff ff c3 66 0f 1f 44 00 00 f7 d8 89 05 20 28 01 00 48 c7 c0 ff ff ff ff c3 0f 1f 84 00 00 00 00 00 b8 0b 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8d 0d f9 27 01 00 f7 d8 89 01 48 83
[ 8.228432] RSP: 002b:00007ffd15458348 EFLAGS: 00000202 ORIG_RAX: 000000000000000b
[ 8.230175] RAX: ffffffffffffffda RBX: 0000562081a347b0 RCX: 00007fdb0e2fca97
[ 8.231833] RDX: 0000000000000002 RSI: 0000000000004010 RDI: 00007fdb0e2d5000
[ 8.233513] RBP: 00007ffd154584d0 R08: 0000000000000000 R09: 0000562081a3fd30
[ 8.235178] R10: 0000562081a3fd18 R11: 0000000000000202 R12: 00007ffd15458388
[ 8.236861] R13: 00007ffd15458438 R14: 00007ffd15458370 R15: 0000562081a347b0
next prev parent reply other threads:[~2023-06-20 12:26 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 20:39 [PATCH v2 00/16] Reduce preallocations for maple tree Liam R. Howlett
2023-06-12 20:39 ` [PATCH v2 01/16] maple_tree: Add benchmarking for mas_for_each Liam R. Howlett
2023-06-12 20:39 ` [PATCH v2 02/16] maple_tree: Add benchmarking for mas_prev() Liam R. Howlett
2023-06-12 20:39 ` [PATCH v2 03/16] mm: Move unmap_vmas() declaration to internal header Liam R. Howlett
2023-06-12 20:39 ` [PATCH v2 04/16] mm: Change do_vmi_align_munmap() side tree index Liam R. Howlett
2023-06-20 12:26 ` Sergey Senozhatsky [this message]
2023-06-20 13:04 ` Liam R. Howlett
2023-06-21 0:10 ` Sergey Senozhatsky
2023-06-12 20:39 ` [PATCH v2 05/16] mm: Remove prev check from do_vmi_align_munmap() Liam R. Howlett
2023-06-12 20:39 ` [PATCH v2 06/16] maple_tree: Introduce __mas_set_range() Liam R. Howlett
2023-06-12 20:39 ` [PATCH v2 07/16] mm: Remove re-walk from mmap_region() Liam R. Howlett
2023-06-12 20:39 ` [PATCH v2 08/16] maple_tree: Adjust node allocation on mas_rebalance() Liam R. Howlett
2023-06-12 20:39 ` [PATCH v2 09/16] maple_tree: Re-introduce entry to mas_preallocate() arguments Liam R. Howlett
2023-06-12 20:39 ` [PATCH v2 10/16] mm: Use vma_iter_clear_gfp() in nommu Liam R. Howlett
2023-06-12 20:39 ` [PATCH v2 11/16] mm: Set up vma iterator for vma_iter_prealloc() calls Liam R. Howlett
2023-06-12 20:39 ` [PATCH v2 12/16] maple_tree: Move mas_wr_end_piv() below mas_wr_extend_null() Liam R. Howlett
2023-06-12 20:39 ` [PATCH v2 13/16] maple_tree: Update mas_preallocate() testing Liam R. Howlett
2023-06-12 20:39 ` [PATCH v2 14/16] maple_tree: Refine mas_preallocate() node calculations Liam R. Howlett
2023-06-22 16:41 ` Danilo Krummrich
2023-06-25 3:28 ` Peng Zhang
2023-06-26 0:38 ` Danilo Krummrich
2023-06-26 13:19 ` Matthew Wilcox
2023-06-26 14:27 ` Danilo Krummrich
2023-06-26 14:49 ` Peng Zhang
2023-06-26 18:21 ` Danilo Krummrich
2023-06-26 14:52 ` Matthew Wilcox
2023-06-26 18:37 ` Danilo Krummrich
2023-06-27 1:58 ` Liam R. Howlett
2023-06-27 13:15 ` Danilo Krummrich
2023-06-27 16:11 ` Liam R. Howlett
2023-06-27 21:06 ` Danilo Krummrich
2023-06-26 14:08 ` Peng Zhang
2023-06-26 14:30 ` Danilo Krummrich
2023-06-12 20:39 ` [PATCH v2 15/16] maple_tree: Reduce resets during store setup Liam R. Howlett
2023-06-12 20:39 ` [PATCH v2 16/16] mm/mmap: Change vma iteration order in do_vmi_align_munmap() Liam R. Howlett
2023-06-15 8:33 ` [PATCH v2 00/16] Reduce preallocations for maple tree Yin, Fengwei
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=20230620122619.GA2934656@google.com \
--to=senozhatsky@chromium.org \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=maple-tree@lists.infradead.org \
--cc=zhangpeng.00@bytedance.com \
/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.