public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/3] GLIBC LOONGARCH PATCHES
@ 2022-07-28  7:30 caiyinyu
  2022-07-28  7:30 ` [PATCH 1/3] LoongArch: Add vdso support for gettimeofday caiyinyu
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: caiyinyu @ 2022-07-28  7:30 UTC (permalink / raw)
  To: adhemerval.zanella, libc-alpha, i.swmail
  Cc: joseph_myers, carlos, xuchenghua, caiyinyu

Hi:

Considering binutils[1] (2eb132bdfb915) is ready I added vdso support for gettimeofday
back.

These patches are tested with gcc 12.0.1, Linux-5.19 [2].

I also tested vdso after I corrected the macros VDSO_NAME/VDSO_HASH, and the results[3]
are not good compared with Wang xuerui's tests[4].

BTW, there are little difference whether the macros VDSO_NAME/VDSO_HASH
are LINUX_5.10/182947696 or not.

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=shortlog;h=refs/heads/master

[2] Glibc test results:
XPASS: conform/UNIX98/ndbm.h/linknamespace
XPASS: conform/XOPEN2K/ndbm.h/linknamespace
XPASS: conform/XOPEN2K8/ndbm.h/linknamespace
XPASS: conform/XPG42/ndbm.h/linknamespace
UNSUPPORTED: crypt/cert
UNSUPPORTED: elf/tst-env-setuid
UNSUPPORTED: elf/tst-env-setuid-tunables
XPASS: elf/tst-protected1a
XPASS: elf/tst-protected1b
UNSUPPORTED: elf/tst-valgrind-smoke
UNSUPPORTED: misc/tst-adjtimex
UNSUPPORTED: misc/tst-clock_adjtime
UNSUPPORTED: misc/tst-ntp_adjtime
UNSUPPORTED: misc/tst-pkey
UNSUPPORTED: misc/tst-rseq
UNSUPPORTED: misc/tst-rseq-disable
UNSUPPORTED: nptl/test-cond-printers
UNSUPPORTED: nptl/test-condattr-printers
UNSUPPORTED: nptl/test-mutex-printers
UNSUPPORTED: nptl/test-mutexattr-printers
UNSUPPORTED: nptl/test-rwlock-printers
UNSUPPORTED: nptl/test-rwlockattr-printers
UNSUPPORTED: nptl/tst-rseq-nptl
UNSUPPORTED: stdlib/tst-secure-getenv
UNSUPPORTED: time/tst-clock_settime
UNSUPPORTED: time/tst-settimeofday
Summary of test results:
   4579 PASS
     20 UNSUPPORTED
     12 XFAIL
      6 XPASS

[3] vdsotest-bench ( VDSO_NAME/VDSO_HASH -- LINUX_5.10/182947696 ):
clock-gettime-monotonic: syscall: 228 nsec/call
clock-gettime-monotonic:    libc: 243 nsec/call
clock-gettime-monotonic:    vdso: 239 nsec/call
clock-getres-monotonic: syscall: 196 nsec/call
clock-getres-monotonic:    libc: 8 nsec/call
clock-getres-monotonic:    vdso: 5 nsec/call
clock-gettime-monotonic-coarse: syscall: 218 nsec/call
clock-gettime-monotonic-coarse:    libc: 25 nsec/call
clock-gettime-monotonic-coarse:    vdso: 24 nsec/call
clock-getres-monotonic-coarse: syscall: 198 nsec/call
clock-getres-monotonic-coarse:    libc: 8 nsec/call
clock-getres-monotonic-coarse:    vdso: 4 nsec/call
clock-gettime-monotonic-raw: syscall: 228 nsec/call
clock-gettime-monotonic-raw:    libc: 243 nsec/call
clock-gettime-monotonic-raw:    vdso: 240 nsec/call
clock-getres-monotonic-raw: syscall: 197 nsec/call
clock-getres-monotonic-raw:    libc: 8 nsec/call
clock-getres-monotonic-raw:    vdso: 4 nsec/call
clock-gettime-tai: syscall: 231 nsec/call
clock-gettime-tai:    libc: 246 nsec/call
clock-gettime-tai:    vdso: 242 nsec/call
clock-getres-tai: syscall: 197 nsec/call
clock-getres-tai:    libc: 8 nsec/call
clock-getres-tai:    vdso: 4 nsec/call
clock-gettime-boottime: syscall: 229 nsec/call
clock-gettime-boottime:    libc: 243 nsec/call
clock-gettime-boottime:    vdso: 240 nsec/call
clock-getres-boottime: syscall: 196 nsec/call
clock-getres-boottime:    libc: 8 nsec/call
clock-getres-boottime:    vdso: 4 nsec/call
clock-gettime-realtime: syscall: 228 nsec/call
clock-gettime-realtime:    libc: 242 nsec/call
clock-gettime-realtime:    vdso: 239 nsec/call
clock-getres-realtime: syscall: 197 nsec/call
clock-getres-realtime:    libc: 8 nsec/call
clock-getres-realtime:    vdso: 5 nsec/call
clock-gettime-realtime-coarse: syscall: 227 nsec/call
clock-gettime-realtime-coarse:    libc: 25 nsec/call
clock-gettime-realtime-coarse:    vdso: 24 nsec/call
clock-getres-realtime-coarse: syscall: 198 nsec/call
clock-getres-realtime-coarse:    libc: 7 nsec/call
clock-getres-realtime-coarse:    vdso: 4 nsec/call
getcpu: syscall: 178 nsec/call
getcpu:    libc: 179 nsec/call
getcpu:    vdso: not tested
Note: vDSO version of getcpu not found
gettimeofday: syscall: 215 nsec/call
gettimeofday:    libc: 226 nsec/call
gettimeofday:    vdso: 226 nsec/call

[4] Wang xuerui's vdsotest results:
clock-gettime-monotonic: syscall: 183 nsec/call
clock-gettime-monotonic:    libc: 44 nsec/call
clock-gettime-monotonic:    vdso: 34 nsec/call
clock-getres-monotonic: syscall: 152 nsec/call
clock-getres-monotonic:    libc: 19 nsec/call
clock-getres-monotonic:    vdso: 14 nsec/call
clock-gettime-monotonic-coarse: syscall: 172 nsec/call
clock-gettime-monotonic-coarse:    libc: 39 nsec/call
clock-gettime-monotonic-coarse:    vdso: 29 nsec/call
clock-getres-monotonic-coarse: syscall: 154 nsec/call
clock-getres-monotonic-coarse:    libc: 18 nsec/call
clock-getres-monotonic-coarse:    vdso: 14 nsec/call
clock-gettime-monotonic-raw: syscall: 181 nsec/call
clock-gettime-monotonic-raw:    libc: 45 nsec/call
clock-gettime-monotonic-raw:    vdso: 36 nsec/call
clock-getres-monotonic-raw: syscall: 151 nsec/call
clock-getres-monotonic-raw:    libc: 19 nsec/call
clock-getres-monotonic-raw:    vdso: 14 nsec/call
clock-gettime-tai: syscall: 187 nsec/call
clock-gettime-tai:    libc: 44 nsec/call
clock-gettime-tai:    vdso: 34 nsec/call
clock-getres-tai: syscall: 151 nsec/call
clock-getres-tai:    libc: 19 nsec/call
clock-getres-tai:    vdso: 14 nsec/call
clock-gettime-boottime: syscall: 184 nsec/call
clock-gettime-boottime:    libc: 44 nsec/call
clock-gettime-boottime:    vdso: 34 nsec/call
clock-getres-boottime: syscall: 151 nsec/call
clock-getres-boottime:    libc: 19 nsec/call
clock-getres-boottime:    vdso: 14 nsec/call
clock-gettime-realtime: syscall: 181 nsec/call
clock-gettime-realtime:    libc: 44 nsec/call
clock-gettime-realtime:    vdso: 34 nsec/call
clock-getres-realtime: syscall: 151 nsec/call
clock-getres-realtime:    libc: 19 nsec/call
clock-getres-realtime:    vdso: 14 nsec/call
clock-gettime-realtime-coarse: syscall: 179 nsec/call
clock-gettime-realtime-coarse:    libc: 40 nsec/call
clock-gettime-realtime-coarse:    vdso: 29 nsec/call
clock-getres-realtime-coarse: syscall: 154 nsec/call
clock-getres-realtime-coarse:    libc: 18 nsec/call
clock-getres-realtime-coarse:    vdso: 14 nsec/call
getcpu: syscall: 134 nsec/call
getcpu:    libc: 20 nsec/call
getcpu:    vdso: 13 nsec/call
gettimeofday: syscall: 171 nsec/call
gettimeofday:    libc: 47 nsec/call
gettimeofday:    vdso: 33 nsec/call


caiyinyu (3):
  LoongArch: Add vdso support for gettimeofday.
  LoongArch: Fix VDSO_HASH and VDSO_NAME.
  LoongArch: Add greg_t and gregset_t.

 .../unix/sysv/linux/loongarch/gettimeofday.c  | 22 +++++++++++++++++++
 .../unix/sysv/linux/loongarch/sys/ucontext.h  |  3 +++
 sysdeps/unix/sysv/linux/loongarch/sysdep.h    |  5 +++--
 3 files changed, 28 insertions(+), 2 deletions(-)
 create mode 100644 sysdeps/unix/sysv/linux/loongarch/gettimeofday.c

-- 
2.31.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-08-03  3:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-28  7:30 [PATCH 0/3] GLIBC LOONGARCH PATCHES caiyinyu
2022-07-28  7:30 ` [PATCH 1/3] LoongArch: Add vdso support for gettimeofday caiyinyu
2022-07-28 12:58   ` Adhemerval Zanella Netto
2022-07-29 15:10     ` Carlos O'Donell
2022-08-03  3:12       ` caiyinyu
2022-07-28  7:30 ` [PATCH 2/3] LoongArch: Fix VDSO_HASH and VDSO_NAME caiyinyu
2022-07-28 12:57   ` Adhemerval Zanella Netto
2022-07-28  7:30 ` [PATCH 3/3] LoongArch: Add greg_t and gregset_t caiyinyu
2022-07-28 12:57   ` Adhemerval Zanella Netto
2022-07-28 12:53 ` [PATCH 0/3] GLIBC LOONGARCH PATCHES Adhemerval Zanella Netto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).