Re: TSC instead of ACPI: powerd doesn't work anymore (to be expected?)
From: Peter Jeremy (PeterJeremy_at_optushome.com.au)
Date: 10/31/05
- Previous message: Jung-uk Kim: "Re: Re[4]: [PATCH] ACPICA 20051021 import"
- In reply to: Poul-Henning Kamp: "Re: TSC instead of ACPI: powerd doesn't work anymore (to be expected?)"
- Next in thread: Robert Watson: "Re: TSC instead of ACPI: powerd doesn't work anymore (to be expected?)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 1 Nov 2005 05:00:37 +1100 To: Poul-Henning Kamp <phk@phk.freebsd.dk>
On Mon, 2005-Oct-31 11:26:38 +0100, Poul-Henning Kamp wrote:
>In message <4365EF7B.1020706@freebsd.org>, David Xu writes:
>>We can introduce
>>hrtime_t clock_gethrtime(clockid_t clock) to get hi-resolution time
>>as the one seen in RTLinux, or gethrtime() as seen in Solaris (Daniel
>>Eischen said?)
...
>The open group specifically allow clock_gettime() to implement
>more timescales, so what did those fools go and invent even more
>library functions for ?
gethrtime() dates back to SunOS 4.x and (AFAIK) predates TOG's work.
ISTR it's not really a syscall but just reads the HR clock out of
the magic page with the timer.
I'd also support a move to make gettimeofday() a cheaper syscall
that counts in 1/hz and require the use of clock_gettime() for
accurate timestamps.
This still leaves the issue of the scheduler - do we need an accurate
(and expensive) record of how long a particular process executes? We
can probably make the timestamps slightly cheaper to obtain since we
only need to keep track of a time difference on a single CPU - there's
no need for inter-CPU synchronisation (because a thread can't migrate
from from CPU to CPU without the scheduler knowing). It probably
doesn't even matter if the time intervals provided to the scheduler
are inaccurate by a few percent or differ slightly between CPUs.
-- Peter Jeremy _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
- Previous message: Jung-uk Kim: "Re: Re[4]: [PATCH] ACPICA 20051021 import"
- In reply to: Poul-Henning Kamp: "Re: TSC instead of ACPI: powerd doesn't work anymore (to be expected?)"
- Next in thread: Robert Watson: "Re: TSC instead of ACPI: powerd doesn't work anymore (to be expected?)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|