[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKgT0UfvFT=qznn_CAM1fN5AqrcOUjfTTu4qHzXioXfNG_ViFg@mail.gmail.com>
Date: Wed, 4 Sep 2024 08:12:17 -0700
From: Alexander Duyck <alexander.duyck@...il.com>
To: Yunsheng Lin <linyunsheng@...wei.com>
Cc: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>, Shuah Khan <shuah@...nel.org>, linux-mm@...ck.org,
linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net-next v17 01/14] mm: page_frag: add a test module for page_frag
On Mon, Sep 2, 2024 at 5:09 AM Yunsheng Lin <linyunsheng@...wei.com> wrote:
>
> The testing is done by ensuring that the fragment allocated
> from a frag_frag_cache instance is pushed into a ptr_ring
> instance in a kthread binded to a specified cpu, and a kthread
> binded to a specified cpu will pop the fragment from the
> ptr_ring and free the fragment.
>
> CC: Alexander Duyck <alexander.duyck@...il.com>
> Signed-off-by: Yunsheng Lin <linyunsheng@...wei.com>
> ---
> tools/testing/selftests/mm/Makefile | 3 +
> tools/testing/selftests/mm/page_frag/Makefile | 18 ++
> .../selftests/mm/page_frag/page_frag_test.c | 170 +++++++++++++++++
> tools/testing/selftests/mm/run_vmtests.sh | 8 +
> tools/testing/selftests/mm/test_page_frag.sh | 171 ++++++++++++++++++
> 5 files changed, 370 insertions(+)
> create mode 100644 tools/testing/selftests/mm/page_frag/Makefile
> create mode 100644 tools/testing/selftests/mm/page_frag/page_frag_test.c
> create mode 100755 tools/testing/selftests/mm/test_page_frag.sh
>
...
> diff --git a/tools/testing/selftests/mm/test_page_frag.sh b/tools/testing/selftests/mm/test_page_frag.sh
> new file mode 100755
> index 000000000000..d2b0734a90b5
> --- /dev/null
> +++ b/tools/testing/selftests/mm/test_page_frag.sh
> @@ -0,0 +1,171 @@
...
> +check_test_requirements()
> +{
> + uid=$(id -u)
> + if [ $uid -ne 0 ]; then
> + echo "$0: Must be run as root"
> + exit $ksft_skip
> + fi
> +
> + if ! which insmod > /dev/null 2>&1; then
> + echo "$0: You need insmod installed"
> + exit $ksft_skip
> + fi
> +
> + if [ ! -f $DRIVER ]; then
> + echo "$0: You need to compile page_frag_test module"
> + exit $ksft_skip
> + fi
> +}
> +
> +run_nonaligned_check()
> +{
> + echo "Run performance tests to evaluate how fast nonaligned alloc API is."
> +
> + insmod $DRIVER $NONALIGNED_PARAM > /dev/null 2>&1
> + echo "Done."
> + echo "Ccheck the kernel ring buffer to see the summary."
Typo, should be "Check".
> +}
> +
> +run_aligned_check()
> +{
> + echo "Run performance tests to evaluate how fast aligned alloc API is."
> +
> + insmod $DRIVER $ALIGNED_PARAM > /dev/null 2>&1
> + echo "Done."
> + echo "Check the kernel ring buffer to see the summary."
> +}
> +
Other than the one typo it looks fine to me.
Reviewed-by: Alexander Duyck <alexanderduyck@...com>
Powered by blists - more mailing lists