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.1 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,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 B778E1F463 for ; Thu, 2 Jan 2020 13:16:35 +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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=SnYGkPSkjOTB1Xrh EapGeDLndAw/NQBjVv/4Q2M21hljmK5pg/RDJho06PUQjb/ke0azUsbFldutWuST 5Pqg+FRX8efFWGDV9avXW161isPQSqiSR2MweHzud2jmrWJ/A7ZOco0uVnENF4xA xZLeIimkN+78CS8DpiU73eXmblQ= 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=Ab4H2lHQbGBgEOfSfTTITy eTQoE=; b=iKCEF86hA5v83QVbMGgf9ZLGk2+jvSkra/aQ8Zj3hLx8p4QjpUGLsO uY6I3LXWBVeYPRbTUB63T94AX3dDiq+6kbQi+Dy+HxacOltPFPe3W9jjLSE41CiC E3wTGG7lMmbRzuPKbqK4pxlG+ZOhUQmaz6OSSTUbVVuiPZqw1+mFk= 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-Unsubscribe: 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-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, 2 Jan 2020 18:46:07 +0530 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 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