Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jun 2018 10:23:46 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 228669] CLOCK_PROCESS_CPUTIME_ID is unnecessarily inaccurate
Message-ID:  <bug-228669-227-sR3cqoSUXY@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-228669-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-228669-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D228669

--- Comment #6 from commit-hook@freebsd.org ---
A commit references this bug:

Author: cperciva
Date: Fri Jun 22 10:23:32 UTC 2018
New revision: 335553
URL: https://svnweb.freebsd.org/changeset/base/335553

Log:
  Improve the accuracy of the POSIX "process CPU-time" clocks by adding the
  used portion of the current thread's time slice if the current thread
  belongs to the process being queried (i.e., if clock_gettime is invoked
  with a clock ID of CLOCK_PROCESS_CPUTIME_ID or the value provided by
  passing getpid(2) to clock_getcpuclockid(3)).

  The CLOCK_VIRTUAL and CLOCK_PROF timers already make this adjustment via
  long-standing code in calcru(), but since those timers are not specified
  by POSIX it seems useful to add it here so that the higher accuracy is
  available to code which aims to be portable.

  PR:           228669
  Reported by:  Graham Percival
  Reviewed by:  kib
  MFC after:    1 week

Changes:
  head/sys/kern/kern_time.c

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-228669-227-sR3cqoSUXY>