git: libc - Add kpmap shortcut for gettimeofday()

Matthew Dillon dillon at crater.dragonflybsd.org
Fri Oct 26 18:40:33 PDT 2018


commit b227f3f50d5dc0f5fdecd8f9df23e96e8521baaf
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Fri Oct 26 18:08:35 2018 -0700

    libc - Add kpmap shortcut for gettimeofday()
    
    * If the kern.gettimeofday_quick sysctl is set to 1, libc's
      gettimeofday() will use the tick-granular realtime in
      the kpmap instead of making a system call.  The sysctl
      defaults to 0 (off).
    
    * Useful in situations where gettimeofday() interferes with
      benchmarks, but otherwise not recommended.
    
    * Running programs react instantly to changes in this sysctl.

Summary of changes:
 lib/libc/upmap/Makefile.inc                        |  2 +-
 lib/libc/upmap/{ukp_clock.c => ukp_gettimeofday.c} | 78 ++++++++++------------
 share/man/man4/upmap.4                             |  6 ++
 share/man/man7/tuning.7                            |  7 ++
 sys/kern/init_main.c                               |  2 +
 sys/kern/kern_time.c                               | 24 ++++++-
 sys/sys/upmap.h                                    |  2 +
 7 files changed, 77 insertions(+), 44 deletions(-)
 copy lib/libc/upmap/{ukp_clock.c => ukp_gettimeofday.c} (66%)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b227f3f50d5dc0f5fdecd8f9df23e96e8521baaf


-- 
DragonFly BSD source repository


More information about the Commits mailing list