[PATCH] tests/intel/xe_exec_system_allocator: Check huge pages free in thp tests

Matthew Brost matthew.brost at intel.com
Mon May 5 21:59:16 UTC 2025


On Mon, May 05, 2025 at 09:41:52PM +0000, Jonathan Cavitt wrote:
> In a previous patch, various subtests in xe_exec_system_allocator that
> rely on the MAP_HUGETLB flag for mmap were skipped in the event that no
> huge pages were reserved by the kernel.  These tests should also be
> skipped if all the huge pages are currently in use, which is indicated
> by HugePages_Free being 0 in /proc/meminfo.
> 
> Fixes: df3036da ("tests/intel/xe_exec_system_allocator: Check for huge pages before thp tests")
> Signed-off-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
> Cc: Matthew Brost <matthew.brost at intel.com>
> Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> ---
>  tests/intel/xe_exec_system_allocator.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tests/intel/xe_exec_system_allocator.c b/tests/intel/xe_exec_system_allocator.c
> index c2daf37121..9528c94495 100644
> --- a/tests/intel/xe_exec_system_allocator.c
> +++ b/tests/intel/xe_exec_system_allocator.c
> @@ -971,6 +971,8 @@ static void igt_require_hugepages(void)
>  {
>  	igt_skip_on_f(!igt_get_meminfo("HugePages_Total"),
>  		      "Huge pages not reserved by the kernel!\n");
> +	igt_skip_on_f(!igt_get_meminfo("HugePages_Free"),
> +		      "No huge pages available!\n");

Reviewed-by: Matthew Brost <matthew.brost at intel.com>

>  }
>  
>  static void
> -- 
> 2.43.0
> 


More information about the igt-dev mailing list