<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:changseok&#64;webkit.org" title="ChangSeok Oh &lt;changseok&#64;webkit.org&gt;"> <span class="fn">ChangSeok Oh</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - MemoryPressureHandler doesn't work if cgroups aren't present in Linux"
   href="https://bugs.webkit.org/show_bug.cgi?id=155255">bug 155255</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
               &nbsp;
           </td>
           <td>changseok&#64;webkit.org
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - MemoryPressureHandler doesn't work if cgroups aren't present in Linux"
   href="https://bugs.webkit.org/show_bug.cgi?id=155255#c30">Comment # 30</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - MemoryPressureHandler doesn't work if cgroups aren't present in Linux"
   href="https://bugs.webkit.org/show_bug.cgi?id=155255">bug 155255</a>
              from <span class="vcard"><a class="email" href="mailto:changseok&#64;webkit.org" title="ChangSeok Oh &lt;changseok&#64;webkit.org&gt;"> <span class="fn">ChangSeok Oh</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=155255#c27">comment #27</a>)
<span class="quote">&gt; Created <span class=""><a href="attachment.cgi?id=282544&amp;action=diff" name="attach_282544" title="Different approach">attachment 282544</a> <a href="attachment.cgi?id=282544&amp;action=edit" title="Different approach">[details]</a></span>
&gt; Different approach
&gt; 
&gt; This is a different approach to the previous patch. If there' no other way
&gt; than polling an parsing /proc/meminfo, let's try to minimize the problems.
&gt; There's a memory pressure handler in every secondary process, not only the
&gt; web process but also in the network and plugin processes. So, this patch
&gt; does the polling in a thread in the UI process to ensure it's only one
&gt; process waking up. It uses eventFD to notify the other processes about
&gt; memory pressure. The poll interval is calculated depending on the memory
&gt; usage in every moment, between 1 and 15 seconds, to try to wake up less
&gt; often when memory usage is low. Also instead of using a fixed size in MB of
&gt; free memory as a threshold, it uses a percentage of the memory used.
&gt; Everything can be configured just modifying some global variables in case
&gt; any of the values I set is not good enough. And finally instead of using the
&gt; MemFree value from /proce/meminfo, it uses the MemAvailable value, that was
&gt; added to the kernel in version 3.something, with a fallback implementation
&gt; based on the MemAvailable values implementation in the kernel in case of
&gt; using an old kernel. This is still not perfect and it can probably be
&gt; improved (use different configuration values, stop the poll in case of
&gt; running on batery, etc.), but hopefully it works well enough.</span >

Fair enough.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>