Re: timecounting: use full 96-bit product when computing high-res time

2022-04-29 Thread Scott Cheloha
On Thu, Oct 14, 2021 at 04:13:18PM -0500, Scott Cheloha wrote: > > [...] > > When we compute high resolution time, both in the kernel and in libc, > we get a 32-bit (or smaller) value from the active timecounter and > scale it up into a 128-bit bintime. > > The scaling math currently looks like

Re: timecounting: use full 96-bit product when computing high-res time

2021-10-14 Thread Scott Cheloha
> On Oct 14, 2021, at 18:09, Scott Cheloha wrote: > > On Thu, Oct 14, 2021 at 11:37:44PM +0200, Mark Kettenis wrote: >>> Date: Thu, 14 Oct 2021 16:13:17 -0500 >>> From: Scott Cheloha >>> >>> [...] >>> >>> Thoughts? >> >> I never understood this code. But I don't understand that if our >>

Re: timecounting: use full 96-bit product when computing high-res time

2021-10-14 Thread Scott Cheloha
On Thu, Oct 14, 2021 at 11:37:44PM +0200, Mark Kettenis wrote: > > Date: Thu, 14 Oct 2021 16:13:17 -0500 > > From: Scott Cheloha > > > > [...] > > > > Thoughts? > > I never understood this code. But I don't understand that if our > timecounters are only 32 bits, we need more than 64 bits to

Re: timecounting: use full 96-bit product when computing high-res time

2021-10-14 Thread Mark Kettenis
> Date: Thu, 14 Oct 2021 16:13:17 -0500 > From: Scott Cheloha > > Hi, > > When we compute high resolution time, both in the kernel and in libc, > we get a 32-bit (or smaller) value from the active timecounter and > scale it up into a 128-bit bintime. > > The scaling math currently looks like

timecounting: use full 96-bit product when computing high-res time

2021-10-14 Thread Scott Cheloha
Hi, When we compute high resolution time, both in the kernel and in libc, we get a 32-bit (or smaller) value from the active timecounter and scale it up into a 128-bit bintime. The scaling math currently looks like this in the kernel: *bt = th->th_offset; bintimeaddfrac(bt,