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 v15 01/13] mm: page_frag: add a test module for page_frag
Date: Mon, 26 Aug 2024 09:30:41 -0700 [thread overview]
Message-ID: <CAKgT0Uf-ax6F12Uxex_vTiKB44QnZH=DA-jbtYj6_LsweAH-Ow@mail.gmail.com> (raw)
In-Reply-To: <20240826124021.2635705-2-linyunsheng@huawei.com>
On Mon, Aug 26, 2024 at 5:46 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 | 2 +
> tools/testing/selftests/mm/page_frag/Makefile | 18 ++
> .../selftests/mm/page_frag/page_frag_test.c | 170 ++++++++++++++++++
> tools/testing/selftests/mm/run_vmtests.sh | 9 +-
> 4 files changed, 198 insertions(+), 1 deletion(-)
> create mode 100644 tools/testing/selftests/mm/page_frag/Makefile
> create mode 100644 tools/testing/selftests/mm/page_frag/page_frag_test.c
>
...
I am good with everything up to this point.
> diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh
> index 36045edb10de..9a788d5f3f28 100755
> --- a/tools/testing/selftests/mm/run_vmtests.sh
> +++ b/tools/testing/selftests/mm/run_vmtests.sh
> @@ -75,6 +75,8 @@ separated by spaces:
> read-only VMAs
> - mdwe
> test prctl(PR_SET_MDWE, ...)
> +- page_frag
> + test handling of page fragment allocation and freeing
>
> example: ./run_vmtests.sh -t "hmm mmap ksm"
> EOF
> @@ -231,7 +233,8 @@ run_test() {
> ("$@" 2>&1) | tap_prefix
> local ret=${PIPESTATUS[0]}
> count_total=$(( count_total + 1 ))
> - if [ $ret -eq 0 ]; then
> + # page_frag_test.ko returns 11(EAGAIN) when insmod'ing to avoid rmmod
> + if [ $ret -eq 0 ] | [ $ret -eq 11 -a ${CATEGORY} == "page_frag" ]; then
> count_pass=$(( count_pass + 1 ))
> echo "[PASS]" | tap_prefix
> echo "ok ${count_total} ${test}" | tap_output
> @@ -456,6 +459,10 @@ CATEGORY="mkdirty" run_test ./mkdirty
>
> CATEGORY="mdwe" run_test ./mdwe_test
>
> +CATEGORY="page_frag" run_test insmod ./page_frag/page_frag_test.ko
> +
> +CATEGORY="page_frag" run_test insmod ./page_frag/page_frag_test.ko test_alloc_len=12 test_align=1
> +
> echo "SUMMARY: PASS=${count_pass} SKIP=${count_skip} FAIL=${count_fail}" | tap_prefix
> echo "1..${count_total}" | tap_output
>
I don't know if this piece is needed. My thought would be rather than
mess with the run_vmtest.sh directly which is more of a pass/fail test
it might be better to handle this more like test_vmalloc.sh and just
put together your own performance test that you can run to collect the
data, and then if you want to be a part of this test you could call
that script from here.
next prev parent reply other threads:[~2024-08-26 16:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240826124021.2635705-1-linyunsheng@huawei.com>
2024-08-26 12:40 ` Yunsheng Lin
2024-08-26 16:30 ` Alexander Duyck [this message]
2024-08-26 12:40 ` [PATCH net-next v15 02/13] mm: move the page fragment allocator from page_alloc into its own file Yunsheng Lin
2024-08-26 12:40 ` [PATCH net-next v15 03/13] mm: page_frag: use initial zero offset for page_frag_alloc_align() Yunsheng Lin
2024-08-26 12:40 ` [PATCH net-next v15 04/13] mm: page_frag: avoid caller accessing 'page_frag_cache' directly Yunsheng Lin
2024-08-26 12:40 ` [PATCH net-next v15 06/13] mm: page_frag: reuse existing space for 'size' and 'pfmemalloc' Yunsheng Lin
2024-08-26 16:46 ` Alexander Duyck
2024-08-27 12:06 ` Yunsheng Lin
2024-08-27 18:16 ` Alexander Duyck
2024-08-28 12:11 ` Yunsheng Lin
2024-08-26 12:40 ` [PATCH net-next v15 07/13] mm: page_frag: some minor refactoring before adding new API Yunsheng Lin
2024-08-27 16:00 ` Alexander Duyck
2024-08-28 12:12 ` Yunsheng Lin
2024-08-26 12:40 ` [PATCH net-next v15 08/13] mm: page_frag: use __alloc_pages() to replace alloc_pages_node() Yunsheng Lin
2024-08-26 17:00 ` Alexander Duyck
2024-08-27 12:06 ` Yunsheng Lin
2024-08-27 15:30 ` Alexander Duyck
2024-08-28 12:12 ` Yunsheng Lin
2024-08-26 12:40 ` [PATCH net-next v15 10/13] mm: page_frag: introduce prepare/probe/commit API Yunsheng Lin
2024-08-26 12:40 ` [PATCH net-next v15 12/13] 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='CAKgT0Uf-ax6F12Uxex_vTiKB44QnZH=DA-jbtYj6_LsweAH-Ow@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