Greetings,
0day kernel testing robot got the below dmesg and the first bad commit is
https://github.com/0day-ci/linux/commits/Timofey-Titovets/ksm-replace-jha...
commit 038adb295b0c04721a12b276f8b521249fd2db9d
Author: Timofey Titovets <nefelim4ag(a)gmail.com>
AuthorDate: Fri Dec 29 12:52:41 2017 +0300
Commit: 0day robot <fengguang.wu(a)intel.com>
CommitDate: Sun Dec 31 15:54:27 2017 +0800
ksm: replace jhash2 with faster hash
Pickup, Sioh Lee crc32 patch, after some long conversation
and hassles, merge with my work on xxhash, add
choice fastest hash helper.
Base idea are same, replace jhash2 with something faster.
Perf numbers:
Intel(R) Xeon(R) CPU E5-2420 v2 @ 2.20GHz
ksm: crc32c hash() 12081 MB/s
ksm: jhash2 hash() 1569 MB/s
ksm: xxh64 hash() 8770 MB/s
ksm: xxh32 hash() 4529 MB/s
As jhash2 always will be slower, just drop it from choice.
Add function to autoselect hash algo on boot, based on speed,
like raid6 code does.
Move init of zero_hash from init, to start of ksm thread,
as ksm init run on early kernel init, run perf testing stuff on
main kernel thread looks bad to me.
One problem exists with that patch,
ksm init run too early, and crc32c module, even compiled in
can't be found, so i see:
- ksm: alloc crc32c shash error 2 in dmesg.
I give up on that, so ideas welcomed.
Only idea that i have, are to avoid early init by moving
zero_checksum to sysfs_store parm,
i.e. that's default to false, and that will work, i think.
Thanks.
Changes:
v1 -> v2:
- Merge xxhash/crc32 patches
- Replace crc32 with crc32c (crc32 have same as jhash2 speed)
- Add auto speed test and auto choice of fastest hash function
Signed-off-by: Timofey Titovets <nefelim4ag(a)gmail.com>
Signed-off-by: leesioh <solee(a)os.korea.ac.kr>
CC: Andrea Arcangeli <aarcange(a)redhat.com>
CC: linux-mm(a)kvack.org
CC: kvm(a)vger.kernel.org
a4f20e3ed1 pci: test for unexpectedly disabled bridges
038adb295b ksm: replace jhash2 with faster hash
+----------------------------------------------------------------+------------+------------+
| | a4f20e3ed1 | 038adb295b
|
+----------------------------------------------------------------+------------+------------+
| boot_successes | 35 | 0
|
| boot_failures | 0 | 34
|
| BUG:sleeping_function_called_from_invalid_context_at_mm/slab.h | 0 | 34
|
+----------------------------------------------------------------+------------+------------+
[ 0.361000] ACPI: bus type PCI registered
[ 0.373807] PCI: PCI BIOS area is rw and x. Use pci=nobios if you want it NX.
[ 0.375445] PCI: PCI BIOS revision 2.10 entry at 0xfd501, last bus=0
[ 0.376802] PCI: Using configuration type 1 for base access
[ 0.420610] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.425175] BUG: sleeping function called from invalid context at mm/slab.h:420
[ 0.425386] in_atomic(): 1, irqs_disabled(): 0, pid: 26, name: ksmd
[ 0.425386] no locks held by ksmd/26.
[ 0.425386] CPU: 1 PID: 26 Comm: ksmd Not tainted 4.15.0-rc4-mm1-00235-g038adb2 #1
[ 0.426091] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1
04/01/2014
[ 0.428008] Call Trace:
[ 0.428664] dump_stack+0x92/0xcc
[ 0.429474] ___might_sleep+0x137/0x150
[ 0.430000] __might_sleep+0x75/0x80
[ 0.430000] ? fs_reclaim_release+0x11/0x30
[ 0.430000] kmem_cache_alloc_trace+0x56/0x240
[ 0.440092] cryptd: max_cpu_qlen set to 1000
[ 0.440598] ? fasthash+0x5e/0x2f0
[ 0.440598] fasthash+0x5e/0x2f0
[ 0.440598] ? kmap_atomic_prot+0x48/0x170
[ 0.440598] ksm_scan_thread+0x62/0x1900
[ 0.440598] ? __schedule+0x706/0x770
[ 0.440598] ? complete+0x3f/0x50
[ 0.440598] kthread+0x101/0x110
[ 0.440598] ? __stable_node_chain+0x70/0x70
[ 0.440598] ? __kthread_cancel_work+0x70/0x70
[ 0.440598] ret_from_fork+0x19/0x30
[ 0.450055] ksm: alloc crc32c shash error 2
[ 0.563943] ksm: xxh32 hash() 3432 MB/s
[ 0.610019] raid6: mmxx1 gen() 3104 MB/s
[ 0.683945] ksm: xxh64 hash() 1061 MB/s
[ 0.684948] ksm: choise xxh32 as hash function
# HH:MM RESULT GOOD BAD
GOOD_BUT_DIRTY DIRTY_NOT_BAD
git bisect start 038adb295b0c04721a12b276f8b521249fd2db9d
a4f20e3ed193cd4b2f742ce37f88112c7441146f --
# first bad commit: [038adb295b0c04721a12b276f8b521249fd2db9d] ksm: replace jhash2 with
faster hash
git bisect good a4f20e3ed193cd4b2f742ce37f88112c7441146f # 17:31 G 31 0 0 0
pci: test for unexpectedly disabled bridges
# extra tests with debug options
git bisect bad 038adb295b0c04721a12b276f8b521249fd2db9d # 17:44 B 0 11 32 8
ksm: replace jhash2 with faster hash
# extra tests on HEAD of
linux-review/Timofey-Titovets/ksm-replace-jhash2-with-faster-hash/20171231-155425
git bisect bad 038adb295b0c04721a12b276f8b521249fd2db9d # 17:44 B 0 34 50 0
ksm: replace jhash2 with faster hash
# extra tests on tree/branch
linux-review/Timofey-Titovets/ksm-replace-jhash2-with-faster-hash/20171231-155425
git bisect bad 038adb295b0c04721a12b276f8b521249fd2db9d # 17:45 B 0 34 50 0
ksm: replace jhash2 with faster hash
# extra tests with first bad commit reverted
git bisect good b245f96d362d0b1b9430e7fb1067312a52b8748c # 17:56 G 10 0 0 0
Revert "ksm: replace jhash2 with faster hash"
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/lkp Intel Corporation