pc386 configure/nanoseconds Re: Any Issues Preventng 4.9.1

Joel Sherrill joel.sherrill at OARcorp.com
Mon Dec 1 23:26:41 UTC 2008


Michael South wrote:
> Typographical correction to the patches. It's the _8254_ (timer), not
> the _8259_ (PIC).
>
>   
I have filed a PR to track this patch and am evaluating it
on the CVS head.

One issue I noticed is that by default, no nanosecond method
is selected.  I added logic so every BSP variant defaults to
one of the methods but I do not like that you probably have
to specify one on and one off to reliably pick a mechanism this
way.

I have included my current version of this part of the patch
but I really don't know the best way to solve this configure
issue.

The code modifications themselves seem safe enough.  My ideal
solution would involve dynamic selection of the default mechanism
as the timer driver uses.

Ralf.. any suggestions?



--joel


>> OK, I've got it done. Instead of using HPET chips (I don't have ready
>> access to such a motherboard), I used the TSC register available on
>> Pentium-class CPUs. There are some pluses and minuses to that; high
>> precision, _if_ the BIOS doesn't alter the clock frequency for thermal
>> or power saving reasons.
>>
>> Anyway, it's all attached for your perusal.
>>
>> Summary of results:
>> Six varieties of code tested:
>>
>> 1) Unmodified ckinit.c
>>
>> 2) Un-modified ckinit.c, configured with
>> USE_TICKS_FOR_CPU_USAGE_STATISTICS=1
>>
>> 3) Just commented out I/O
>>
>> 4) Re-worked ckinit.c, with new switch CLOCK_DRIVER_USE_TSC = 1.
>>    It uses the TSC register on Pentium-class processors.
>>
>> 5) Re-worked ckinit.c, with new switch CLOCK_DRIVER_USE_8529 = 1.
>>    Equivalent to unmodified ckinit.c.
>>
>> 6) Re-worked ckinit.c, with neither ..._USE_TSC nor ..._USE_8529
>>    defined. Equivalent to (3).
>>
>> Test box is a 500 MHz AMD K6-2.
>>
>>
>>       Context switches       nSec per switch
>>       per tick (1 KHz)
>>
>> (1)         153                    6,525
>> (2)       1,582                      632
>> (3)       1,025                      976
>> (4)         939                    1,065
>> (5)         153                    6,524
>> (6)       1,117                      895
>>
>>     
>
> ---
> Michael South
> msouth at msouth.org
>   


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985


-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.diff
Type: text/x-patch
Size: 2197 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20081201/b955b761/attachment.bin>


More information about the users mailing list