FYI, we noticed the below changes on
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
commit 9e9089e5a2d788db417d4d1f836eecc2fc44e9ff ("rhashtable-test: retry insert
operations")
With the commit, the rhashtable test will fail for test 01
[ 26.692179] Running rhashtable test nelem=8, max_size=65536, shrinking=0
[ 26.693565] Test 00:
[ 26.697076] Adding 50000 keys
[ 27.017234] Traversal complete: counted=50000, nelems=50000, entries=50000,
table-jumps=0
[ 27.276248] Traversal complete: counted=50000, nelems=50000, entries=50000,
table-jumps=0
[ 27.278414] Deleting 50000 keys
[ 27.441366] Duration of test: 743500784 ns
[ 27.442701] Test 01:
[ 27.459301] Adding 50000 keys
[ 27.651878] Test failed: return code -12
But the parent commit passed test 01, failed for OOM when "Testing
concurrent rhashtable access" as below.
[ 19.973157] Running rhashtable test nelem=8, max_size=65536, shrinking=0
[ 19.974656] Test 00:
[ 19.978130] Adding 50000 keys
[ 20.168275] Traversal complete: counted=50000, nelems=50000, entries=50000,
table-jumps=0
[ 20.286450] Traversal complete: counted=50000, nelems=50000, entries=50000,
table-jumps=0
[ 20.288413] Deleting 50000 keys
[ 20.364808] Duration of test: 385834085 ns
[ 20.366042] Test 01:
[ 20.369412] Adding 50000 keys
[ 20.616114] Traversal complete: counted=50000, nelems=50000, entries=50000,
table-jumps=0
[ 20.791810] Traversal complete: counted=50000, nelems=50000, entries=50000,
table-jumps=0
[ 20.793689] Deleting 50000 keys
[ 20.933709] Duration of test: 563474738 ns
[ 20.934889] Test 02:
[ 20.938063] Adding 50000 keys
[ 21.265367] 2818 insertions failed due to memory pressure
[ 21.275442] Traversal complete: counted=47182, nelems=47182, entries=50000,
table-jumps=0
[ 21.290552] Test failed: Total count mismatch ^^^
[ 21.407579] Traversal complete: counted=47182, nelems=47182, entries=50000,
table-jumps=0
[ 21.409984] Test failed: Total count mismatch ^^^
[ 21.410886] Deleting 50000 keys
[ 21.549253] Duration of test: 610400037 ns
[ 21.550601] Test 03:
[ 21.553993] Adding 50000 keys
[ 21.732273] Traversal complete: counted=50000, nelems=50000, entries=50000,
table-jumps=0
[ 21.861057] Traversal complete: counted=50000, nelems=50000, entries=50000,
table-jumps=0
[ 21.863964] Deleting 50000 keys
[ 22.033796] Duration of test: 478844962 ns
[ 22.035185] Average test time: 509638455
[ 22.036198] Testing concurrent rhashtable access from 10 threads
[ 22.039738] swapper/0 invoked oom-killer: gfp_mask=0x24082c2, order=0, oom_score_adj=0
[ 22.054770] swapper/0 cpuset=/ mems_allowed=0
[ 22.056167] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.4.0-rc1-00169-gcd5b318 #2
[ 22.058034] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Debian-1.8.2-1
04/01/2014
[ 22.060107] 0000000000000000 ffff88000ed8f878 ffffffff81a4dfda ffff88000ed8fb80
[ 22.062408] ffff88000ed8f8e0 ffffffff813ae1ad ffff88000ed80000 0000000200000001
[ 22.064687] ffff88000ed8fb80 ffff8800003dda00 0000000000004e75 ffffffff813143bd
[ 22.066937] Call Trace:
[ 22.071200] [<ffffffff81a4dfda>] dump_stack+0x7c/0xb2
[ 22.072430] [<ffffffff813ae1ad>] dump_header+0x9b/0x3ec
[ 22.073773] [<ffffffff813143bd>] ? out_of_memory+0x6cd/0xa90
[ 22.075111] [<ffffffff8131443e>] out_of_memory+0x74e/0xa90
[ 22.076410] [<ffffffff81314194>] ? out_of_memory+0x4a4/0xa90
[ 22.077732] [<ffffffff81313cf0>] ? unregister_oom_notifier+0x30/0x30
[ 22.079199] [<ffffffff81320310>] __alloc_pages_nodemask+0x15d0/0x1600
[ 22.080665] [<ffffffff8131ed40>] ? __alloc_pages_direct_compact+0x1d0/0x1d0
[ 22.082233] [<ffffffff811fbe07>] ? set_next_entity+0x127/0x1060
[ 22.096681] [<ffffffff811f75d7>] ? put_prev_entity+0x47/0xf00
[ 22.098049] [<ffffffff81222ad4>] ? __lock_acquire+0x7e4/0x1a00
[ 22.099522] [<ffffffff811de325>] ? finish_task_switch+0x165/0x590
[ 22.100911] [<ffffffff812296fe>] ? do_raw_spin_unlock+0xae/0x1c0
[ 22.102336] [<ffffffff81a77e3f>] ? _find_next_bit+0x4f/0x110
[ 22.103659] [<ffffffff81a77f7f>] ? find_first_bit+0x2f/0xb0
[ 22.105005] [<ffffffff8138bc44>] alloc_page_interleave+0x64/0x100
[ 22.106404] [<ffffffff8138f72f>] alloc_pages_current+0x22f/0x320
[ 22.107783] [<ffffffff81379741>] __vmalloc_node_range+0x371/0x520
[ 22.109218] [<ffffffff890087c9>] ? test_rht_init+0x25c/0x4f1
[ 22.123631] [<ffffffff81379a1f>] vzalloc+0x5f/0x70
[ 22.124835] [<ffffffff890087c9>] ? test_rht_init+0x25c/0x4f1
[ 22.138896] [<ffffffff890087c9>] test_rht_init+0x25c/0x4f1
[ 22.140206] [<ffffffff8139bc0e>] ? kfree+0x1de/0x210
[ 22.141433] [<ffffffff8900856d>] ? test_rhashtable+0xc82/0xc82
[ 22.142964] [<ffffffff88fb5a6c>] do_one_initcall+0x213/0x322
[ 22.144283] [<ffffffff88fb5859>] ? start_kernel+0x824/0x824
[ 22.145621] [<ffffffff811d21ed>] ? parameq+0x3d/0xc0
[ 22.146822] [<ffffffff811d2662>] ? parse_args+0x3f2/0x770
[ 22.148126] [<ffffffff88fb5ee7>] kernel_init_freeable+0x36c/0x474
[ 22.149532] [<ffffffff843a0bd0>] ? rest_init+0x140/0x140
[ 22.150794] [<ffffffff843a0be6>] kernel_init+0x16/0x1b0
[ 22.165118] [<ffffffff843a0bd0>] ? rest_init+0x140/0x140
[ 22.166402] [<ffffffff843ae74f>] ret_from_fork+0x3f/0x70
[ 22.167661] [<ffffffff843a0bd0>] ? rest_init+0x140/0x140
Thanks,
Ying Huang