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.8 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 4C0261F461 for ; Wed, 28 Aug 2019 18:36:25 +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:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type; q=dns; s=default; b=koTB 9QDHOcO63FfryiHkhc/8zUjPU1wIQwixq95olAXD/Jd0gRRSi75Aso8DHx9xrFs9 uOyxrQyg5v+4gcleTaKoatwT0BOs8E2vJFIxeWeGNyekuwJaDu9Fk9XELV1EnIM/ hvHsA8YamT7Lp0wxvjpnnBrJtZkmKSwcxlkHXnk= 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:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type; s=default; bh=Sr3d5dK6E/ t46mYyT7JGdVtKD2Y=; b=bgeyVnKupTEjOlF+UdkvAL8sVHePM8M0dkfCz7LtDp 5lUPynP8OT9eYd4EDNqA4OwL0dCA1c1YHTxPEb3n6/gLJPt742FT1+AKl4os1i9+ oHAPMO6L2J4exfJNg/rw9Zsq+67z1UWEUVWSBhac6zQJtvy6DVz1PZyqNFzslj4I Y= Received: (qmail 124538 invoked by alias); 28 Aug 2019 18:36:23 -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 124530 invoked by uid 89); 28 Aug 2019 18:36:22 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mailbackend.panix.com MIME-Version: 1.0 References: <20190828153236.18229-1-zackw@panix.com> <20190828153236.18229-6-zackw@panix.com> <87muftb1fk.fsf@oldenburg2.str.redhat.com> In-Reply-To: <87muftb1fk.fsf@oldenburg2.str.redhat.com> From: Zack Weinberg Date: Wed, 28 Aug 2019 14:36:08 -0400 Message-ID: Subject: Re: [PATCH v2 05/10] Use clock_gettime to implement time. To: Florian Weimer Cc: GNU C Library , Joseph Myers , Lukasz Majewski , Alistair Francis , Stepan Golosunov , Arnd Bergmann , Adhemerval Zanella , Samuel Thibault Content-Type: text/plain; charset="UTF-8" On Wed, Aug 28, 2019 at 2:16 PM Florian Weimer wrote: > > * Zack Weinberg: > > > Most ports were using gettimeofday to implement time, or they were > > making a direct (v)syscall. Unconditionally switch to using > > clock_gettime instead. All sysdeps implementations of time are > > removed. > > I'm sorry, but this is clearly not advisable because clock_gettime is > almost an order of magnitude slower than time. Hmm. How do we reconcile this with the (Linux) kernel maintainers' stated intentions to provide only clock_gettime in the future? We could use CLOCK_REALTIME_COARSE when available, I suppose; can you see whether that recovers the lost performance, or else send me your benchmark code so I can try it? zw