[RFC] Add GNU_PROPERTY_1_NEEDED_THP_ON_[READ_ONLY_SEGMENTS|MALLOC]
H.J. Lu
hjl.tools@gmail.com
Fri Apr 17 23:15:33 GMT 2026
On Fri, Apr 17, 2026 at 9:31 PM Adhemerval Zanella Netto
<adhemerval.zanella@linaro.org> wrote:
>
>
>
> On 17/04/26 07:27, H.J. Lu wrote:
> > On Fri, Apr 17, 2026 at 5:29 PM Florian Weimer <fweimer@redhat.com> wrote:
> >>
> >> * H. J. Lu via Gnu-gabi:
> >>
> >>> 1. GNU_PROPERTY_1_NEEDED_THP_ON_READ_ONLY_SEGMENTS
> >>
> >>> 2. GNU_PROPERTY_1_NEEDED_THP_ON_MALLOC
> >>
> >> Why NEEDED? Isn't this purely optional, and the program has to work
> >> whether glibc enables THP or not?
> >>
> >
> > What do you prefer to call it? Optional, desired, recommended, required?
> >
>
>
> Maybe Optional or without any prepend, the property is an opt-in feature
> that can not always be satisfied by the runtime (due missing kernel or
> architecture support).
Linux gABI has
GNU_PROPERTY_1_NEEDED The pr_data field contains a 4-byte integer
to indicate the properties needed by object file.
We can update it to
GNU_PROPERTY_1_NEEDED The pr_data field contains a 4-byte integer
to indicate the properties needed by object file for correctness or performance.
> I am still not sure about the need of this, I discussed something similar
> privately with Wilco and he raised some concerns about it (CCing him,
> he might have more to add).
These bits provide a way to opt-in a feature which hurts performance in
some cases when enabled by default.
--
H.J.
More information about the Libc-alpha
mailing list