Re: [PATCH] elf: Only build THP tests for ABIs that define THP-PAGE-SIZE

Florian Weimer <[email protected]>
Newsgroups gmane.comp.lib.glibc.alpha
Message-ID <[email protected]>
* Adhemerval Zanella:

> +# The THP tests are only built and run for ABIs that define THP-PAGE-SIZE
> +# in their sysdeps Makefile.  THP-PAGE-SIZE is the largest PMD transparent
> +# huge page size the ABI supports that does not exceed MAX_THP_PAGESIZE
> +# (from sysdeps/generic/hugepages.h); PT_LOAD segments in the THP tests
> +# are aligned to it so that the kernel can map them to addresses aligned
> +# to the THP page size.  Larger THP page sizes make the tests exit as
> +# unsupported at runtime.
> +ifneq (,$(THP-PAGE-SIZE))
> +
> +tests += \
> +  tst-thp-1 \
> +  tst-thp-1-pde \
> +  tst-thp-1-static \
> +  tst-thp-align \
> +# tests
> +tests-static += \
> +  tst-thp-1-static \
> +# tests-static
> +modules-names += \
> +  tst-thp-size-mod \
> +# modules-names
>  
>  THP-PAGE-SIZE-CFLAGS = -DTHP_PAGE_SIZE=$(THP-PAGE-SIZE)
>  THP-PAGE-SIZE-LDFLAGS = -Wl,-z,max-page-size=$(THP-PAGE-SIZE)
> @@ -919,6 +928,7 @@ $(objpfx)strace-tst-thp-align-disabled.out: \
>  	  $(evaluate-test)
>  endif # [madvise]
>  endif # $(cross-compiling)
> +endif # $(THP-PAGE-SIZE)
>  endif # $(subdir) == elf

I think this makes it likely that we don't test THP on new
architectures.  I suggest to set the default to 0x200000 and use 0 for
the opt-out on unsupported architectures.

Thanks,
Florian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.