[RTEMS Project] #2350: One watchdog ticks header per scheduler instance

RTEMS trac trac at rtems.org
Wed May 20 07:25:28 UTC 2015


#2350: One watchdog ticks header per scheduler instance
-----------------------------+------------------
 Reporter:  sebastian.huber  |      Owner:
     Type:  enhancement      |     Status:  new
 Priority:  normal           |  Milestone:  5.0
Component:  SMP              |    Version:  4.11
 Severity:  normal           |   Keywords:
-----------------------------+------------------
 Currently there is one watchdog header for all ticks based watchdogs. This
 is not scalable. For example on the Freescale T4240 platform with
 24-processors we observe in the smptests/smpwakeafter01 test a maximum
 thread dispatch disabled time of 3.8ms on processor 0 and 1.7ms on the
 other processors.

 {{{
 #!xml
 <PerCPUProfilingReport processorIndex="0">
   <MaxThreadDispatchDisabledTime
 unit="ns">3807457</MaxThreadDispatchDisabledTime>
   <MeanThreadDispatchDisabledTime
 unit="ns">124091</MeanThreadDispatchDisabledTime>
   <TotalThreadDispatchDisabledTime
 unit="ns">1706880473</TotalThreadDispatchDisabledTime>
   <ThreadDispatchDisabledCount>13755</ThreadDispatchDisabledCount>
   <MaxInterruptDelay unit="ns">0</MaxInterruptDelay>
   <MaxInterruptTime unit="ns">24661</MaxInterruptTime>
   <MeanInterruptTime unit="ns">10148</MeanInterruptTime>
   <TotalInterruptTime unit="ns">127682501</TotalInterruptTime>
   <InterruptCount>12582</InterruptCount>
 </PerCPUProfilingReport>
 <PerCPUProfilingReport processorIndex="1">
   <MaxThreadDispatchDisabledTime
 unit="ns">1715826</MaxThreadDispatchDisabledTime>
   <MeanThreadDispatchDisabledTime
 unit="ns">102805</MeanThreadDispatchDisabledTime>
   <TotalThreadDispatchDisabledTime
 unit="ns">1884937615</TotalThreadDispatchDisabledTime>
   <ThreadDispatchDisabledCount>18335</ThreadDispatchDisabledCount>
   <MaxInterruptDelay unit="ns">0</MaxInterruptDelay>
   <MaxInterruptTime unit="ns">47</MaxInterruptTime>
   <MeanInterruptTime unit="ns">12</MeanInterruptTime>
   <TotalInterruptTime unit="ns">8299</TotalInterruptTime>
   <InterruptCount>664</InterruptCount>
 </PerCPUProfilingReport>
 <SMPLockProfilingReport name="Watchdog">
   <MaxAcquireTime unit="ns">47020</MaxAcquireTime>
   <MaxSectionTime unit="ns">2709</MaxSectionTime>
   <MeanAcquireTime unit="ns">31</MeanAcquireTime>
   <MeanSectionTime unit="ns">52</MeanSectionTime>
   <TotalAcquireTime unit="ns">990203330</TotalAcquireTime>
   <TotalSectionTime unit="ns">1674926849</TotalSectionTime>
   <UsageCount>31604848</UsageCount>
   <ContentionCount initialQueueLength="0">10574</ContentionCount>
   <ContentionCount initialQueueLength="1">8168</ContentionCount>
   <ContentionCount initialQueueLength="2">8578</ContentionCount>
   <ContentionCount initialQueueLength="3">31577528</ContentionCount>
 </SMPLockProfilingReport>
 }}}

 The watchdog lock is highly contended and since the watchdog insert
 procedure acquires and releases the lock during the iteration of the
 watchdog chain several times, this yields the high thread dispatch
 disabled times.

 To get rid of this bottleneck we should move the watchdog context into the
 scheduler context to use one watchdog context per scheduler instance.
 Take care that active watchdogs move in case of a scheduler change of a
 thread.

--
Ticket URL: <http://devel.rtems.org/ticket/2350>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list