[PATCH v6 4/4] Add system-wide tunables: Filters

Yury Khrustalev yury.khrustalev@arm.com
Mon Mar 30 09:05:14 GMT 2026


On Thu, Mar 26, 2026 at 01:38:50PM -0400, DJ Delorie wrote:
> 
> Yury Khrustalev <yury.khrustalev@arm.com> writes:
> > For example, right now, the value from GLIBC_TUNABLES overrides
> > the default value. Now, which one has higher priority, env var or
> > system-wide config?
> >
> > I have an opinion here but I don't want to impose it :)
> 
> I think the config needs to be able to choose from these (ignoring the
> defaults, for now, because we *always* have defaults):
> 
>   1) system-wide
>   2) env var
> 
>   1) system-wide only
> 
>   1) env var only (by not mentioning it in tunables.conf)
> 
> The only other non-Sisyphean option would be:
> 
>   1) system-wide
>   2) env var if numerically larger (closer to +Inf)

We should not take into account values of tunables. This would be a
mistake: like I said, some tunables don't have any monotonicity of
their values.

>   1) system-wide
>   2) env var if numerically smaller (closer to -Inf)

Ditto

> 
> but that obviously won't include non-numeric tunables.
> 

One more reason not to consider the values of tunables.

I think we should use the following approach:

1) Use default if not overridden (via env var or tunables.conf).
2) Env var overrides tunables.conf unless tunables.conf has special
   "final" marker for this tunable.

Plain and simple. Again, actual values of the tunables are irrelevant.



More information about the Libc-alpha mailing list