Message ID | 2bf63d1fc37727b7ed77dd20a69ae525a0cee859.1563321716.git.alistair.francis@wdc.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 22373 invoked by alias); 17 Jul 2019 00:12:38 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <libc-alpha.sourceware.org> List-Unsubscribe: <mailto:libc-alpha-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:libc-alpha-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 22123 invoked by uid 89); 17 Jul 2019 00:12:37 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit X-HELO: esa2.hgst.iphmx.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1563322368; x=1594858368; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4ymWxisMNRgnJoy8QxRb/0GIatnLLX6ul4qJY0Eg0sI=; b=TJ3gTuJ2lD6qUo5521SDDu43usRDb7IEV+++K0GKrgRZtiEwlzhOvTpB Zt4epOI+HOvpEs4n3ESV498ugRZYoTe2FOEgIqVSrZM2tDeClbzL19GUu bzBnFU3Vw/wnapxj/DXs5UotxfJlr5H/NOO6DtdJDKfxM6Ag4JFi4y+sK AZgaBmSzQCS+57dRRKFZsoFG3hpH1fEmp3fMDEMeyZkwZ8fA/J3md4OCW S6oPU175bFTlcA3yRnSDXnkf5S7Kly8E6XcrAqkhI1ffXf0Cklp+mP8wC 4/D9oartBjRyBPH40d2BLRetqB1BscvB0BqXF/Bon8wVP6jrwkUx7ClJe g==; IronPort-SDR: T4VLDog/C/6EVK8hclZOX52nKYgYl9hZSvoyXFMBhbIKFqn53c3yz+Flwla8w47UW58ud406fq Mpmy4NxMXnW3MKod5Ulv8oBZeZvqT6Py89i1iOY3D/qH47YVNELlZnzJ3Wfx/PmSvrKKM2siK6 Cyz9IU9xOfoRSau2ILYmfdvk33Z/DOgVBy1nOZJpqUza1iaWTbgFcqdyJUZb91M8vTmusVwWyK MH2fOBPllMmJSdqFLLnAZzxXkFQ4HEllX/YqWhrVbYBp2dnA5S7jXm9q6HlEL2J91nHUcW1thv l5Y= IronPort-SDR: JTcq1ceW36cDbfCuUMqXn/8RHrupF0MW5Y2gHiAo7l2O3jJntG9gEV3Jp+0A8BJMGuo6lLakkv NA1pcCVcTAWKF0XV/RGA2D+hsLwxpjUCvOsKfPX5FmJtYKoZLQ7l+v3gTI958eFukzVBGT8yfT yNdZBpINW9gFyJR4WU+P/27sZ5gX/yw9WaIO5hRCCDWuJHvBBJ0/wYJtyP4pJkFkGeDcE1Hk6p WTHgx84XYpXwyc3fIcB/votIHJfESqxoRdKY0CfD83qgtmrzJ785Tfd1LW4cptlubGajDSBaLn 8G9zYU6ZgI2Y2s1Elt7H7uC6 IronPort-SDR: 3e7GX5drYqWEfKeB3Bw3sSFygALTGYzDO3UeU1VnCG8Ke//vMf1TcmEusVoRVyC47oBiTruO1U qP2Epw+98zd6v7rlMWbGLC86xvh2fDWxJNoUmd3a5XlUaEoR4WwhI7WSMRY3AjSpvEtx4Xhvuc 8r6Pxsyr2hTsR326P4iM1X+oze+NdBbDJ1kcPcXkSlPnonHh47gKy4wXg58Az1aXPHUssmunUK sWEewU/sXWy1AzpSeqzeaJGS8LwNS/UdYLmM1n6yYAiW8LZmXuclSNqIIeRqkh/Np5Z9a825xb 1OU= From: Alistair Francis <alistair.francis@wdc.com> To: libc-alpha@sourceware.org Cc: arnd@arndb.de, adhemerval.zanella@linaro.org, fweimer@redhat.com, palmer@sifive.com, macro@wdc.com, zongbox@gmail.com, alistair.francis@wdc.com, alistair23@gmail.com Subject: [RFC v3 23/23] RISC-V: Use 64-bit vdso syscalls Date: Tue, 16 Jul 2019 17:09:42 -0700 Message-Id: <2bf63d1fc37727b7ed77dd20a69ae525a0cee859.1563321716.git.alistair.francis@wdc.com> In-Reply-To: <cover.1563321715.git.alistair.francis@wdc.com> References: <cover.1563321715.git.alistair.francis@wdc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit |
Commit Message
Alistair Francis
July 17, 2019, 12:09 a.m. UTC
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
sysdeps/unix/sysv/linux/riscv/init-first.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
* Alistair Francis: > Signed-off-by: Alistair Francis <alistair.francis@wdc.com> > --- > sysdeps/unix/sysv/linux/riscv/init-first.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sysdeps/unix/sysv/linux/riscv/init-first.c b/sysdeps/unix/sysv/linux/riscv/init-first.c > index 155a4a2c0c..fa9c690cdd 100644 > --- a/sysdeps/unix/sysv/linux/riscv/init-first.c > +++ b/sysdeps/unix/sysv/linux/riscv/init-first.c > @@ -43,11 +43,11 @@ _libc_vdso_platform_setup (void) > PTR_MANGLE (p); > VDSO_SYMBOL (gettimeofday) = p; > > - p = _dl_vdso_vsym ("__vdso_clock_gettime", &linux_version); > + p = _dl_vdso_vsym ("__vdso_clock_gettime64", &linux_version); > PTR_MANGLE (p); > VDSO_SYMBOL (clock_gettime) = p; > > - p = _dl_vdso_vsym ("__vdso_clock_getres", &linux_version); > + p = _dl_vdso_vsym ("__vdso_clock_getres_time64", &linux_version); > PTR_MANGLE (p); > VDSO_SYMBOL (clock_getres) = p; > } I believe this will lose vDSO acceleration for RV64 on older kernels which do not define __vdso_clock_getres_time64. Thanks, Florian
On Wed, Jul 17, 2019 at 7:33 AM Florian Weimer <fweimer@redhat.com> wrote: > > * Alistair Francis: > > > Signed-off-by: Alistair Francis <alistair.francis@wdc.com> > > --- > > sysdeps/unix/sysv/linux/riscv/init-first.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/sysdeps/unix/sysv/linux/riscv/init-first.c b/sysdeps/unix/sysv/linux/riscv/init-first.c > > index 155a4a2c0c..fa9c690cdd 100644 > > --- a/sysdeps/unix/sysv/linux/riscv/init-first.c > > +++ b/sysdeps/unix/sysv/linux/riscv/init-first.c > > @@ -43,11 +43,11 @@ _libc_vdso_platform_setup (void) > > PTR_MANGLE (p); > > VDSO_SYMBOL (gettimeofday) = p; > > > > - p = _dl_vdso_vsym ("__vdso_clock_gettime", &linux_version); > > + p = _dl_vdso_vsym ("__vdso_clock_gettime64", &linux_version); > > PTR_MANGLE (p); > > VDSO_SYMBOL (clock_gettime) = p; > > > > - p = _dl_vdso_vsym ("__vdso_clock_getres", &linux_version); > > + p = _dl_vdso_vsym ("__vdso_clock_getres_time64", &linux_version); > > PTR_MANGLE (p); > > VDSO_SYMBOL (clock_getres) = p; > > } > > I believe this will lose vDSO acceleration for RV64 on older kernels > which do not define __vdso_clock_getres_time64. Also newer kernels, as 64-bit kernels only have __vdso_clock_getres, not __vdso_clock_getres_time64. Arnd
On Wed, Jul 17, 2019 at 1:02 AM Arnd Bergmann <arnd@arndb.de> wrote: > > On Wed, Jul 17, 2019 at 7:33 AM Florian Weimer <fweimer@redhat.com> wrote: > > > > * Alistair Francis: > > > > > Signed-off-by: Alistair Francis <alistair.francis@wdc.com> > > > --- > > > sysdeps/unix/sysv/linux/riscv/init-first.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/sysdeps/unix/sysv/linux/riscv/init-first.c b/sysdeps/unix/sysv/linux/riscv/init-first.c > > > index 155a4a2c0c..fa9c690cdd 100644 > > > --- a/sysdeps/unix/sysv/linux/riscv/init-first.c > > > +++ b/sysdeps/unix/sysv/linux/riscv/init-first.c > > > @@ -43,11 +43,11 @@ _libc_vdso_platform_setup (void) > > > PTR_MANGLE (p); > > > VDSO_SYMBOL (gettimeofday) = p; > > > > > > - p = _dl_vdso_vsym ("__vdso_clock_gettime", &linux_version); > > > + p = _dl_vdso_vsym ("__vdso_clock_gettime64", &linux_version); > > > PTR_MANGLE (p); > > > VDSO_SYMBOL (clock_gettime) = p; > > > > > > - p = _dl_vdso_vsym ("__vdso_clock_getres", &linux_version); > > > + p = _dl_vdso_vsym ("__vdso_clock_getres_time64", &linux_version); > > > PTR_MANGLE (p); > > > VDSO_SYMBOL (clock_getres) = p; > > > } > > > > I believe this will lose vDSO acceleration for RV64 on older kernels > > which do not define __vdso_clock_getres_time64. > > Also newer kernels, as 64-bit kernels only have __vdso_clock_getres, > not __vdso_clock_getres_time64. Ok, I can #ifdef this based on word size. Alistair > > Arnd
On Wed, Jul 17, 2019 at 3:23 PM Alistair Francis <alistair23@gmail.com> wrote: > > On Wed, Jul 17, 2019 at 1:02 AM Arnd Bergmann <arnd@arndb.de> wrote: > > > > On Wed, Jul 17, 2019 at 7:33 AM Florian Weimer <fweimer@redhat.com> wrote: > > > > > > * Alistair Francis: > > > > > > > Signed-off-by: Alistair Francis <alistair.francis@wdc.com> > > > > --- > > > > sysdeps/unix/sysv/linux/riscv/init-first.c | 4 ++-- > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > diff --git a/sysdeps/unix/sysv/linux/riscv/init-first.c b/sysdeps/unix/sysv/linux/riscv/init-first.c > > > > index 155a4a2c0c..fa9c690cdd 100644 > > > > --- a/sysdeps/unix/sysv/linux/riscv/init-first.c > > > > +++ b/sysdeps/unix/sysv/linux/riscv/init-first.c > > > > @@ -43,11 +43,11 @@ _libc_vdso_platform_setup (void) > > > > PTR_MANGLE (p); > > > > VDSO_SYMBOL (gettimeofday) = p; > > > > > > > > - p = _dl_vdso_vsym ("__vdso_clock_gettime", &linux_version); > > > > + p = _dl_vdso_vsym ("__vdso_clock_gettime64", &linux_version); > > > > PTR_MANGLE (p); > > > > VDSO_SYMBOL (clock_gettime) = p; > > > > > > > > - p = _dl_vdso_vsym ("__vdso_clock_getres", &linux_version); > > > > + p = _dl_vdso_vsym ("__vdso_clock_getres_time64", &linux_version); > > > > PTR_MANGLE (p); > > > > VDSO_SYMBOL (clock_getres) = p; > > > > } > > > > > > I believe this will lose vDSO acceleration for RV64 on older kernels > > > which do not define __vdso_clock_getres_time64. > > > > Also newer kernels, as 64-bit kernels only have __vdso_clock_getres, > > not __vdso_clock_getres_time64. Just to confirm (based on this thread and "RISC-V: Use 64-bit timespec in clock_gettime vdso calls"): - change the clock_gettime64 vdso symbol to __clock_gettime64 for RV32 to match the kernel - Remove clock_gettime, clock_getres and gettimeofday vdso calls for RV32 Alistair > > Ok, I can #ifdef this based on word size. > > Alistair > > > > > Arnd
On Wed, Jul 17, 2019 at 4:42 PM Alistair Francis <alistair23@gmail.com> wrote: > > On Wed, Jul 17, 2019 at 3:23 PM Alistair Francis <alistair23@gmail.com> wrote: > > > > On Wed, Jul 17, 2019 at 1:02 AM Arnd Bergmann <arnd@arndb.de> wrote: > > > > > > On Wed, Jul 17, 2019 at 7:33 AM Florian Weimer <fweimer@redhat.com> wrote: > > > > > > > > * Alistair Francis: > > > > > > > > > Signed-off-by: Alistair Francis <alistair.francis@wdc.com> > > > > > --- > > > > > sysdeps/unix/sysv/linux/riscv/init-first.c | 4 ++-- > > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > > > diff --git a/sysdeps/unix/sysv/linux/riscv/init-first.c b/sysdeps/unix/sysv/linux/riscv/init-first.c > > > > > index 155a4a2c0c..fa9c690cdd 100644 > > > > > --- a/sysdeps/unix/sysv/linux/riscv/init-first.c > > > > > +++ b/sysdeps/unix/sysv/linux/riscv/init-first.c > > > > > @@ -43,11 +43,11 @@ _libc_vdso_platform_setup (void) > > > > > PTR_MANGLE (p); > > > > > VDSO_SYMBOL (gettimeofday) = p; > > > > > > > > > > - p = _dl_vdso_vsym ("__vdso_clock_gettime", &linux_version); > > > > > + p = _dl_vdso_vsym ("__vdso_clock_gettime64", &linux_version); > > > > > PTR_MANGLE (p); > > > > > VDSO_SYMBOL (clock_gettime) = p; > > > > > > > > > > - p = _dl_vdso_vsym ("__vdso_clock_getres", &linux_version); > > > > > + p = _dl_vdso_vsym ("__vdso_clock_getres_time64", &linux_version); > > > > > PTR_MANGLE (p); > > > > > VDSO_SYMBOL (clock_getres) = p; > > > > > } > > > > > > > > I believe this will lose vDSO acceleration for RV64 on older kernels > > > > which do not define __vdso_clock_getres_time64. > > > > > > Also newer kernels, as 64-bit kernels only have __vdso_clock_getres, > > > not __vdso_clock_getres_time64. > > Just to confirm (based on this thread and "RISC-V: Use 64-bit timespec > in clock_gettime vdso calls"): > - change the clock_gettime64 vdso symbol to __clock_gettime64 for > RV32 to match the kernel Wait this breaks all of the callers of INTERNAL_VSYSCALL() as the syscall is just __NR_clock_gettime64 not __NR___clock_gettime64. Alistair > - Remove clock_gettime, clock_getres and gettimeofday vdso calls for RV32 > > Alistair > > > > > Ok, I can #ifdef this based on word size. > > > > Alistair > > > > > > > > Arnd
diff --git a/sysdeps/unix/sysv/linux/riscv/init-first.c b/sysdeps/unix/sysv/linux/riscv/init-first.c index 155a4a2c0c..fa9c690cdd 100644 --- a/sysdeps/unix/sysv/linux/riscv/init-first.c +++ b/sysdeps/unix/sysv/linux/riscv/init-first.c @@ -43,11 +43,11 @@ _libc_vdso_platform_setup (void) PTR_MANGLE (p); VDSO_SYMBOL (gettimeofday) = p; - p = _dl_vdso_vsym ("__vdso_clock_gettime", &linux_version); + p = _dl_vdso_vsym ("__vdso_clock_gettime64", &linux_version); PTR_MANGLE (p); VDSO_SYMBOL (clock_gettime) = p; - p = _dl_vdso_vsym ("__vdso_clock_getres", &linux_version); + p = _dl_vdso_vsym ("__vdso_clock_getres_time64", &linux_version); PTR_MANGLE (p); VDSO_SYMBOL (clock_getres) = p; }