This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/2] Add framework for tunables
- From: Siddhesh Poyarekar <siddhesh at sourceware dot org>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Sun, 3 Jul 2016 22:43:56 +0530
- Subject: Re: [PATCH 1/2] Add framework for tunables
- Authentication-results: sourceware.org; auth=none
- References: <1467479562-11357-1-git-send-email-siddhesh at sourceware dot org> <1467479562-11357-2-git-send-email-siddhesh at sourceware dot org> <CAMe9rOqhHyGJb-knN48pyDJJxVqOF=yxFHj_RzL3tnH9jJqvVQ at mail dot gmail dot com>
On Sun, Jul 03, 2016 at 07:44:25AM -0700, H.J. Lu wrote:
> > +
> > +/* Compare environment names, bounded by the name hardcoded in glibc. */
> > +static bool
> > +is_name (const char *orig, const char *envname)
> > +{
> > + for (;*orig != '\0' && *envname != '\0'; envname++, orig++)
> > + if (*orig != *envname)
> > + break;
> > +
> > + /* The ENVNAME is immediately followed by a value. */
> > + if (*orig == '\0' && *envname == '=')
> > + return true;
> > + else
> > + return false;
> > +}
>
> Can you add the length parameter to is_name and make is_name
> processor specific so that misaligned short/int/long long load can
> be used, similar to equal in
Will it really make that much of an impact? These will be really
short comparisons (less than 16 bytes in most cases) and will really
only happen once during startup.
Maybe we could do it as an addon patch if the tunables initialization
really turns out to be that much of a bottleneck.
Siddhesh