[RTEMS Project] #2554: New watchdog handler implementation

RTEMS trac trac at rtems.org
Wed Mar 2 09:26:20 UTC 2016


#2554: New watchdog handler implementation
-----------------------------+------------------------------
 Reporter:  sebastian.huber  |       Owner:  sebastian.huber
     Type:  enhancement      |      Status:  accepted
 Priority:  normal           |   Milestone:  4.12
Component:  cpukit           |     Version:  4.12
 Severity:  normal           |  Resolution:
 Keywords:                   |
-----------------------------+------------------------------

Comment (by sebastian.huber):

 Profiling data (reduced to show only relevant information) of
 `smpwakeafter01` executed on a T4240 using 24 processors and the new red-
 black tree based implementation.

 {{{
 #!xml
 <ProfilingReport name="SMPWAKEAFTER 1">
   <PerCPUProfilingReport processorIndex="0">
     <MaxThreadDispatchDisabledTime
 unit="ns">85615</MaxThreadDispatchDisabledTime>
     <MeanThreadDispatchDisabledTime
 unit="ns">15508</MeanThreadDispatchDisabledTime>
     <TotalThreadDispatchDisabledTime
 unit="ns">563813241</TotalThreadDispatchDisabledTime>
     <ThreadDispatchDisabledCount>36355</ThreadDispatchDisabledCount>
     <MaxInterruptDelay unit="ns">0</MaxInterruptDelay>
     <MaxInterruptTime unit="ns">4771</MaxInterruptTime>
     <MeanInterruptTime unit="ns">482</MeanInterruptTime>
     <TotalInterruptTime unit="ns">11144389</TotalInterruptTime>
     <InterruptCount>23082</InterruptCount>
   </PerCPUProfilingReport>
   <PerCPUProfilingReport processorIndex="1">
     <MaxThreadDispatchDisabledTime
 unit="ns">53595</MaxThreadDispatchDisabledTime>
     <MeanThreadDispatchDisabledTime
 unit="ns">14437</MeanThreadDispatchDisabledTime>
     <TotalThreadDispatchDisabledTime
 unit="ns">493386525</TotalThreadDispatchDisabledTime>
     <ThreadDispatchDisabledCount>34175</ThreadDispatchDisabledCount>
     <MaxInterruptDelay unit="ns">0</MaxInterruptDelay>
     <MaxInterruptTime unit="ns">3094</MaxInterruptTime>
     <MeanInterruptTime unit="ns">844</MeanInterruptTime>
     <TotalInterruptTime unit="ns">8783271</TotalInterruptTime>
     <InterruptCount>10398</InterruptCount>
   </PerCPUProfilingReport>
   <PerCPUProfilingReport processorIndex="2">
     <MaxThreadDispatchDisabledTime
 unit="ns">87633</MaxThreadDispatchDisabledTime>
     <MeanThreadDispatchDisabledTime
 unit="ns">15055</MeanThreadDispatchDisabledTime>
     <TotalThreadDispatchDisabledTime
 unit="ns">561768649</TotalThreadDispatchDisabledTime>
     <ThreadDispatchDisabledCount>37314</ThreadDispatchDisabledCount>
     <MaxInterruptDelay unit="ns">0</MaxInterruptDelay>
     <MaxInterruptTime unit="ns">4884</MaxInterruptTime>
     <MeanInterruptTime unit="ns">447</MeanInterruptTime>
     <TotalInterruptTime unit="ns">10309678</TotalInterruptTime>
     <InterruptCount>23056</InterruptCount>
   </PerCPUProfilingReport>
   <SMPLockProfilingReport name="Giant">
     <MaxAcquireTime unit="ns">1924</MaxAcquireTime>
     <MaxSectionTime unit="ns">89496</MaxSectionTime>
     <MeanAcquireTime unit="ns">116</MeanAcquireTime>
     <MeanSectionTime unit="ns">4644</MeanSectionTime>
     <TotalAcquireTime unit="ns">119374</TotalAcquireTime>
     <TotalSectionTime unit="ns">4751695</TotalSectionTime>
     <UsageCount>1023</UsageCount>
     <ContentionCount initialQueueLength="0">1023</ContentionCount>
     <ContentionCount initialQueueLength="1">0</ContentionCount>
     <ContentionCount initialQueueLength="2">0</ContentionCount>
     <ContentionCount initialQueueLength="3">0</ContentionCount>
   </SMPLockProfilingReport>
   <SMPLockProfilingReport name="Scheduler">
     <MaxAcquireTime unit="ns">54115</MaxAcquireTime>
     <MaxSectionTime unit="ns">9609</MaxSectionTime>
     <MeanAcquireTime unit="ns">1154</MeanAcquireTime>
     <MeanSectionTime unit="ns">881</MeanSectionTime>
     <TotalAcquireTime unit="ns">1357899955</TotalAcquireTime>
     <TotalSectionTime unit="ns">1035917001</TotalSectionTime>
     <UsageCount>1175742</UsageCount>
     <ContentionCount initialQueueLength="0">16188</ContentionCount>
     <ContentionCount initialQueueLength="1">14403</ContentionCount>
     <ContentionCount initialQueueLength="2">14350</ContentionCount>
     <ContentionCount initialQueueLength="3">1130801</ContentionCount>
   </SMPLockProfilingReport>
   <SMPLockProfilingReport name="Watchdog">
     <MaxAcquireTime unit="ns">686</MaxAcquireTime>
     <MaxSectionTime unit="ns">2220</MaxSectionTime>
     <MeanAcquireTime unit="ns">61</MeanAcquireTime>
     <MeanSectionTime unit="ns">78</MeanSectionTime>
     <TotalAcquireTime unit="ns">4271819</TotalAcquireTime>
     <TotalSectionTime unit="ns">5394270</TotalSectionTime>
     <UsageCount>68964</UsageCount>
     <ContentionCount initialQueueLength="0">68964</ContentionCount>
     <ContentionCount initialQueueLength="1">0</ContentionCount>
     <ContentionCount initialQueueLength="2">0</ContentionCount>
     <ContentionCount initialQueueLength="3">0</ContentionCount>
   </SMPLockProfilingReport>
 </ProfilingReport>
 }}}

 The maximum thread dispatch disabled time drops from 3ms to about 100us.
 There is now one watchdog header per-CPU. Profiling data is only shown for
 one of the watchdog locks. No contention is visible here. The new bottle
 neck is the scheduler lock, but this is a different issue. In addition the
 interrupt count on scheduler A is about two times the clock tick interrupt
 count. This means that each clock tick service results in an inter-
 processor interrupt. This highlights one of the known problems of a global
 priority based scheduler: massive thread migrations.

--
Ticket URL: <http://devel.rtems.org/ticket/2554#comment:8>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list