From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 55753 invoked by alias); 8 Jun 2018 08:02:20 -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 53761 invoked by uid 89); 8 Jun 2018 08:00:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=-3.1 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=07=e6, Hx-languages-length:1085, 2018=e5=b9=b406=e6, remembered?= X-HELO: mga11.intel.com X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 Subject: Re: [PATCH v3 1/3] Tunables: Add tunables of spin count for pthread adaptive spin mutex To: Florian Weimer , Adhemerval Zanella , Rical Jason , Carlos Donell , Glibc alpha Cc: Dave Hansen , Tim Chen , Andi Kleen , Ying Huang , Aaron Lu , Lu Aubrey References: <1527067354-13333-1-git-send-email-kemi.wang@intel.com> From: kemi Message-ID: <86be6ce2-e728-e084-eeda-aeaf3a4b45b7@intel.com> Date: Fri, 08 Jun 2018 08:02:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2018-06/txt/msg00161.txt.bz2 On 2018年06月07日 21:09, Florian Weimer wrote: > On 05/23/2018 11:22 AM, Kemi Wang wrote: >> +#ifdef SHARED >> +# define INIT_SECTION ".init_array" >> +#else >> +# define INIT_SECTION ".preinit_array" >> +#endif >> + >> +void (*const __pthread_mutex_tunables_init_array []) (int, char **, char **) >> +  __attribute__ ((section (INIT_SECTION), aligned (sizeof (void *)))) = >> +{ >> +  &mutex_tunables_init >> +}; > > > Did you try to get rid of this? > I remembered you suggested me to put this initialization as part of pthread initialization. https://sourceware.org/ml/libc-alpha/2018-05/msg00289.html But, mutex_tunables_init need three parameters such as argc, argv, and env from libc_start_main, while the pthread initialization function __pthread_initialize_minimal does not include any parameter. I don't think we can simply put it as part of overall thread initialization unless we change the API of __pthread_initialize_minimal. Maybe you have better idea. > Thanks, > Florian