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=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, 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 209591F461 for ; Mon, 2 Sep 2019 13:32:56 +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:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type; q=dns; s=default; b=FOvHn s9Eb5LHLS94dV7wusrVO2JDjGwwbxfIip7xPLphmyxUiEiT2HON9adB/wSCWwUOs om9KWFOmLK5guh6UkdBMfQdCDCOVMUcb09wAhNCqJJI4P/Pr5oyYFpRIsTR6kKQq d7sen+VvYW9SHcM2lKoDqiCLfX5TH+FUrznTJs= 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:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type; s=default; bh=SLfweH0HT3O rDtysBhTs46XZExI=; b=hregs7h3mlpIvTjpDsrEs666pCvZ/lH9s4gssoGf58C 3Uiqp99j39cjLS6Iz+cjWOW/pv7cvpBpYitOA47uOEW4cP3KCSkjOMfC8+bjDWgY HjUz/7t7yICd9+3YEuemEZgXYdspgPWriIgm3ZfXzQ4/Pow0+aCtzMLRtzslcuiw = Received: (qmail 78326 invoked by alias); 2 Sep 2019 13:32:42 -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 78271 invoked by uid 89); 2 Sep 2019 13:32:41 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mx1.redhat.com From: Florian Weimer To: Zack Weinberg Cc: Paul Eggert , GNU C Library , Joseph Myers , Lukasz Majewski , Alistair Francis , Stepan Golosunov , Arnd Bergmann , Adhemerval Zanella , Samuel Thibault Subject: Re: [PATCH v2 05/10] Use clock_gettime to implement time. References: <20190828153236.18229-1-zackw@panix.com> <20190828153236.18229-6-zackw@panix.com> <87muftb1fk.fsf@oldenburg2.str.redhat.com> <87sgpl9h2o.fsf@oldenburg2.str.redhat.com> <321d1bd0-a9f6-310b-5412-a023d813e90f@cs.ucla.edu> <87imqh9dhm.fsf@oldenburg2.str.redhat.com> Date: Mon, 02 Sep 2019 15:32:33 +0200 In-Reply-To: (Zack Weinberg's message of "Thu, 29 Aug 2019 13:49:12 -0400") Message-ID: <87r24yvn66.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain * Zack Weinberg: > On Wed, Aug 28, 2019 at 5:39 PM Florian Weimer wrote: >> I think we should keep using the time entry in the vDSO. This >> consolidation is just not possible to do for performance reasons. > > To be crystal clear about where I'm coming from, I think this > consolidation is *necessary* to clear the way for the y2038 patches. But it's not an absolute technical requirement, right? I mean, if we wanted, we could still add a file like sysdeps/unix/sysv/linux/x86_64/time.c and do things differently there? (Although we'd also have to change the vDSO setup code for an efficient implementation.) > And I was under the impression that the kernel people wanted to > withdraw support for the time and gettimeofday entry points (at least > for new architectures going forward). Yes, but that doesn't mean they want performance regressions on x86-64. I think. > So I'm only looking for ways to mitigate the performance impact at > this point. Before I back off on "henceforth we only call the > kernel's clock_gettime" I would need to hear *both* a really > compelling argument for why we need to keep calling the time or > gettimeofday entry points -- a few ns more expense on a call that only > reports the time to the nearest second isn't going to cut it -- *and* > an explanation of why it won't interfere with the y2038 work and/or > why we won't have to stop using them in the future anyway. I expect that people have time calls in (binary) logging code where this is visible. I think EXPLAIN ANALYZE in PostgreSQL also rather sensitive to timing performance, but fortunately it already uses clock_gettimeofday. I'm not too concerned here (assuming that we *can* still optimize the time function on select architectures if that proves necessary in a couple of years). It's just that I really dislike the idea of performance regressions on 64-bit architectures as a side effect of Y2038 support on 32-bit architectures. Thanks, Florian