| <!DOCTYPE html> |
| |
| <html lang="en" data-content_root="../"> |
| <head> |
| <meta charset="utf-8" /> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" /> |
| |
| <title>OPAL Power Shift Ratio — skiboot d365a01 |
| documentation</title> |
| <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=fa44fd50" /> |
| <link rel="stylesheet" type="text/css" href="../_static/classic.css?v=514cf933" /> |
| |
| <script src="../_static/documentation_options.js?v=e1fecbe9"></script> |
| <script src="../_static/doctools.js?v=888ff710"></script> |
| <script src="../_static/sphinx_highlight.js?v=dc90522c"></script> |
| |
| <link rel="index" title="Index" href="../genindex.html" /> |
| <link rel="search" title="Search" href="../search.html" /> |
| <link rel="next" title="OPAL Power Caps" href="opal-powercap.html" /> |
| <link rel="prev" title="OPAL_POLL_EVENTS" href="opal-poll-events.html" /> |
| </head><body> |
| <div class="related" role="navigation" aria-label="related navigation"> |
| <h3>Navigation</h3> |
| <ul> |
| <li class="right" style="margin-right: 10px"> |
| <a href="../genindex.html" title="General Index" |
| accesskey="I">index</a></li> |
| <li class="right" > |
| <a href="opal-powercap.html" title="OPAL Power Caps" |
| accesskey="N">next</a> |</li> |
| <li class="right" > |
| <a href="opal-poll-events.html" title="OPAL_POLL_EVENTS" |
| accesskey="P">previous</a> |</li> |
| <li class="nav-item nav-item-0"><a href="../index.html">skiboot d365a01 |
| documentation</a> »</li> |
| <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">OPAL API Documentation</a> »</li> |
| <li class="nav-item nav-item-this"><a href="">OPAL Power Shift Ratio</a></li> |
| </ul> |
| </div> |
| |
| <div class="document"> |
| <div class="documentwrapper"> |
| <div class="bodywrapper"> |
| <div class="body" role="main"> |
| |
| <section id="opal-power-shift-ratio"> |
| <span id="opal-psr"></span><h1>OPAL Power Shift Ratio<a class="headerlink" href="#opal-power-shift-ratio" title="Link to this heading">¶</a></h1> |
| <p>Sometimes power management firmware needs to throttle power availability |
| to system components in order to keep within power cap or thermal limits. |
| It’s possible to set a preference as to what trade-offs power management |
| firmware will make. For example, certain workloads may heavily prefer |
| throttling CPU over GPUs or vice-versa.</p> |
| <section id="opal-get-power-shift-ratio"> |
| <span id="id1"></span><h2>OPAL_GET_POWER_SHIFT_RATIO<a class="headerlink" href="#opal-get-power-shift-ratio" title="Link to this heading">¶</a></h2> |
| <p>OPAL call to read the power-shifting-ratio using a handle to identify |
| the type (e.g CPU vs. GPU, CPU vs. MEM) which is exported via |
| device-tree.</p> |
| <p>The call can be asynchronus, where the token parameter is used to wait |
| for the completion.</p> |
| <section id="parameters"> |
| <h3>Parameters<a class="headerlink" href="#parameters" title="Link to this heading">¶</a></h3> |
| <table class="docutils align-default"> |
| <thead> |
| <tr class="row-odd"><th class="head"></th> |
| <th class="head"></th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr class="row-even"><td><p>u32</p></td> |
| <td><p>handle</p></td> |
| </tr> |
| <tr class="row-odd"><td><p>int</p></td> |
| <td><p>token</p></td> |
| </tr> |
| <tr class="row-even"><td><p>u32</p></td> |
| <td><p>*ratio</p></td> |
| </tr> |
| </tbody> |
| </table> |
| </section> |
| <section id="returns"> |
| <h3>Returns<a class="headerlink" href="#returns" title="Link to this heading">¶</a></h3> |
| <dl class="simple"> |
| <dt><a class="reference internal" href="return-codes.html#opal-success"><span class="std std-ref">OPAL_SUCCESS</span></a></dt><dd><p>Success</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-parameter"><span class="std std-ref">OPAL_PARAMETER</span></a></dt><dd><p>Invalid ratio pointer</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-unsupported"><span class="std std-ref">OPAL_UNSUPPORTED</span></a></dt><dd><p>No support for reading psr</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-hardware"><span class="std std-ref">OPAL_HARDWARE</span></a></dt><dd><p>Unable to procced due to the current hardware state</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-async-completion"><span class="std std-ref">OPAL_ASYNC_COMPLETION</span></a></dt><dd><p>Request was sent and an async completion message will be sent with |
| token and status of the request.</p> |
| </dd> |
| </dl> |
| </section> |
| </section> |
| <section id="opal-set-power-shift-ratio"> |
| <span id="id2"></span><h2>OPAL_SET_POWER_SHIFT_RATIO<a class="headerlink" href="#opal-set-power-shift-ratio" title="Link to this heading">¶</a></h2> |
| <p>OPAL call to set power-shifting-ratio using a handle to identify |
| the type of PSR which is exported in device-tree. This call can be |
| asynchronus where the token parameter is used to wait for the |
| completion.</p> |
| <section id="id3"> |
| <h3>Parameters<a class="headerlink" href="#id3" title="Link to this heading">¶</a></h3> |
| <table class="docutils align-default"> |
| <thead> |
| <tr class="row-odd"><th class="head"></th> |
| <th class="head"></th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr class="row-even"><td><p>u32</p></td> |
| <td><p>handle</p></td> |
| </tr> |
| <tr class="row-odd"><td><p>int</p></td> |
| <td><p>token</p></td> |
| </tr> |
| <tr class="row-even"><td><p>u32</p></td> |
| <td><p>ratio</p></td> |
| </tr> |
| </tbody> |
| </table> |
| </section> |
| <section id="id4"> |
| <h3>Returns<a class="headerlink" href="#id4" title="Link to this heading">¶</a></h3> |
| <dl class="simple"> |
| <dt><a class="reference internal" href="return-codes.html#opal-success"><span class="std std-ref">OPAL_SUCCESS</span></a></dt><dd><p>Success</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-parameter"><span class="std std-ref">OPAL_PARAMETER</span></a></dt><dd><p>Invalid ratio requested</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-unsupported"><span class="std std-ref">OPAL_UNSUPPORTED</span></a></dt><dd><p>No support for changing the ratio</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-permission"><span class="std std-ref">OPAL_PERMISSION</span></a></dt><dd><p>Hardware cannot take the request</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-async-completion"><span class="std std-ref">OPAL_ASYNC_COMPLETION</span></a></dt><dd><p>Request was sent and an async completion message will be sent with |
| token and status of the request.</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-hardware"><span class="std std-ref">OPAL_HARDWARE</span></a></dt><dd><p>Unable to procced due to the current hardware state</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-busy"><span class="std std-ref">OPAL_BUSY</span></a></dt><dd><p>Previous request in progress</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-internal-error"><span class="std std-ref">OPAL_INTERNAL_ERROR</span></a></dt><dd><p>Error in request response</p> |
| </dd> |
| <dt><a class="reference internal" href="return-codes.html#opal-timeout"><span class="std std-ref">OPAL_TIMEOUT</span></a></dt><dd><p>Timeout in request completion</p> |
| </dd> |
| </dl> |
| </section> |
| </section> |
| </section> |
| |
| |
| <div class="clearer"></div> |
| </div> |
| </div> |
| </div> |
| <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> |
| <div class="sphinxsidebarwrapper"> |
| <div> |
| <h3><a href="../index.html">Table of Contents</a></h3> |
| <ul> |
| <li><a class="reference internal" href="#">OPAL Power Shift Ratio</a><ul> |
| <li><a class="reference internal" href="#opal-get-power-shift-ratio">OPAL_GET_POWER_SHIFT_RATIO</a><ul> |
| <li><a class="reference internal" href="#parameters">Parameters</a></li> |
| <li><a class="reference internal" href="#returns">Returns</a></li> |
| </ul> |
| </li> |
| <li><a class="reference internal" href="#opal-set-power-shift-ratio">OPAL_SET_POWER_SHIFT_RATIO</a><ul> |
| <li><a class="reference internal" href="#id3">Parameters</a></li> |
| <li><a class="reference internal" href="#id4">Returns</a></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| |
| </div> |
| <div> |
| <h4>Previous topic</h4> |
| <p class="topless"><a href="opal-poll-events.html" |
| title="previous chapter">OPAL_POLL_EVENTS</a></p> |
| </div> |
| <div> |
| <h4>Next topic</h4> |
| <p class="topless"><a href="opal-powercap.html" |
| title="next chapter">OPAL Power Caps</a></p> |
| </div> |
| <div role="note" aria-label="source link"> |
| <h3>This Page</h3> |
| <ul class="this-page-menu"> |
| <li><a href="../_sources/opal-api/opal-power-shift-ratio.rst.txt" |
| rel="nofollow">Show Source</a></li> |
| </ul> |
| </div> |
| <div id="searchbox" style="display: none" role="search"> |
| <h3 id="searchlabel">Quick search</h3> |
| <div class="searchformwrapper"> |
| <form class="search" action="../search.html" method="get"> |
| <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/> |
| <input type="submit" value="Go" /> |
| </form> |
| </div> |
| </div> |
| <script>document.getElementById('searchbox').style.display = "block"</script> |
| </div> |
| </div> |
| <div class="clearer"></div> |
| </div> |
| <div class="related" role="navigation" aria-label="related navigation"> |
| <h3>Navigation</h3> |
| <ul> |
| <li class="right" style="margin-right: 10px"> |
| <a href="../genindex.html" title="General Index" |
| >index</a></li> |
| <li class="right" > |
| <a href="opal-powercap.html" title="OPAL Power Caps" |
| >next</a> |</li> |
| <li class="right" > |
| <a href="opal-poll-events.html" title="OPAL_POLL_EVENTS" |
| >previous</a> |</li> |
| <li class="nav-item nav-item-0"><a href="../index.html">skiboot d365a01 |
| documentation</a> »</li> |
| <li class="nav-item nav-item-1"><a href="index.html" >OPAL API Documentation</a> »</li> |
| <li class="nav-item nav-item-this"><a href="">OPAL Power Shift Ratio</a></li> |
| </ul> |
| </div> |
| <div class="footer" role="contentinfo"> |
| © Copyright 2016-2017, IBM, others. |
| Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.2.6. |
| </div> |
| </body> |
| </html> |