From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 90627 invoked by alias); 11 May 2018 00:28:44 -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 90613 invoked by uid 89); 11 May 2018 00:28:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=HX-Received:a62, H*r:sk:z70-v6s, H*RU:74.125.83.66, Hx-spam-relays-external:74.125.83.66 X-HELO: mail-pg0-f66.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=4wGqZBPxen7zaqD8OnEe4V5gROKgU2hUJQ+066T0D7s=; b=PBU6V10vrl97itrqyW7RfFLmcowS1y3D2Aam1C0uGNIdHRulVAEXQTwXfUJ1LdPvtK 6vECOUsKLV/8cIYShAwJDsFd8y98mM7T5tiLPsfkOo03duyXz8+ap696cRY0bXzyWWQE K5DfeFvCOwvFeVxtkox4qpDKQ0F4sKhOdXURMlKB4h476QAn+37Gd+rX9qtMeiH2rFTf TWdFLoOT6d/YWJnLCkOgDSWZSe1DJxVprxEf1hrS2OAWWCGBOlfS+LBgeqzbNTLxOsMA W26c1tYycjG5E9Z9hs/9b5S1vcSenKQTluNTbqP9vnvskdwXlF65+M6vnckU/YtFLwqq pBLA== X-Gm-Message-State: ALKqPwc53I4lo/hzD7LuXBAMSFyPA5SJ3REsXc3ncIw4Nvck1ZvEcU3p OfdUypc42h1BL7eS15dtBFo= X-Google-Smtp-Source: AB8JxZo7Oj6kQTvsjgsUFZ0sPK2vkauMKeopcQofW+DaGDiW0HPtDKgn+aaRwGkr+N4uZWN3ofNj8A== X-Received: by 2002:a62:fd12:: with SMTP id p18-v6mr3295859pfh.152.1525998520524; Thu, 10 May 2018 17:28:40 -0700 (PDT) Date: Fri, 11 May 2018 00:28:00 -0000 From: Jonathan Nieder To: Steve Ellcey Cc: libc-alpha Subject: Re: [Patch] Use VDSO interface for gettimeofday on aarch64 Message-ID: <20180511002838.GB125677@aiede.svl.corp.google.com> References: <1525975253.28825.227.camel@cavium.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1525975253.28825.227.camel@cavium.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-SW-Source: 2018-05/txt/msg00487.txt.bz2 Hi, Steve Ellcey wrote: > This is a Aarch64 version of gettimeofday that uses the VDSO interface > when it is available.  I did a test with 100000000 gettimeofday calls > on a T88 and the time went from 7.1 seconds to 5.5 seconds.   I also > ran the glibc testsuite and I did not get any regressions. Yay! [...] > --- a/sysdeps/unix/sysv/linux/aarch64/gettimeofday.c > +++ b/sysdeps/unix/sysv/linux/aarch64/gettimeofday.c > @@ -0,0 +1,69 @@ [...] > +/* PREPARE_VERSION will need an __LP64__ ifdef when ILP32 support > +   goes in.  See _libc_vdso_platform_setup in > +   sysdeps/unix/sysv/linux/aarch64/init-first.c.  */ > + > +# undef INIT_ARCH > +# define INIT_ARCH() \ > +    PREPARE_VERSION (linux_version, "LINUX_2.6.39", 123718537); \ Can this be added as a PREPARE_VERSION_KNOWN? > +    void *vdso_gettimeofday = \ > +      _dl_vdso_vsym ("__kernel_gettimeofday", &linux_version); I was surprised to see LINUX_2.6.39 here, but that's really what the symbol version exported from Linux is called. It was actually introduced in v3.7-rc1~178^2~15. I then suspected it was for consistency with arm, but arm uses LINUX_2.6. Maybe that's just how long it took for the patch to be merged? Not related to your patch, just an issue I was curious about on the way. The rest looks good. With or without the PREPARE_VERSION_KNOWN change mentioned above, Reviewed-by: Jonathan Nieder Thanks.