From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74963 invoked by alias); 2 Jan 2020 13:16:33 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 74953 invoked by uid 89); 2 Jan 2020 13:16:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: bonobo.birch.relay.mailchannels.net X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Interest-Scare: 6b9025e2781dba81_1577970989427_2281393979 X-MC-Loop-Signature: 1577970989427:1564397688 X-MC-Ingress-Time: 1577970989427 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gotplt.org; h=subject:to :references:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=gotplt.org; bh=Ab4H2l HQbGBgEOfSfTTITyeTQoE=; b=uEx/AwW9m2Xt3YbpXzFN6CSTjACJ4C2wDyC1Sc qDnL2Tk1t2Ejvf4nO38lvkfbVeYbFn8wJNuxN5CJOy4lB5EdqoHn/9fIIBlHSD+Z eRY7347ARGfxx3T8Km6rigwl67w+k8Bx6Tb0GBfZSAl+bgXGLnjZ0+pcOVG1zfsa uQfZs= Subject: Re: [PATCH 16/16] linux: Optimize fallback 32-bit clock_getres To: Adhemerval Zanella , libc-alpha@sourceware.org References: <20191217214728.2886-1-adhemerval.zanella@linaro.org> <20191217214728.2886-16-adhemerval.zanella@linaro.org> X-DH-BACKEND: pdx1-sub0-mail-a59 From: Siddhesh Poyarekar Message-ID: <8e587f07-a8a4-5416-7c71-ba796296e9f3@gotplt.org> Date: Thu, 02 Jan 2020 13:16:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <20191217214728.2886-16-adhemerval.zanella@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrvdeguddghedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomhepufhiugguhhgvshhhucfrohihrghrvghkrghruceoshhiugguhhgvshhhsehgohhtphhlthdrohhrgheqnecukfhppeduvdefrddvhedvrddvtddvrddujedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopegludelvddrudeikedruddrleejngdpihhnvghtpeduvdefrddvhedvrddvtddvrddujedvpdhrvghtuhhrnhdqphgrthhhpefuihguughhvghshhcurfhohigrrhgvkhgrrhcuoehsihguughhvghshhesghhothhplhhtrdhorhhgqedpmhgrihhlfhhrohhmpehsihguughhvghshhesghhothhplhhtrdhorhhgpdhnrhgtphhtthhopegrughhvghmvghrvhgrlhdriigrnhgvlhhlrgeslhhinhgrrhhordhorhhgnecuvehluhhsthgvrhfuihiivgepud X-SW-Source: 2020-01/txt/msg00031.txt.bz2 On 18/12/19 3:17 am, Adhemerval Zanella wrote: > This patch avoid probing the __NR_clock_getttime64 syscall each time > __clock_gettime64 is issued on a kernel without 64 bit time support. > Once ENOSYS is obtained, only 32-bit clock_gettime are used. > > The following snippet: > > clock_getres (CLOCK_REALTIME, &(struct timespec) { 0 }); > clock_getres (CLOCK_MONOTONIC, &(struct timespec) { 0 }); > clock_getres (CLOCK_BOOTTIME, &(struct timespec) { 0 }); > clock_getres (20, &(struct timespec) { 0 }); > > On a kernel without 64 bit time support issues the syscalls: > > syscall_0x196(0, 0xffb83330, [...]) = -1 ENOSYS (Function not implemented) > clock_getres(CLOCK_REALTIME, {tv_sec=0, tv_nsec=1}) = 0 > clock_getres(CLOCK_MONOTONIC, {tv_sec=0, tv_nsec=1}) = 0 > clock_getres(CLOCK_BOOTTIME, {tv_sec=0, tv_nsec=1}) = 0 > > Checked on i686-linux-gnu on 4.15 kernel. > --- > sysdeps/unix/sysv/linux/clock_getres.c | 16 ++++++++++++---- > 1 file changed, 12 insertions(+), 4 deletions(-) > OK. Reviewed-by: Siddhesh Poyarekar