Changes between Initial Version and Version 1 of laguna/l2cache

10/22/2017 05:28:45 AM (3 years ago)



  • laguna/l2cache

    v1 v1  
     2          <div id="wikipage" class="trac-content"><p>
     3</p><div class="wiki-toc">
     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>
     19<h1 id="LagunaL2CachePerformance">Laguna L2 Cache Performance</h1>
     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.
     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).
     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.
     29<h2 id="a13.06OpenWrtBSP3.xkernel">13.06+ <a class="wiki" href="/wiki/OpenWrt">OpenWrt</a> BSP (3.x kernel)</h2>
     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.
     34For example, you can do this in uboot:
     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>
     42The default firmware builds the kernel with L2X0 disabled.
     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'