Project

General

Profile

Bug #4245

boot_time kstat for zones should be epoch timestamp of zone boot, not "random" number

Added by Robert Mustacchi about 7 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
kernel
Start date:
2013-10-20
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

From the Joyent bug report:

Currently the zone_boot_time is calculated by:

hrt2tv(curproc->p_zone->zone_zsched->p_mstart, &tvp);
zone_boot_time = tvp.tv_sec;

and p_mstart is:

p_mstart = gethrtime()

and gethrtime is defined such that we really shouldn't be expecting it to be useful here:

     The gethrtime() function returns the current high-resolution real
     time.  Time is expressed as nanoseconds since some arbitrary time
     in the past; it is not correlated in any way to the time of day,
     and thus is not subject to resetting or drifting by way of adj-
     time(2) or settimeofday(3C). The hi-res timer is ideally suited
     to performance measurement tasks, where cheap, accurate interval
     timing is required.

It would be much more useful if boot_time for a zone was set to the epoch timestamp of the zsched process's start time.

--

The kstat within the zone is now using the same units as in the GZ

#1

Updated by Robert Mustacchi about 7 years ago

  • Status changed from New to Resolved
  • % Done changed from 90 to 100

Resolved in 86ad481cc8bfbc0155ef221a0fe07ef23db58f68.

Also available in: Atom PDF