From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92296 invoked by alias); 11 Jul 2016 16:56:30 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 92278 invoked by uid 89); 11 Jul 2016 16:56:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy= X-HELO: mx0a-001b2d01.pphosted.com X-IBM-Helo: d03dlp01.boulder.ibm.com X-IBM-MailFrom: murphyp@linux.vnet.ibm.com Subject: Re: [PATCH 1/2] Add framework for tunables To: Siddhesh Poyarekar , libc-alpha@sourceware.org References: <1468089478-10085-1-git-send-email-siddhesh@sourceware.org> <1468089478-10085-2-git-send-email-siddhesh@sourceware.org> From: "Paul E. Murphy" Date: Mon, 11 Jul 2016 16:56:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <1468089478-10085-2-git-send-email-siddhesh@sourceware.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16071116-0008-0000-0000-000005071E33 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16071116-0009-0000-0000-000039358FBC Message-Id: <2d1339f8-e15f-6c95-f978-94c7c9bb756f@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-07-11_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=9 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1607110167 X-SW-Source: 2016-07/txt/msg00277.txt.bz2 I am still reviewing the patch, but the question which pops into my head is whether this is sufficient to initialize tunables used early on via an init section. As implied above, my hope is that the initial patches will enable trivial addition tunables for TLE. I'll port my old patches and see how it goes nevertheless. On 07/09/2016 01:37 PM, Siddhesh Poyarekar wrote: > The tunables framework allows us to uniformly manage and expose global > variables inside glibc as switches to users. tunables/README has > instructions for glibc developers to add new tunables. > > Tunables support can be enabled by passing the --enable-tunables > configure flag to the configure script. This patch only adds a > framework and does not pose any limitations on how tunable values are > read from the user. It also adds environment variables used in malloc > behaviour tweaking to the tunables framework as a PoC of the > compatibility interface. > > * manual/install.texi: Add --enable-tunables option. > * INSTALL: Regenerate. > * Makeconfig (CPPFLAGS): Define TOP_NAMESPACE. > (before-compile): Generate dl-tunable-list.h early. > * config.h.in: Add BUILD_TUNABLES. > * config.make.in: Add build-tunables. > * configure.ac: Add --enable-tunables option. > * configure: Regenerate. > * malloc/arena.c [BUILD_TUNABLES]: Include dl-tunables.h. > Define TUNABLE_NAMESPACE. > (DL_TUNABLE_CALLBACK(set_mallopt_check)): New function. > (ptmalloc_init): Set tunable values. > * malloc/tst-malloc-usable-static.c: New test case. > * malloc/Makefile (tests-static): Add it. > * csu/init-first.c [BUILD_TUNABLES]: Include dl-tunables.h. > (__libc_init_first) [!SHARED]: Initialize tunables for static > binaries. > * scripts/gen-tunables.awk: New file. > * README.tunables: New file. > * elf/Versions (ld): Add __tunable_set_val to GLIBC_PRIVATE > namespace. > * elf/dl-tunable-list.h: New auto-generated file. > * elf/dl-tunables.c: New file. > * elf/dl-tunables.h: New file. > * elf/dl-tunables.list: New file. > * elf/dl-tunable-types.h: New file. > * elf/rtld.c [BUILD_TUNABLES]: Include dl-tunables.h > (process_envvars): Call __tunables_init.