linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Rafael Aquini <aquini@redhat.com>
Cc: linux-kselftest@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,
	David Hildenbrand <david@redhat.com>,
	Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH] selftests/mm: run_vmtests.sh: fix half_ufd_size_MB calculation
Date: Wed, 19 Feb 2025 09:26:53 -0500	[thread overview]
Message-ID: <Z7XqLQmmkDjWNM_5@x1.local> (raw)
In-Reply-To: <20250218192251.53243-1-aquini@redhat.com>

On Tue, Feb 18, 2025 at 02:22:51PM -0500, Rafael Aquini wrote:
> From: Rafael Aquini <raquini@redhat.com>
> 
> We noticed that uffd-stress test was always failing to run when invoked
> for the hugetlb profiles on x86_64 systems with a processor count of 64
> or bigger:
>   ...
>   # ------------------------------------
>   # running ./uffd-stress hugetlb 128 32
>   # ------------------------------------
>   # ERROR: invalid MiB (errno=9, @uffd-stress.c:459)
>   ...
>   # [FAIL]
>   not ok 3 uffd-stress hugetlb 128 32 # exit=1
>   ...
> 
> The problem boils down to how run_vmtests.sh (mis)calculates the size
> of the region it feeds to uffd-stress. The latter expects to see an
> amount of MiB while the former is just giving out the number of free
> hugepages halved down. This measurement discrepancy ends up violating
> uffd-stress' assertion on number of hugetlb pages allocated per CPU,
> causing it to bail out with the error above.
> 
> This commit fixes that issue by adjusting run_vmtests.sh's half_ufd_size_MB
> calculation so it properly renders the region size in MiB, as expected,
> while maintaining all of its original constraints in place.
> 
> Fixes: 2e47a445d7b3 ("selftests/mm: run_vmtests.sh: fix hugetlb mem size calculation")
> Signed-off-by: Rafael Aquini <raquini@redhat.com>

Oops.. thanks!

Reviewed-by: Peter Xu <peterx@redhat.com>

-- 
Peter Xu



      parent reply	other threads:[~2025-02-19 14:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-18 19:22 Rafael Aquini
2025-02-19  9:30 ` David Hildenbrand
2025-02-19 14:26 ` Peter Xu [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=Z7XqLQmmkDjWNM_5@x1.local \
    --to=peterx@redhat.com \
    --cc=aquini@redhat.com \
    --cc=david@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --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