linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.duyck@gmail.com>
To: Yunsheng Lin <linyunsheng@huawei.com>
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	 netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Andrew Morton <akpm@linux-foundation.org>,
	Shuah Khan <shuah@kernel.org>,
	linux-mm@kvack.org,  linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next v17 01/14] mm: page_frag: add a test module for page_frag
Date: Wed, 4 Sep 2024 08:12:17 -0700	[thread overview]
Message-ID: <CAKgT0UfvFT=qznn_CAM1fN5AqrcOUjfTTu4qHzXioXfNG_ViFg@mail.gmail.com> (raw)
In-Reply-To: <20240902120314.508180-2-linyunsheng@huawei.com>

On Mon, Sep 2, 2024 at 5:09 AM Yunsheng Lin <linyunsheng@huawei.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@gmail.com>
> Signed-off-by: Yunsheng Lin <linyunsheng@huawei.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@fb.com>


  reply	other threads:[~2024-09-04 15:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240902120314.508180-1-linyunsheng@huawei.com>
2024-09-02 12:03 ` Yunsheng Lin
2024-09-04 15:12   ` Alexander Duyck [this message]
2024-09-02 12:03 ` [PATCH net-next v17 02/14] mm: move the page fragment allocator from page_alloc into its own file Yunsheng Lin
2024-09-04 15:44   ` Alexander Duyck
2024-09-02 12:03 ` [PATCH net-next v17 03/14] mm: page_frag: use initial zero offset for page_frag_alloc_align() Yunsheng Lin
2024-09-04 15:47   ` Alexander Duyck
2024-09-02 12:03 ` [PATCH net-next v17 04/14] mm: page_frag: avoid caller accessing 'page_frag_cache' directly Yunsheng Lin
2024-09-02 12:03 ` [PATCH net-next v17 06/14] mm: page_frag: reuse existing space for 'size' and 'pfmemalloc' Yunsheng Lin
2024-09-04 16:14   ` Alexander Duyck
2024-09-05 12:13     ` Yunsheng Lin
2024-09-05 16:55       ` Alexander Duyck
2024-09-02 12:03 ` [PATCH net-next v17 07/14] mm: page_frag: some minor refactoring before adding new API Yunsheng Lin
2024-09-02 12:03 ` [PATCH net-next v17 08/14] mm: page_frag: use __alloc_pages() to replace alloc_pages_node() Yunsheng Lin
2024-09-02 12:03 ` [PATCH net-next v17 10/14] mm: page_frag: introduce prepare/probe/commit API Yunsheng Lin
2024-09-02 12:03 ` [PATCH net-next v17 11/14] mm: page_frag: add testing for the newly added prepare API Yunsheng Lin
2024-09-02 12:03 ` [PATCH net-next v17 13/14] mm: page_frag: update documentation for page_frag Yunsheng Lin

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='CAKgT0UfvFT=qznn_CAM1fN5AqrcOUjfTTu4qHzXioXfNG_ViFg@mail.gmail.com' \
    --to=alexander.duyck@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linyunsheng@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    /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