From: Ryan Roberts <ryan.roberts@arm.com>
To: peterx@redhat.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Muhammad Usama Anjum <usama.anjum@collabora.com>,
David Hildenbrand <david@redhat.com>,
Muchun Song <muchun.song@linux.dev>
Subject: Re: [PATCH] fixup! selftests/mm: run_vmtests.sh: fix hugetlb mem size calculation
Date: Thu, 4 Apr 2024 08:39:40 +0100 [thread overview]
Message-ID: <d968a109-7f74-4cce-b2fa-98165048a2e9@arm.com> (raw)
In-Reply-To: <20240403200324.1603493-1-peterx@redhat.com>
On 03/04/2024 21:03, peterx@redhat.com wrote:
> From: Peter Xu <peterx@redhat.com>
>
> Fix up a breakage on uffd hugetlb test due to removal of a temp variable,
> as reported by Ryan [1].
>
> Instead of using the previous calculation, use the largest we can
> have (which is put in freepgs) and cut it into half for userfault tests.
>
> [1] https://lore.kernel.org/r/1c20b717-c5b5-4bdf-8fcd-d46db135b7fa@arm.com
>
> Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>
> Cc: David Hildenbrand <david@redhat.com>
> Cc: Muchun Song <muchun.song@linux.dev>
> Reported-by: Ryan Roberts <ryan.roberts@arm.com>
> Signed-off-by: Peter Xu <peterx@redhat.com>
All passing again for me:
Tested-by: Ryan Roberts <ryan.roberts@arm.com>
> ---
> tools/testing/selftests/mm/run_vmtests.sh | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh
> index b1b78e45d613..223c2304f885 100755
> --- a/tools/testing/selftests/mm/run_vmtests.sh
> +++ b/tools/testing/selftests/mm/run_vmtests.sh
> @@ -298,7 +298,8 @@ CATEGORY="userfaultfd" run_test ./uffd-unit-tests
> uffd_stress_bin=./uffd-stress
> CATEGORY="userfaultfd" run_test ${uffd_stress_bin} anon 20 16
> # Hugetlb tests require source and destination huge pages. Pass in half
> -# the size ($half_ufd_size_MB), which is used for *each*.
> +# the size of the free pages we have, which is used for *each*.
> +half_ufd_size_MB=$((freepgs / 2))
> CATEGORY="userfaultfd" run_test ${uffd_stress_bin} hugetlb "$half_ufd_size_MB" 32
> CATEGORY="userfaultfd" run_test ${uffd_stress_bin} hugetlb-private "$half_ufd_size_MB" 32
> CATEGORY="userfaultfd" run_test ${uffd_stress_bin} shmem 20 16
prev parent reply other threads:[~2024-04-04 7:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-03 20:03 peterx
2024-04-04 7:39 ` Ryan Roberts [this message]
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=d968a109-7f74-4cce-b2fa-98165048a2e9@arm.com \
--to=ryan.roberts@arm.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=muchun.song@linux.dev \
--cc=peterx@redhat.com \
--cc=usama.anjum@collabora.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