[linux-next][bisected a4615d11] Memory DLPAR triggers WARN_ONCE() in mm/page_vma_mapped.c
5 messages,
2 authors,
2017-10-03 · open the first message on its own page
Hi,
Memory DLPAR operation on PowerVM booted withnext-20170907, results in
below warning message.
Machine Type: Power 8 PowerVM LPAR
Kernel version : 4.13.0-next-20170907
gcc: 5.2.1
config : attached
Steps to recreate:
----------------------
Perform dlpar memory add/remove in a loop using 'drmgr' command
$ drmgr -c mem -d 5 -w 30 -r
$ drmgr -c mem -d 5 -w 30 -a
after few iterations of add / remove dmes shows below warning
dmesg logs:
------------------
Non present huge pmd without pmd migration enabled!
------------[ cut here ]------------
WARNING: CPU: 14 PID: 5110 at mm/page_vma_mapped.c:171
page_vma_mapped_walk+0x9a8/0xa10
Modules linked in: rpadlpar_io(E) rpaphp(E) xt_addrtype(E)
xt_conntrack(E) ipt_MASQUERADE(E) nf_nat_masquerade_ipv4(E)
iptable_nat(E) nf_conntrack_ipv4(E) nf_defrag_ipv4(E) nf_nat_ipv4(E)
iptable_filter(E) ip_tables(E) x_tables(E) nf_nat(E) nf_conntrack(E)
bridge(E) stp(E) llc(E) dm_thin_pool(E) dm_persistent_data(E)
dm_bio_prison(E) dm_bufio(E) libcrc32c(E) pseries_rng(E) rtc_generic(E)
vmx_crypto(E) autofs4(E)
CPU: 14 PID: 5110 Comm: stress Tainted: G E
4.13.0-next-20170907-autotest #1
task: c000000760755900 task.stack: c0000007749b4000
NIP: c000000000316078 LR: c000000000316074 CTR: c000000000c244b0
REGS: c0000007749b7160 TRAP: 0700 Tainted: G E
(4.13.0-next-20170907-autotest)
MSR: 8000000000029033 <SF,EE,ME,IR,DR,RI,LE> CR: 28242282 XER:
20000000
CFAR: c000000000182064 SOFTE: 1
GPR00: c000000000316074 c0000007749b73e0 c000000001599900
0000000000000033
GPR04: 0000000000000000 0000000000000000 6c62616e65206e6f
c000000001769900
GPR08: 000000077edd0000 0000000000000000 0000000000000000
c08000049d002386
GPR12: 0000000000002200 c00000000e749300 f000000001274020
c00000077ff5e100
GPR16: c00000077ff54600 c00000077ff64600 f000000001274000
c0000007749b7650
GPR20: 0000000000000000 c0000000032ec800 c0000007735bf5c8
000000007ffdab00
GPR24: 000000007ffdabff c00000000173e970 0000000000000001
c0000007605b0000
GPR28: f000000001274000 c0000007605b0064 f000000001274000
c0000007749b74b0
NIP [c000000000316078] page_vma_mapped_walk+0x9a8/0xa10
LR [c000000000316074] page_vma_mapped_walk+0x9a4/0xa10
Call Trace:
[c0000007749b73e0] [c000000000316074] page_vma_mapped_walk+0x9a4/0xa10
(unreliable)
[c0000007749b7490] [c00000000031792c] page_referenced_one+0xcc/0x250
[c0000007749b7520] [c00000000031841c] rmap_walk_anon+0x15c/0x380
[c0000007749b7590] [c00000000031afdc] page_referenced+0x1bc/0x250
[c0000007749b7620] [c0000000002d0ebc] shrink_active_list+0x24c/0x5a0
[c0000007749b7720] [c0000000002d1850] shrink_node_memcg+0x640/0x790
[c0000007749b7820] [c0000000002d1ad8] shrink_node+0x138/0x410
[c0000007749b78e0] [c0000000002d1ec8] do_try_to_free_pages+0x118/0x490
[c0000007749b7970] [c0000000002d2350] try_to_free_pages+0x110/0x2b0
[c0000007749b7a00] [c0000000002b8ab4] __alloc_pages_nodemask
+0x724/0x1120
[c0000007749b7bf0] [c000000000342c78] alloc_pages_vma+0xb8/0x290
[c0000007749b7c60] [c0000000003075b0] __handle_mm_fault+0x1150/0x1ad0
[c0000007749b7d40] [c000000000308058] handle_mm_fault+0x128/0x210
[c0000007749b7d80] [c0000000000671f8] __do_page_fault+0x218/0x8e0
[c0000007749b7e30] [c00000000000a4a4] handle_page_fault+0x18/0x38
Instruction dump:
2fa80000 409e0044 3cc2fff5 8926743d 2f890000 409ef6ec 3c62ff91 39200001
3863ce18 9926743d 4be6bfa5 60000000 <0fe00000> 4bfff6cc 7c0004ac
39400000
---[ end trace c9b04ac31031ebc8 ]---
WARN_ONCE() was introduced by commit a4615d115 ( mm: thp: enable thp
migration in generic path)
Regard's
Abdul Haleem
IBM Linux Technology Center
Hi Abdul,
Can you try this patch below? I think I missed that pmd entries
can be zapped, so the WARN_ONCE is unnecessary.
Thanks.
diff --git a/mm/page_vma_mapped.c b/mm/page_vma_mapped.c
index 6a03946469a9..eb462e7db0a9 100644
--- a/mm/page_vma_mapped.c
+++ b/mm/page_vma_mapped.c @@ -167,8 +167,7 @@ bool page_vma_mapped_walk(struct page_vma_mapped_walk *pvmw)
return not_found ( pvmw );
return true ;
}
- } else
- WARN_ONCE ( 1 , "Non present huge pmd without pmd migration enabled!" );
+ }
return not_found ( pvmw );
} else {
/* THP pmd was split under us: handle on pte level */
- - Best Regards
Yan Zi
On 11 Sep 2017, at 5:56, abdul wrote:
Hi,
Memory DLPAR operation on PowerVM booted withnext-20170907, results in
below warning message.
Machine Type: Power 8 PowerVM LPAR
Kernel version : 4.13.0-next-20170907
gcc: 5.2.1
config : attached
Steps to recreate:
----------------------
Perform dlpar memory add/remove in a loop using 'drmgr' command
$ drmgr -c mem -d 5 -w 30 -r
$ drmgr -c mem -d 5 -w 30 -a
after few iterations of add / remove dmes shows below warning
dmesg logs:
------------------
Non present huge pmd without pmd migration enabled!
------------[ cut here ]------------
WARNING: CPU: 14 PID: 5110 at mm/page_vma_mapped.c:171
page_vma_mapped_walk+0x9a8/0xa10
Modules linked in: rpadlpar_io(E) rpaphp(E) xt_addrtype(E)
xt_conntrack(E) ipt_MASQUERADE(E) nf_nat_masquerade_ipv4(E)
iptable_nat(E) nf_conntrack_ipv4(E) nf_defrag_ipv4(E) nf_nat_ipv4(E)
iptable_filter(E) ip_tables(E) x_tables(E) nf_nat(E) nf_conntrack(E)
bridge(E) stp(E) llc(E) dm_thin_pool(E) dm_persistent_data(E)
dm_bio_prison(E) dm_bufio(E) libcrc32c(E) pseries_rng(E) rtc_generic(E)
vmx_crypto(E) autofs4(E)
CPU: 14 PID: 5110 Comm: stress Tainted: G E
4.13.0-next-20170907-autotest #1
task: c000000760755900 task.stack: c0000007749b4000
NIP: c000000000316078 LR: c000000000316074 CTR: c000000000c244b0
REGS: c0000007749b7160 TRAP: 0700 Tainted: G E
(4.13.0-next-20170907-autotest)
MSR: 8000000000029033 <SF,EE,ME,IR,DR,RI,LE> CR: 28242282 XER:
20000000
CFAR: c000000000182064 SOFTE: 1
GPR00: c000000000316074 c0000007749b73e0 c000000001599900
0000000000000033
GPR04: 0000000000000000 0000000000000000 6c62616e65206e6f
c000000001769900
GPR08: 000000077edd0000 0000000000000000 0000000000000000
c08000049d002386
GPR12: 0000000000002200 c00000000e749300 f000000001274020
c00000077ff5e100
GPR16: c00000077ff54600 c00000077ff64600 f000000001274000
c0000007749b7650
GPR20: 0000000000000000 c0000000032ec800 c0000007735bf5c8
000000007ffdab00
GPR24: 000000007ffdabff c00000000173e970 0000000000000001
c0000007605b0000
GPR28: f000000001274000 c0000007605b0064 f000000001274000
c0000007749b74b0
NIP [c000000000316078] page_vma_mapped_walk+0x9a8/0xa10
LR [c000000000316074] page_vma_mapped_walk+0x9a4/0xa10
Call Trace:
[c0000007749b73e0] [c000000000316074] page_vma_mapped_walk+0x9a4/0xa10
(unreliable)
[c0000007749b7490] [c00000000031792c] page_referenced_one+0xcc/0x250
[c0000007749b7520] [c00000000031841c] rmap_walk_anon+0x15c/0x380
[c0000007749b7590] [c00000000031afdc] page_referenced+0x1bc/0x250
[c0000007749b7620] [c0000000002d0ebc] shrink_active_list+0x24c/0x5a0
[c0000007749b7720] [c0000000002d1850] shrink_node_memcg+0x640/0x790
[c0000007749b7820] [c0000000002d1ad8] shrink_node+0x138/0x410
[c0000007749b78e0] [c0000000002d1ec8] do_try_to_free_pages+0x118/0x490
[c0000007749b7970] [c0000000002d2350] try_to_free_pages+0x110/0x2b0
[c0000007749b7a00] [c0000000002b8ab4] __alloc_pages_nodemask
+0x724/0x1120
[c0000007749b7bf0] [c000000000342c78] alloc_pages_vma+0xb8/0x290
[c0000007749b7c60] [c0000000003075b0] __handle_mm_fault+0x1150/0x1ad0
[c0000007749b7d40] [c000000000308058] handle_mm_fault+0x128/0x210
[c0000007749b7d80] [c0000000000671f8] __do_page_fault+0x218/0x8e0
[c0000007749b7e30] [c00000000000a4a4] handle_page_fault+0x18/0x38
Instruction dump:
2fa80000 409e0044 3cc2fff5 8926743d 2f890000 409ef6ec 3c62ff91 39200001
3863ce18 9926743d 4be6bfa5 60000000 <0fe00000> 4bfff6cc 7c0004ac
39400000
---[ end trace c9b04ac31031ebc8 ]---
WARN_ONCE() was introduced by commit a4615d115 ( mm: thp: enable thp
migration in generic path)
Regard's
Abdul Haleem
IBM Linux Technology Center
On Mon, 2017-09-11 at 10:53 -0400, Zi Yan wrote: quoted hunk Hi Abdul,
Can you try this patch below? I think I missed that pmd entries
can be zapped, so the WARN_ONCE is unnecessary.
Thanks.
diff --git a/mm/page_vma_mapped.c b/mm/page_vma_mapped.c
index 6a03946469a9..eb462e7db0a9 100644
--- a/mm/page_vma_mapped.c
+++ b/mm/page_vma_mapped.c @@ -167,8 +167,7 @@ bool page_vma_mapped_walk(struct page_vma_mapped_walk *pvmw)
return not_found ( pvmw );
return true ;
}
- } else
- WARN_ONCE ( 1 , "Non present huge pmd without pmd migration enabled!" );
+ }
return not_found ( pvmw );
} else {
/* THP pmd was split under us: handle on pte level */
- - Best Regards
Yan Zi
On 11 Sep 2017, at 5:56, abdul wrote:
Kernel Oops a different bug is blocking me to verify the given patch,
may be unrelated to this.
I can validate once the below one gets fixed.
BUG: Bad page state in process avocado pfn:74943
page:f000000001d250c0 count:1 mapcount:0 mapping:c00000000594a299
index:0x1
flags: 0x33ffff80004007c(referenced|uptodate|dirty|lru|active|
swapbacked)
raw: 033ffff80004007c c00000000594a299 0000000000000001 00000001ffffffff
raw: 5deadbeef0000100 5deadbeef0000200 0000000000000000 c00000077e391800
page dumped because: page still charged to cgroup
page->mem_cgroup:c00000077e391800
bad because of flags: 0x4007c(referenced|uptodate|dirty|lru|active|
swapbacked)
Unable to handle kernel paging request for data at address
0x5deadbeef0000108
Faulting instruction address: 0xc0000000002b5604
Oops: Kernel access of bad area, sig: 11 [#1]
LE SMP NR_CPUS=2048 NUMA pSeries
Modules linked in: xt_addrtype xt_conntrack ipt_MASQUERADE
nf_nat_masquerade_ipv4 iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4
nf_nat_ipv4 iptable_filter ip_tables x_tables nf_nat nf_conntrack bridge
stp llc dm_thin_pool dm_persistent_data dm_bio_prison dm_bufio libcrc32c
rtc_generic vmx_crypto pseries_rng autofs4
CPU: 3 PID: 922 Comm: avocado Tainted: G B
4.13.0-next-20170907-autotest #2
task: c000000771bc1700 task.stack: c000000771c04000
NIP: c0000000002b5604 LR: c0000000002b7678 CTR: 0000000000000000
REGS: c000000771c072c0 TRAP: 0380 Tainted: G B
(4.13.0-next-20170907-autotest)
MSR: 800000010280b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE,TM[E]> CR:
82228228 XER: 2000000f
CFAR: c0000000002b7674 SOFTE: 0
GPR00: c0000000002b7678 c000000771c07540 c000000001599900
0000000000000000
GPR04: f000000001d250e0 0000000000000001 5deadbeef0000100
5deadbeef0000200
GPR08: 5deadbee00000000 c00000077ff54710 0000000000000000
0000000000000000
GPR12: 0000000022242224 c00000000e741f80 000000077eb10000
c00000077fbe88f8
GPR16: c00000077ff54600 0000000040000000 0000000000000000
0000000020000000
GPR20: 0000000000000002 c00000077fbe8918 c0000000010d88f8
0000000000000000
GPR24: 0000000000000001 0000000000000040 c00000077ff54600
f000000001d250c0
GPR28: 0000000000000010 0000000000000000 0000000000000001
0000000000000000
NIP [c0000000002b5604] __rmqueue+0xd4/0x680
LR [c0000000002b7678] get_page_from_freelist+0x798/0xe30
Call Trace:
[c000000771c07540] [f000000001d250c0] 0xf000000001d250c0 (unreliable)
[c000000771c075f0] [c0000000002b7678] get_page_from_freelist+0x798/0xe30
[c000000771c07700] [c0000000002b88b8] __alloc_pages_nodemask
+0x528/0x1120
[c000000771c078f0] [c000000000358864] new_node_page+0x174/0x200
[c000000771c07950] [c00000000035f170] migrate_pages+0x2d0/0x1160
[c000000771c07a30] [c00000000035b1e4] __offline_pages.constprop.6
+0x8c4/0xa80
[c000000771c07b70] [c0000000007e2448] memory_subsys_offline+0xa8/0x110
[c000000771c07ba0] [c0000000007b45d4] device_offline+0x104/0x140
[c000000771c07be0] [c0000000007e223c] store_mem_state+0x17c/0x190
[c000000771c07c20] [c0000000007aec28] dev_attr_store+0x68/0xa0
[c000000771c07c60] [c000000000457680] sysfs_kf_write+0x80/0xb0
[c000000771c07ca0] [c00000000045638c] kernfs_fop_write+0x17c/0x250
[c000000771c07cf0] [c00000000038e20c] __vfs_write+0x6c/0x230
[c000000771c07d90] [c000000000390170] vfs_write+0xd0/0x270
[c000000771c07de0] [c00000000039214c] SyS_write+0x6c/0x110
[c000000771c07e30] [c00000000000b184] system_call+0x58/0x6c
Instruction dump:
39290100 7c9a482a 7d3a4a14 7fa92040 3764ffe0 419e01d8 41c201d4 3d005dea
e8e40008 e8c40000 6108dbee 790807c6 <f8e60008> 6508f000 f8c70000
7d094378
---[ end trace ca28dd806080b418 ]---
quoted
Regard's
Abdul Haleem
IBM Linux Technology Center
Hi Abdul,
I just want to follow up with this.
Did you have a chance to test my patch? Does it fix your original problem?
Thanks.
--
Best Regards
Yan Zi
On 13 Sep 2017, at 1:48, abdul wrote:
On Mon, 2017-09-11 at 10:53 -0400, Zi Yan wrote: quoted Hi Abdul,
Can you try this patch below? I think I missed that pmd entries
can be zapped, so the WARN_ONCE is unnecessary.
Thanks.
diff --git a/mm/page_vma_mapped.c b/mm/page_vma_mapped.c
index 6a03946469a9..eb462e7db0a9 100644
--- a/mm/page_vma_mapped.c
+++ b/mm/page_vma_mapped.c @@ -167,8 +167,7 @@ bool page_vma_mapped_walk(struct page_vma_mapped_walk *pvmw)
return not_found ( pvmw );
return true ;
}
- } else
- WARN_ONCE ( 1 , "Non present huge pmd without pmd migration enabled!" );
+ }
return not_found ( pvmw );
} else {
/* THP pmd was split under us: handle on pte level */
- - Best Regards
Yan Zi
On 11 Sep 2017, at 5:56, abdul wrote:
Kernel Oops a different bug is blocking me to verify the given patch,
may be unrelated to this.
I can validate once the below one gets fixed.
BUG: Bad page state in process avocado pfn:74943
page:f000000001d250c0 count:1 mapcount:0 mapping:c00000000594a299
index:0x1
flags: 0x33ffff80004007c(referenced|uptodate|dirty|lru|active|
swapbacked)
raw: 033ffff80004007c c00000000594a299 0000000000000001 00000001ffffffff
raw: 5deadbeef0000100 5deadbeef0000200 0000000000000000 c00000077e391800
page dumped because: page still charged to cgroup
page->mem_cgroup:c00000077e391800
bad because of flags: 0x4007c(referenced|uptodate|dirty|lru|active|
swapbacked)
Unable to handle kernel paging request for data at address
0x5deadbeef0000108
Faulting instruction address: 0xc0000000002b5604
Oops: Kernel access of bad area, sig: 11 [#1]
LE SMP NR_CPUS=2048 NUMA pSeries
Modules linked in: xt_addrtype xt_conntrack ipt_MASQUERADE
nf_nat_masquerade_ipv4 iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4
nf_nat_ipv4 iptable_filter ip_tables x_tables nf_nat nf_conntrack bridge
stp llc dm_thin_pool dm_persistent_data dm_bio_prison dm_bufio libcrc32c
rtc_generic vmx_crypto pseries_rng autofs4
CPU: 3 PID: 922 Comm: avocado Tainted: G B
4.13.0-next-20170907-autotest #2
task: c000000771bc1700 task.stack: c000000771c04000
NIP: c0000000002b5604 LR: c0000000002b7678 CTR: 0000000000000000
REGS: c000000771c072c0 TRAP: 0380 Tainted: G B
(4.13.0-next-20170907-autotest)
MSR: 800000010280b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE,TM[E]> CR:
82228228 XER: 2000000f
CFAR: c0000000002b7674 SOFTE: 0
GPR00: c0000000002b7678 c000000771c07540 c000000001599900
0000000000000000
GPR04: f000000001d250e0 0000000000000001 5deadbeef0000100
5deadbeef0000200
GPR08: 5deadbee00000000 c00000077ff54710 0000000000000000
0000000000000000
GPR12: 0000000022242224 c00000000e741f80 000000077eb10000
c00000077fbe88f8
GPR16: c00000077ff54600 0000000040000000 0000000000000000
0000000020000000
GPR20: 0000000000000002 c00000077fbe8918 c0000000010d88f8
0000000000000000
GPR24: 0000000000000001 0000000000000040 c00000077ff54600
f000000001d250c0
GPR28: 0000000000000010 0000000000000000 0000000000000001
0000000000000000
NIP [c0000000002b5604] __rmqueue+0xd4/0x680
LR [c0000000002b7678] get_page_from_freelist+0x798/0xe30
Call Trace:
[c000000771c07540] [f000000001d250c0] 0xf000000001d250c0 (unreliable)
[c000000771c075f0] [c0000000002b7678] get_page_from_freelist+0x798/0xe30
[c000000771c07700] [c0000000002b88b8] __alloc_pages_nodemask
+0x528/0x1120
[c000000771c078f0] [c000000000358864] new_node_page+0x174/0x200
[c000000771c07950] [c00000000035f170] migrate_pages+0x2d0/0x1160
[c000000771c07a30] [c00000000035b1e4] __offline_pages.constprop.6
+0x8c4/0xa80
[c000000771c07b70] [c0000000007e2448] memory_subsys_offline+0xa8/0x110
[c000000771c07ba0] [c0000000007b45d4] device_offline+0x104/0x140
[c000000771c07be0] [c0000000007e223c] store_mem_state+0x17c/0x190
[c000000771c07c20] [c0000000007aec28] dev_attr_store+0x68/0xa0
[c000000771c07c60] [c000000000457680] sysfs_kf_write+0x80/0xb0
[c000000771c07ca0] [c00000000045638c] kernfs_fop_write+0x17c/0x250
[c000000771c07cf0] [c00000000038e20c] __vfs_write+0x6c/0x230
[c000000771c07d90] [c000000000390170] vfs_write+0xd0/0x270
[c000000771c07de0] [c00000000039214c] SyS_write+0x6c/0x110
[c000000771c07e30] [c00000000000b184] system_call+0x58/0x6c
Instruction dump:
39290100 7c9a482a 7d3a4a14 7fa92040 3764ffe0 419e01d8 41c201d4 3d005dea
e8e40008 e8c40000 6108dbee 790807c6 <f8e60008> 6508f000 f8c70000
7d094378
---[ end trace ca28dd806080b418 ]---
quoted quoted
Regard's
Abdul Haleem
IBM Linux Technology Center
On Fri, 2017-09-29 at 10:07 -0400, Zi Yan wrote: Hi Abdul,
I just want to follow up with this.
Did you have a chance to test my patch? Does it fix your original problem?
Yes I did test the patch. it fixes the warning.
Reported-and-tested-by: Abdul Haleem <redacted>
Thanks for the fix.
--
Regard's
Abdul Haleem
IBM Linux Technology Centre
On 13 Sep 2017, at 1:48, abdul wrote:
quoted On Mon, 2017-09-11 at 10:53 -0400, Zi Yan wrote: quoted Hi Abdul,
Can you try this patch below? I think I missed that pmd entries
can be zapped, so the WARN_ONCE is unnecessary.
Thanks.
diff --git a/mm/page_vma_mapped.c b/mm/page_vma_mapped.c
index 6a03946469a9..eb462e7db0a9 100644
--- a/mm/page_vma_mapped.c
+++ b/mm/page_vma_mapped.c @@ -167,8 +167,7 @@ bool page_vma_mapped_walk(struct page_vma_mapped_walk *pvmw)
return not_found ( pvmw );
return true ;
}
- } else
- WARN_ONCE ( 1 , "Non present huge pmd without pmd migration enabled!" );
+ }
return not_found ( pvmw );
} else {
/* THP pmd was split under us: handle on pte level */
- - Best Regards
Yan Zi