This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 1/2] Add framework for tunables


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]