From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x32.google.com (mail-oa1-x32.google.com [IPv6:2001:4860:4864:20::32]) by sourceware.org (Postfix) with ESMTPS id 8A10E3858D33 for ; Wed, 8 Mar 2023 17:46:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8A10E3858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-1755e639b65so19558455fac.3 for ; Wed, 08 Mar 2023 09:46:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678297574; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=Yi97qxgwambY1C9imGa66EnSWDAB/XhXgup4f+3hmk8=; b=vLfMStpV/GVa+JIwh93cszXHv/rI+FHGAUh0XYHPeyFzuMH2BJyxZQb++2rsrlkh9K RfLbgtDZSPLiV/DLKvMatAXcuc7/UiNkGnS7YLtay7zBBsln/LXvGTzCueZUdCKuczaM ekP8UCBGcacDte7PrB8R+jSYbZMQWPb71timdZLE1khSI4Ydal93OlYp2LdwB6XQ/pnU q+zwdmvj7S2vAA32/mEWxcKXap6+aw1oychxnf8q8T2SteB1+/Lyb0yndprfARoSimGQ V4XIR08y4/G7ax93xeFGAkanNeEovrLpbWpHQirGS/80mD7Ocv8ofGGAKWLyecITRCLo JluQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678297574; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Yi97qxgwambY1C9imGa66EnSWDAB/XhXgup4f+3hmk8=; b=Bs7BTRbMaGZpq9/O6hjUbfEZXOrgyXZUpzrAC4jtM6zzEIlBwrSCZJCzrtXd6TlvRg dbYMeDMoZgrIjwr4FR3w1UKko5dsnNj9OyhRQhOZd0M4CCsdjCDPsp0XWYBj6E3DoBLZ 0KPKDu+Pg4B9oqgwF7KMHtfKAzI+oczCy1pGamgWmltythSnjPgeHtAjspHRA2zkkGJr D9d9uEvv2fUwKrpJ561jP7cmZi8UG+n9EGY5NZ2vMZbAOVjy7KBZMduJdVEKpS/ep/0v 5/j8ACkxOEbbsVPcb8jKUV5A5/gRH2DnI2p5xvOF5P266rq2CiGWu/lIo4LUZiZds+o4 HfCw== X-Gm-Message-State: AO0yUKWFQTDneSRBzZiqVwZjWhFfo00dqOuw87JHTbNBfp8QhEaGDDeP Yj4jEbqIcds4D+lT+RRgGk66iKBiET3Qbuf7PouGFA== X-Google-Smtp-Source: AK7set+mmG96OvFnUQ7diOc0MWfmJz+Tz+Fi9D8JawHMOj+A3NGdIveDcvyRaaKL+zapT62bHhYKKQ== X-Received: by 2002:a05:6871:721:b0:172:56ba:1eaf with SMTP id f33-20020a056871072100b0017256ba1eafmr12274966oap.53.1678297573356; Wed, 08 Mar 2023 09:46:13 -0800 (PST) Received: from ?IPV6:2804:1b3:a7c0:544b:655d:5559:758d:90f7? ([2804:1b3:a7c0:544b:655d:5559:758d:90f7]) by smtp.gmail.com with ESMTPSA id r9-20020a4a6349000000b00525ccc4caadsm5558671oof.4.2023.03.08.09.46.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Mar 2023 09:46:11 -0800 (PST) Message-ID: <50d01e1c-1a6d-87fa-35ed-165682c773b8@linaro.org> Date: Wed, 8 Mar 2023 14:46:08 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH] time: Use CLOCK_REALTIME for time (BZ #30200) Content-Language: en-US To: Florian Weimer Cc: Bruno Haible , Paul Eggert , libc-alpha@sourceware.org References: <20230306160321.2942372-1-adhemerval.zanella@linaro.org> <877cvspxxa.fsf@oldenburg.str.redhat.com> <4301180.vrBl8dPDy9@nimes> <87mt4nqiek.fsf@oldenburg.str.redhat.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <87mt4nqiek.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: On 08/03/23 14:09, Florian Weimer wrote: > * 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. I just did some benchmarks using vdso test with time vdso support [1] $ ./vdsotest clock-gettime-realtime bench clock-gettime-realtime: syscall: 82 nsec/call clock-gettime-realtime: libc: 18 nsec/call clock-gettime-realtime: vdso: 18 nsec/call $ ./vdsotest clock-gettime-realtime-coarse bench clock-gettime-realtime-coarse: syscall: 65 nsec/call clock-gettime-realtime-coarse: libc: 5 nsec/call clock-gettime-realtime-coarse: vdso: 3 nsec/call $ ./vdsotest time bench time: syscall: 41 nsec/call time: libc: 2 nsec/call time: vdso: 1 nsec/call So while time vdso still show small improvement, I hardly think it is a dealbreaker. [1] git@github.com:zatrazz/vdsotest.git