⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 interrupt_latency.html

📁 ADI 公司blackfin系列的用户使用文挡。
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head>  <title></title>  <link rel="stylesheet" media="screen" type="text/css" href="./style.css" />  <link rel="stylesheet" media="screen" type="text/css" href="./design.css" />  <link rel="stylesheet" media="print" type="text/css" href="./print.css" />  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body><a href=start.html>start</a></br><h1><a name="how_to_test_interrupt_latency_in_uclinux_on_blackfin" id="how_to_test_interrupt_latency_in_uclinux_on_blackfin">How to test interrupt latency in uClinux on Blackfin</a></h1><div class="level1"><p> Now we use a watchdog timer driver to test the interrupt in uClinux on Blackfin. It is in drivers/char/bfin_timer_latency.c. The process of testing is:</p><ul><li class="level1"><div class="li"> create a proc file /proc/timer_latency. Hook an ISR to watch dog timer (IVT13).</div></li><li class="level1"><div class="li"> When got a writing of &ldquo;1&rdquo; to this file, do following:</div><ul><li class="level2"><div class="li"> a). set a 5 seconds watch dog timer. </div></li><li class="level2"><div class="li"> b). Reset and start the CYCLES counter of Blackfin. (which increases by 1 every CCLK).</div></li><li class="level2"><div class="li"> c). After 5 seconds, watch dog generates an interrupt. In the ISR, read the CYCLES counter. The value should be a litter more than (5*CCLK). So the interrupt latency is (CYCLES value - (5*CCLK)) cycles. </div></li></ul></li><li class="level1"><div class="li"> When got a reading from this file, return the latency value (in cycles).</div></li></ul><p> Please be noted that this latency includes 3 parts:</p><ol><li class="level1"><div class="li">   Hardware latency.</div></li><li class="level1"><div class="li">   Context saving time before entering ISR. </div></li><li class="level1"><div class="li">   IRQ multimplexing time. (this part occupied more than half of the latency. It can be saved by not sharing the IRQ.)</div></li></ol><p>&mdash;-</p><p>So the simplest way to test the interrupt latency is:</p><ol><li class="level1"><div class="li">   Enable the timer_latency driver in &ldquo;make menuconfig&rdquo; &ndash;&gt; &ldquo;Customize kernel settings &ndash;&gt; &ldquo;char devices&rdquo;.</div></li><li class="level1"><div class="li">   run &quot; echo &ldquo;1&rdquo; &gt; /proc/timer_latency &quot; on Blackfin target.</div></li><li class="level1"><div class="li">   Wait more than 5 seconds, run &quot; cat /proc/timer_latency &quot; to get the latency.</div></li></ol><p>Of course you can also give the CPU any kind of load and/or use a script to test the result any times you want.    </p></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -