Changes between Initial Version and Version 1 of laguna/l2cache


Ignore:
Timestamp:
10/22/2017 05:28:45 AM (2 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • laguna/l2cache

    v1 v1  
     1{{{#!html
     2          <div id="wikipage" class="trac-content"><p>
     3</p><div class="wiki-toc">
     4<ol>
     5  <li>
     6    <a href="#LagunaL2CachePerformance">Laguna L2 Cache Performance</a>
     7    <ol>
     8      <li>
     9        <a href="#a13.06OpenWrtBSP3.xkernel">13.06+ OpenWrt BSP (3.x kernel)</a>
     10      </li>
     11      <li>
     12        <a href="#a12-10OpenWrtBSP2.6.39kernel">12-10 OpenWrt BSP (2.6.39 kernel)</a>
     13      </li>
     14    </ol>
     15  </li>
     16</ol>
     17</div><p>
     18</p>
     19<h1 id="LagunaL2CachePerformance">Laguna L2 Cache Performance</h1>
     20<p>
     21The cns3xxx processor family contains a L2X0 cache controller implementing a Level 2 CPU cache. This can be enabled in the Linux kernel via the CONFIG_CACHE_L2X0 kernel configuration and is generally enabled by default.
     22</p>
     23<p>
     24L2 Cache provides a significant performance benefit for CPU bound operations (ie software compression/decrompression or encryption/decryption) however provides a performance hit for I/O bound operations (ie bridging and stateless routing).
     25</p>
     26<p>
     27Depending on your application you will want to experiment to see which settings provides the best benefit. If you're implementing a network bridge for example, you will want L2X0 disabled for a 60% improvement increase over it being enabled. The opposite is true for CPU intensive operations. For a task which may involve both experimentation is needed.
     28</p>
     29<h2 id="a13.06OpenWrtBSP3.xkernel">13.06+ <a class="wiki" href="/wiki/OpenWrt">OpenWrt</a> BSP (3.x kernel)</h2>
     30<p>
     31If using our software BSP 13.06 or greater the kernel commandline 'nol2x0' has been added to allow you to disable L2X0 at boot-time dynamically such that you do not have to rebuild the kernel.
     32</p>
     33<p>
     34For example, you can do this in uboot:
     35</p>
     36<pre class="wiki">Laguna &gt; print bootargs
     37bootargs=console=ttyS0,115200 root=/dev/mtdblock3 rootfstype=squashfs,jffs2
     38Laguna &gt; setenv bootargs console=ttyS0,115200 root=/dev/mtdblock3 rootfstype=squashfs,jffs2 nol2x0
     39Laguna &gt; saveenv
     40</pre><h2 id="a12-10OpenWrtBSP2.6.39kernel">12-10 <a class="wiki" href="/wiki/OpenWrt">OpenWrt</a> BSP (2.6.39 kernel)</h2>
     41<p>
     42The default firmware builds the kernel with L2X0 disabled.
     43</p>
     44<p>
     45To change this configuration use the 'make kernel_menuconfig' make target in the <a class="wiki" href="/wiki/OpenWrt">OpenWrt</a> buildroot directory and select or de-select 'System Type'-&gt;'Enable the L2x0 outer cache controller'
     46</p>
     47}}}