<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:mcatanzaro&#64;igalia.com" title="Michael Catanzaro &lt;mcatanzaro&#64;igalia.com&gt;"> <span class="fn">Michael Catanzaro</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;">Attachment #273833 Flags</td>
           <td>review?
           </td>
           <td>review-
           </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#c25">Comment # 25</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:mcatanzaro&#64;igalia.com" title="Michael Catanzaro &lt;mcatanzaro&#64;igalia.com&gt;"> <span class="fn">Michael Catanzaro</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=273833&amp;action=diff" name="attach_273833" title="Patch">attachment 273833</a> <a href="attachment.cgi?id=273833&amp;action=edit" title="Patch">[details]</a></span>
Patch

I think this patch needs to address clopez's feedback:

&quot;&quot;&quot;Regarding the concerns about that the wakeups could affect the battery life I propose that we only enable this fallback memory pressure handler when the system is not running on battery.

We can reliably detect this by inspecting some values on /sys. For example, we can borrow either the systemd implementation to detect this &lt;<a href="https://github.com/systemd/systemd/blob/master/src/basic/util.c#L498">https://github.com/systemd/systemd/blob/master/src/basic/util.c#L498</a>&gt; or the e2fsprogs one &lt;<a href="http://git.kernel.org/cgit/fs/ext2/e2fsprogs.git/tree/e2fsck/unix.c#n284">http://git.kernel.org/cgit/fs/ext2/e2fsprogs.git/tree/e2fsck/unix.c#n284</a>&gt; (yes, fsck avoids running automatically if it detects you are on battery)


And I don't think we should hide this feature behind an obscure environment variable than other than we developers and power users will know about, but make it run by default when the cgroup based memory pressure handler fails and when the system is not running on battery.&quot;&quot;&quot;</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>