Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Nov 2000 05:56:17 -0800
From:      Mike Smith <msmith@freebsd.org>
To:        Daniel Eischen <eischen@vigrid.com>
Cc:        Mark Murray <mark@grondar.za>, arch@FreeBSD.ORG
Subject:   Re: "Monotonic" counter/register call - commit candidate. 
Message-ID:  <200011181356.eAIDuHF04876@mass.osd.bsdi.com>
In-Reply-To: Your message of "Sat, 18 Nov 2000 08:22:44 EST." <Pine.SUN.3.91.1001118081414.28330A-100000@pcnet1.pcnet.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > I considered renaming the function to marks(9), as I kinda liked
> > that name, but on reflection, it seems way too arrogant, so
> > Mike Smith's "get_jiffiecounter" won.
> 
> I really hate "jiffie" and would prefer using just get_cyclecount
> or even better get_counter. 

"get_counter" is hopelessly vague.  get_cyclecount would be OK too.  I 
don't care.  Pick a name and stop bloody arguing about it.

> It would also be nice to know what
> resolution the counter was, perhaps get_counter_res().  Do we
> want an ID associated with the counter if there is more than
> one available on the hardware?

Stop trying to make it into a timecounter.  If you want a timecounter, 
use a timecounter.  We have perfectly good timecounters already.  This is 
not and never will be a facility any good for computing time.  The value 
may wrap unexpectedly, go backwards, proceed forwards erratically, etc.

> On a somewhat related note, I could use something to measure time
> that wasn't a system call in the threads library.  Is there a way
> we can get a timer or something that was mmap'able?

You could probably arrange for some portion of the timecounter space to 
be mapped read-only into userspace.  How precise does it need to be?

-- 
... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also.  But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view.  [Dr. Fritz Todt]
           V I C T O R Y   N O T   V E N G E A N C E




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011181356.eAIDuHF04876>