Skip to content

[PW_SID:1098152] riscv: lib: add optimized memchr() and extend KUnit tests#1985

Closed
linux-riscv-bot wants to merge 3 commits into
workflow__riscv__fixesfrom
pw1098152
Closed

[PW_SID:1098152] riscv: lib: add optimized memchr() and extend KUnit tests#1985
linux-riscv-bot wants to merge 3 commits into
workflow__riscv__fixesfrom
pw1098152

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 1098152 applied to workflow__riscv__fixes

Name: riscv: lib: add optimized memchr() and extend KUnit tests
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1098152
Version: 1

Linux RISC-V bot and others added 3 commits May 14, 2026 08:49
This implementation leverages word-at-a-time comparisons and the RISC-V
Zbb extension to accelerate character searching, falling back to a
generic byte-by-byte loop on systems without Zbb support.

Benchmark results (QEMU TCG, rv64):

| len  | zbb    | Wozbb | default | % Wozbb |  % zbb  |
|------|--------|-------|---------|---------|---------|
| 1    | 22.9   | 26    | 22.1    | 17.64 % |  3.62  %|
| 7    | 115.5  | 130.6 | 100.1   | 30.46 % | 15.38  %|
| 8    | 184.3  | 143.3 | 117.2   | 22.26 % | 57.25  %|
| 16   | 322    | 205.1 | 179.7   | 14.13 % | 79.19  %|
| 31   | 361    | 247.4 | 221.7   | 11.59 % | 62.83  %|
| 64   | 880    | 280.6 | 233.2   | 20.32 % | 277.35 %|
| 127  | 961.3  | 307.9 | 271.4   | 13.44 % | 254.20 %|
| 512  | 1812.9 | 325.6 | 294.1   | 10.71 % | 516.42 %|
| 1024 | 1973.2 | 335.4 | 273.8   | 22.49 % | 620.67 %|
| 3173 | 2245.9 | 338.7 | 288.6   | 17.35 % | 678.20 %|
| 4096 | 2327.5 | 345   | 317.5   | 8.661 % | 633.07 %|

Signed-off-by: Milan Tripkovic <Milan.Tripkovic@rt-rk.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Extend the string benchmarking suite to include memchr().
Extend the string unit test to include memchr()

Signed-off-by: Milan Tripkovic <Milan.Tripkovic@rt-rk.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: lib: add memchr() implementation"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 139.97 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: lib: add memchr() implementation"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 2224.62 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: lib: add memchr() implementation"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 3032.72 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: lib: add memchr() implementation"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 25.85 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: lib: add memchr() implementation"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 27.52 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: lib: add memchr() implementation"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 2.69 seconds
Result: WARNING
Output:

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#63: 
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 158 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 7b5b8cbf4ff3 ("riscv: lib: add memchr() implementation") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 1 warnings, 0 checks, 158 lines checked
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: lib: add memchr() implementation"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 87.61 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: lib: add memchr() implementation"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: lib: add memchr() implementation"
kdoc
Desc: Detects for kdoc errors
Duration: 0.90 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: lib: add memchr() implementation"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: lib: add memchr() implementation"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: lib: add memchr() implementation"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.32 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] lib/string_kunit: extend benchmarks and unit test to memchr()"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 139.61 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] lib/string_kunit: extend benchmarks and unit test to memchr()"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1040.54 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] lib/string_kunit: extend benchmarks and unit test to memchr()"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1420.97 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] lib/string_kunit: extend benchmarks and unit test to memchr()"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 26.38 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] lib/string_kunit: extend benchmarks and unit test to memchr()"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 27.03 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] lib/string_kunit: extend benchmarks and unit test to memchr()"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.81 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] lib/string_kunit: extend benchmarks and unit test to memchr()"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 86.14 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] lib/string_kunit: extend benchmarks and unit test to memchr()"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] lib/string_kunit: extend benchmarks and unit test to memchr()"
kdoc
Desc: Detects for kdoc errors
Duration: 0.87 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] lib/string_kunit: extend benchmarks and unit test to memchr()"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] lib/string_kunit: extend benchmarks and unit test to memchr()"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] lib/string_kunit: extend benchmarks and unit test to memchr()"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.31 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot force-pushed the workflow__riscv__fixes branch from cd9d421 to a1231b7 Compare May 22, 2026 06:39
@linux-riscv-bot linux-riscv-bot deleted the pw1098152 branch May 22, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants