NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Qemu/nvmm - time in NetBSD guest system lags behind (with estd on host)



paul%whooppee.com@localhost (Paul Goyette) writes:

>You would have to modify the appropriate module's Makefile to add
>the HZ=1000 definition.

ZFS doesn't use HZ, but in osnet/sys/sys/time.h it uses a value hz=100
to compute the lbolt time.

Does this help ?

Index: external/cddl/osnet/sys/sys/time.h
===================================================================
RCS file: /cvsroot/src/external/cddl/osnet/sys/sys/time.h,v
retrieving revision 1.13
diff -p -u -r1.13 time.h
--- external/cddl/osnet/sys/sys/time.h  29 Aug 2021 08:43:12 -0000      1.13
+++ external/cddl/osnet/sys/sys/time.h  5 Sep 2022 05:28:33 -0000
@@ -82,7 +82,7 @@ static inline int64_t
 ddi_get_lbolt64(void)
 {
        struct timespec ts;
-       const int hz = 100;
+       extern int hz;
 
        getnanouptime(&ts);
        return (int64_t)(SEC_TO_TICK(ts.tv_sec) + NSEC_TO_TICK(ts.tv_nsec));



Home | Main Index | Thread Index | Old Index