public inbox for linux-hardening@vger.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <kees@kernel.org>
To: Feng Jiang <jiangfeng@kylinos.cn>
Cc: palmer@dabbelt.com, aou@eecs.berkeley.edu, alex@ghiti.fr,
	akpm@linux-foundation.org, andy@kernel.org, ebiggers@kernel.org,
	martin.petersen@oracle.com, herbert@gondor.apana.org.au,
	samuel.holland@sifive.com, ajones@ventanamicro.com,
	conor.dooley@microchip.com, charlie@rivosinc.com,
	nathan@kernel.org, linusw@kernel.org,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-hardening@vger.kernel.org
Subject: Re: [PATCH v7 4/8] lib/string_kunit: add performance benchmark for strlen()
Date: Fri, 30 Jan 2026 09:35:42 -0800	[thread overview]
Message-ID: <202601300935.1473FDF851@keescook> (raw)
In-Reply-To: <20260130025018.172925-5-jiangfeng@kylinos.cn>

On Fri, Jan 30, 2026 at 10:50:14AM +0800, Feng Jiang wrote:
> Introduce a benchmarking framework to the string_kunit test suite to
> measure the execution efficiency of string functions.
> 
> The implementation is inspired by crc_benchmark(), measuring throughput
> (MB/s) and latency (ns/call) across a range of string lengths. It
> includes a warm-up phase, disables preemption during measurement, and
> uses a fixed seed for reproducible results.
> 
> This framework allows for comparing different implementations (e.g.,
> generic C vs. architecture-optimized assembly) within the KUnit
> environment.
> 
> Initially, provide a benchmark for strlen().
> 
> Suggested-by: Andy Shevchenko <andy@kernel.org>
> Suggested-by: Eric Biggers <ebiggers@kernel.org>
> Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>

Reviewed-by: Kees Cook <kees@kernel.org>

-- 
Kees Cook

  reply	other threads:[~2026-01-30 17:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-30  2:50 [PATCH v7 0/8] riscv: optimize string functions and add kunit tests Feng Jiang
2026-01-30  2:50 ` [PATCH v7 1/8] lib/string_kunit: add correctness test for strlen() Feng Jiang
2026-01-30 17:34   ` Kees Cook
2026-01-30  2:50 ` [PATCH v7 2/8] lib/string_kunit: add correctness test for strnlen() Feng Jiang
2026-01-30 17:34   ` Kees Cook
2026-01-30  2:50 ` [PATCH v7 3/8] lib/string_kunit: add correctness test for strrchr() Feng Jiang
2026-01-30 17:34   ` Kees Cook
2026-01-30  2:50 ` [PATCH v7 4/8] lib/string_kunit: add performance benchmark for strlen() Feng Jiang
2026-01-30 17:35   ` Kees Cook [this message]
2026-01-30  2:50 ` [PATCH v7 5/8] lib/string_kunit: extend benchmarks to strnlen() and chr searches Feng Jiang
2026-01-30 17:35   ` Kees Cook
2026-01-30  2:50 ` [PATCH v7 6/8] riscv: lib: add strnlen() implementation Feng Jiang
2026-01-30  2:50 ` [PATCH v7 7/8] riscv: lib: add strchr() implementation Feng Jiang
2026-01-30  2:50 ` [PATCH v7 8/8] riscv: lib: add strrchr() implementation Feng Jiang
2026-01-30 17:37 ` [PATCH v7 0/8] riscv: optimize string functions and add kunit tests Kees Cook
2026-01-31  9:52   ` Andy Shevchenko
2026-02-02  1:28     ` Feng Jiang
2026-02-02  3:24   ` Feng Jiang
2026-02-26  2:33 ` Feng Jiang
2026-02-26  6:12 ` Feng Jiang
2026-04-03 18:30 ` patchwork-bot+linux-riscv

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=202601300935.1473FDF851@keescook \
    --to=kees@kernel.org \
    --cc=ajones@ventanamicro.com \
    --cc=akpm@linux-foundation.org \
    --cc=alex@ghiti.fr \
    --cc=andy@kernel.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=charlie@rivosinc.com \
    --cc=conor.dooley@microchip.com \
    --cc=ebiggers@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=jiangfeng@kylinos.cn \
    --cc=linusw@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=martin.petersen@oracle.com \
    --cc=nathan@kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=samuel.holland@sifive.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox