From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,LOTS_OF_MONEY, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 6FF961F461 for ; Tue, 3 Sep 2019 18:51:01 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=tKIPiXMiEDnuiC59 VsOFEJwUnam+rCT77VVYHEERrIC5pL04jJg6cWFVaQeFphqfz1mrHxiy+pv9G9+N 1Z+7wCvXAHAhfSCuu0xM7RFQKxI0swKn2ntDpneTWINEndz/M8wNGFIfrlAWJORD M7Ms7FngfwK5nt7h1pWGhgqLw8s= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=8xYkmn38UQsn+0enXBoD3x KpFC0=; b=HrZpygDxrFgFZhnkmNyP5bMOb0rDF+ts6/UKsVbH1K4U872j880E/2 GnMcdaglXROaMup4gbfo+pMxhqQwbuXNPOs2s64CnVIedAv1vQCTRDYCiXTHpxAc 9jW1IWdOb4Qd7Mw2ZmGnY1NH9YkxcSGDaLAGZDJLOyBnM3v4bFxwQ= Received: (qmail 97525 invoked by alias); 3 Sep 2019 18:50:59 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 97512 invoked by uid 89); 3 Sep 2019 18:50:58 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-qk1-f196.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=SU1eBXwSnOJIl29/4iVuzaesKLZ3sPeIs7PSn5oDzAo=; b=spv9XJGMu81nmU+SfjbtLxxeTMSlznF4CqKtI2O4VEhRyuCTWvKAk9n3yjVkaDj/qk FfYipiFqHLPiLGmXGVED6msEVivjGuQC8z9gkNy7mo1dxXXQmngKB6aMxCyDjNKJ4qjf H4FCnDl0G1sLXJU5xuJ/70etcyZP8LfSnJo1mSECayoJUXTd+/boYmhiIZt0QPuN5+it 95/jS89NwLiByg7b5BxTuX0FNpaIkUFHOACvLcmH5FJx0KxCL1SVDhwt3ZafXAQV4ijV cxCiAPZcy4Up9IKAS9H+zkkjRnRMebFyL1CcQr9hpZK1ns3ry/gx3m9XUXWYcO5GJvEU 8ErQ== Subject: Re: [PATCH v2 02/10] Finish move of clock_* functions to libc. To: Zack Weinberg Cc: Florian Weimer , GNU C Library , Joseph Myers , Lukasz Majewski , Alistair Francis , Stepan Golosunov , Arnd Bergmann , Samuel Thibault References: <20190828153236.18229-1-zackw@panix.com> <20190828153236.18229-3-zackw@panix.com> <87h85tu9bp.fsf@oldenburg2.str.redhat.com> <2bd7b653-e698-73c7-72b0-4e90c4b08d7a@linaro.org> <87lfv5qzev.fsf@oldenburg2.str.redhat.com> <6f31011c-e0d6-5803-87fb-3c4c0c149cf3@linaro.org> From: Adhemerval Zanella Openpgp: preference=signencrypt Message-ID: <861d132b-c190-470b-0865-698552cd1657@linaro.org> Date: Tue, 3 Sep 2019 15:50:51 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 03/09/2019 11:34, Zack Weinberg wrote: > On Tue, Sep 3, 2019 at 9:44 AM Adhemerval Zanella > wrote: >> On 03/09/2019 10:31, Florian Weimer wrote: >>> * Adhemerval Zanella: >>>> On 03/09/2019 04:29, Florian Weimer wrote: >>>>> * Zack Weinberg: >>>>>> diff --git a/rt/Versions b/rt/Versions >>>>>> index 91e3fd2a20..84d1345420 100644 >>>>>> --- a/rt/Versions >>>>>> +++ b/rt/Versions >>>>>> @@ -1,15 +1,3 @@ >>>>>> -libc { >>>>>> - GLIBC_2.17 { >>>>>> - # c* >>>>>> - clock_getres; clock_gettime; clock_settime; clock_getcpuclockid; >>>>>> - clock_nanosleep; >>>>>> - } >>>>>> - GLIBC_PRIVATE { >>>>>> - __clock_getres; __clock_gettime; __clock_settime; __clock_getcpuclockid; >>>>>> - __clock_nanosleep; >>>>>> - } >>>>>> -} >>>>> >>>>> Sorry, you cannot remove the GLIBC_2.17 symbol version in this way, >>>>> otherwise old binaries will fail to load. You need to leave behind a >>>>> dummy function definition. See __libpthread_version_placeholder for how >>>>> I handled this in the libpthread/vfork case. >>>> >>>> Are you sure about it? >>> >>> Yes. 8-) But I missed that this block was just moved to time/Versions. >>> Either place will work and generate the same symbol versions. >> >> Right, because that was my understanding (the symbol versions will still >> be generated correctly on libc). > > Yes, I moved the GLIBC_2.17 versions from rt/Versions to time/Versions > to keep them together with their .c files. > > Adhemerval, Florian, I suspect I won't have very much time to work on > glibc for the next two weeks. If either or both of you would like to > take over the branch for these patches (zack/y2038-preliminaries) and > keep working on it, please feel free. I will try to spare some time to create a personal branch based on yours with my reviewed remarks fixed. > > Incidentally, regarding the cost of converting from a struct timespec > to a struct timeval on systems where 'long' is 64 bits, I'm getting > what looks like decent code generation out of this definition of > TIMESPEC_TO_TIMEVAL: > > #define TIMESPEC_TO_TIMEVAL(tv, ts) do { \ > uint32_t __nsec = (ts)->tv_nsec; \ > (tv)->tv_sec = (ts)->tv_sec; \ > (tv)->tv_usec = __nsec / 1000; \ > } while (0) > > e.g. > > movq 8(%rsi), %rax > movq (%rsi), %rdx > movl %eax, %eax > movq %rdx, (%rdi) > imulq $274877907, %rax, %rax > shrq $38, %rax > movl %eax, %eax > movq %rax, 8(%rdi) > ret > > (Not sure why the 'movl %eax, %eax', though - clearing the upper 32 > bits maybe? I might throw this at a superoptimizer and see what it > comes up with.) > > zw >