This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2 1/2] Add framework for tunables
- From: Siddhesh Poyarekar <sid at reserved-bit dot com>
- To: Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>
- Cc: libc-alpha at sourceware dot org, roland at hack dot frob dot com, carlos at redhat dot com, Andi Kleen <andi at firstfloor dot org>, "Paul E. Murphy" <murphyp at linux dot vnet dot ibm dot com>, munroesj at linux dot vnet dot ibm dot com
- Date: Wed, 3 Feb 2016 19:32:07 +0530
- Subject: Re: [PATCH v2 1/2] Add framework for tunables
- Authentication-results: sourceware.org; auth=none
- References: <20160116185545 dot GA17772 at devel dot intra dot reserved-bit dot com> <87d1sdrjls dot fsf at totoro dot br dot ibm dot com>
On Wed, Feb 03, 2016 at 11:47:43AM -0200, Tulio Magno Quites Machado Filho wrote:
> LGTM, but I have some cosmetic comments.
> I tested this on powerpc, powerpc64 and powerpc64le.
Thanks for your comments and the testing.
>
> > diff --git a/tunables/README b/tunables/README
> > new file mode 100644
> > index 0000000..02a3f7a
> > --- /dev/null
> > +++ b/tunables/README
> > @@ -0,0 +1,93 @@
> > + TUNABLE FRAMEWORK
> > + =================
> > +
> > +The tunable framework allows modules within glibc to register variables that
>
> Tunables instead of tunable?
> Both in the subject and in the previous line.
>
> > diff --git a/tunables/tunables.c b/tunables/tunables.c
> > new file mode 100644
> > index 0000000..8834aff
> > --- /dev/null
> > +++ b/tunables/tunables.c
> > @@ -0,0 +1,163 @@
> > ...
> > +
> > +/* Initialize tunables from the GLIBC_TUNABLES environment variable. The
> > + variable is set as colon separated name=value pairs. This routine may be
> > + called from the constructor of either libpthread.so or lic.so. Constructor
>
> s/lic.so/libc.so/
>
> > diff --git a/tunables/tunables.h b/tunables/tunables.h
> > new file mode 100644
> > index 0000000..6aef30e
> > --- /dev/null
> > +++ b/tunables/tunables.h
> > @@ -0,0 +1,110 @@
> > ...
> > +/* Register a tunable ID in namespace NS inside the glibc top namespace with
> > + SET as the setter function. */
> > +#define TUNABLE_REGISTER(ns,id,set) \
> > + TUNABLE_REGISTER_FULL (TOP_NAMESPACE, ns, id, set)
> > +
> > +/* Register a tunable ID in namespace NS inside the TNS top namespace with
> > + SET as the setter function. */
> > +#define TUNABLE_REGISTER_FULL(tns,ns,id,set) \
> > + __tunable_register (TUNABLE_ENUM_NAME (tns, ns, id), (set))
> > +
> > +
> ^
> Is this character intentional?
Yes, it is the page break character to separate the API calls from the
internal macros below. It doesn't have any functional benefit, just a
useful marker that we've used in other places in the code.
Siddhesh