[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87ecvezwch.fsf@toke.dk>
Date: Fri, 20 Jun 2025 09:49:18 +0200
From: Toke Høiland-Jørgensen <toke@...hat.com>
To: Mina Almasry <almasrymina@...gle.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org
Cc: Jesper Dangaard Brouer <hawk@...nel.org>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
<kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Simon Horman
<horms@...nel.org>, Shuah Khan <shuah@...nel.org>, Ilias Apalodimas
<ilias.apalodimas@...aro.org>, Mina Almasry <almasrymina@...gle.com>
Subject: Re: [PATCH net-next v5] page_pool: import Jesper's page_pool benchmark
Mina Almasry <almasrymina@...gle.com> writes:
> From: Jesper Dangaard Brouer <hawk@...nel.org>
>
> We frequently consult with Jesper's out-of-tree page_pool benchmark to
> evaluate page_pool changes.
>
> Import the benchmark into the upstream linux kernel tree so that (a)
> we're all running the same version, (b) pave the way for shared
> improvements, and (c) maybe one day integrate it with nipa, if possible.
>
> Import bench_page_pool_simple from commit 35b1716d0c30 ("Add
> page_bench06_walk_all"), from this repository:
> https://github.com/netoptimizer/prototype-kernel.git
>
> Changes done during upstreaming:
> - Fix checkpatch issues.
> - Remove the tasklet logic not needed.
> - Move under tools/testing
> - Create ksft for the benchmark.
> - Changed slightly how the benchmark gets build. Out of tree, time_bench
> is built as an independent .ko. Here it is included in
> bench_page_pool.ko
>
> Steps to run:
>
> ```
> mkdir -p /tmp/run-pp-bench
> make -C ./tools/testing/selftests/net/bench
> make -C ./tools/testing/selftests/net/bench install INSTALL_PATH=/tmp/run-pp-bench
> rsync --delete -avz --progress /tmp/run-pp-bench mina@...RVER:~/
> ssh mina@...RVER << EOF
> cd ~/run-pp-bench && sudo ./test_bench_page_pool.sh
> EOF
> ```
>
> Note that by default, the Makefile will build the benchmark for the
> currently installed kernel in /lib/modules/$(shell uname -r)/build. To
> build against the current tree, do:
>
> make KDIR=$(pwd) -C ./tools/testing/selftests/net/bench
>
> Output (from Jesper):
>
> ```
> sudo ./test_bench_page_pool.sh
> (benchmark dmesg logs snipped)
>
> Fast path results:
> no-softirq-page_pool01 Per elem: 23 cycles(tsc) 6.571 ns
>
> ptr_ring results:
> no-softirq-page_pool02 Per elem: 60 cycles(tsc) 16.862 ns
>
> slow path results:
> no-softirq-page_pool03 Per elem: 265 cycles(tsc) 73.739 ns
> ```
>
> Output (from me):
>
> ```
> sudo ./test_bench_page_pool.sh
> (benchmark dmesg logs snipped)
>
> Fast path results:
> no-softirq-page_pool01 Per elem: 11 cycles(tsc) 4.177 ns
>
> ptr_ring results:
> no-softirq-page_pool02 Per elem: 51 cycles(tsc) 19.117 ns
>
> slow path results:
> no-softirq-page_pool03 Per elem: 168 cycles(tsc) 62.469 ns
> ```
>
> Results of course will vary based on hardware/kernel/configs, and some
> variance may be there from run to run due to some noise.
>
> Cc: Jesper Dangaard Brouer <hawk@...nel.org>
> Cc: Ilias Apalodimas <ilias.apalodimas@...aro.org>
> Cc: Jakub Kicinski <kuba@...nel.org>
> Cc: Toke Høiland-Jørgensen <toke@...e.dk>
>
> Signed-off-by: Mina Almasry <almasrymina@...gle.com>
> Acked-by: Ilias Apalodimas <ilias.apalodimas@...aro.org>
> Signed-off-by: Jesper Dangaard Brouer <hawk@...nel.org>
Acked-by: Toke Høiland-Jørgensen <toke@...hat.com>
Powered by blists - more mailing lists