From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id AA2D03858D33 for ; Wed, 8 Mar 2023 17:09:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AA2D03858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678295386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7HLhfXX5mzlvG4LFiwREnat6xkZPgQnPoJFWu1DaKME=; b=bnagUOtU6fGQYv/jvwDwaGIOgGID2yFoiGgKI7/Ia+fXgp+sqIXjq3F+Drk3NfpF768mE3 qvtLMg5Prt3RifhkbQWNHh/9e6bhyfruLRqwEaTFx7bKKVrk/1nbiajfu9K31Ux32QSCrg ZaTdr1ybS+KATxhEXGPAvkk/J+sO22I= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-6--ALPW1DmNqmhb8woPQMVfQ-1; Wed, 08 Mar 2023 12:09:42 -0500 X-MC-Unique: -ALPW1DmNqmhb8woPQMVfQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F3827858F0E; Wed, 8 Mar 2023 17:09:41 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.65]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E6DE140C83B6; Wed, 8 Mar 2023 17:09:40 +0000 (UTC) From: Florian Weimer To: Adhemerval Zanella Netto Cc: Bruno Haible , Paul Eggert , libc-alpha@sourceware.org Subject: Re: [PATCH] time: Use CLOCK_REALTIME for time (BZ #30200) References: <20230306160321.2942372-1-adhemerval.zanella@linaro.org> <877cvspxxa.fsf@oldenburg.str.redhat.com> <4301180.vrBl8dPDy9@nimes> Date: Wed, 08 Mar 2023 18:09:39 +0100 In-Reply-To: (Adhemerval Zanella Netto's message of "Wed, 8 Mar 2023 13:57:06 -0300") Message-ID: <87mt4nqiek.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: * Adhemerval Zanella Netto: > On 08/03/23 13:23, Bruno Haible wrote: >> Paul Eggert wrote: >>> My idea is to go through the apps I help maintain, and make sure that >>> they never call 'time' anywhere that it's important that a timestamp be >>> in sync with with the rest of the system >> >> Alternatively, these applications can continue to call 'time', if the >> package uses the Gnulib module 'time' that provides a workaround against >> https://sourceware.org/bugzilla/show_bug.cgi?id=30200 . >> >> Bruno > > Florian, do you really think that and latency increase of roughly 15ns > is really worth all the trouble gnulib is pushing? It means that we will > end up with programs that use CLOCK_REALTIME, while other use > CLOCK_REALTIME_COURSE. > > If users really to squeeze more performance, they can use clock_gettime > with CLOCK_REALTIME_COURSE. It should have similar performance to > time vDSO. Eh, I think the difference derives from using the time vDSO entrypoint (which your patch removed as well on x86-64). I don't see a performance difference between CLOCK_REALTIME and CLOCK_REALTIME_COARSE, so that's not it. Thanks, Florian