<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:svillar&#64;igalia.com" title="Sergio Villar Senin &lt;svillar&#64;igalia.com&gt;"> <span class="fn">Sergio Villar Senin</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 #283624 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#c37">Comment # 37</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:svillar&#64;igalia.com" title="Sergio Villar Senin &lt;svillar&#64;igalia.com&gt;"> <span class="fn">Sergio Villar Senin</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=283624&amp;action=diff" name="attach_283624" title="Try to fix builds">attachment 283624</a> <a href="attachment.cgi?id=283624&amp;action=edit" title="Try to fix builds">[details]</a></span>
Try to fix builds

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=283624&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=283624&amp;action=review</a>

<span class="quote">&gt; Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp:196
&gt; +bool MemoryPressureHandler::tryEnsureEventFD()</span >

tryEnsure seems a bit weird name to me.

<span class="quote">&gt; Source/WebKit2/NetworkProcess/NetworkProcess.cpp:196
&gt; +void NetworkProcess::initializeNetworkProcess(NetworkProcessCreationParameters&amp;&amp; parameters)</span >

Seems unrelated

<span class="quote">&gt; Source/WebKit2/PluginProcess/PluginProcess.cpp:142
&gt; +    memoryPressureHandler.install();</span >

I understand you move this here because you need to set the handle before the install, I hope this does not add any race condition I've seen before when moving stuff like this.

<span class="quote">&gt; Source/WebKit2/UIProcess/linux/MemoryPressureMonitor.cpp:47
&gt; +static const size_t notSet = static_cast&lt;size_t&gt;(-1);</span >

Instead of notSet, consider making  lowWatermarkPages() and calculateMemoryAvailable() return an Optional&lt;size_t&gt;.

<span class="quote">&gt; Source/WebKit2/UIProcess/linux/MemoryPressureMonitor.cpp:189
&gt; +        // See <a href="https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773">https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773</a></span >

I'd find more useful to have this link just above the function definition.

<span class="quote">&gt; Source/WebKit2/UIProcess/linux/MemoryPressureMonitor.cpp:195
&gt; +    return ((memoryTotal - memoryAvailable) * 100) / memoryTotal;</span >

Do we have any guarantee that memoryTotal is not 0?

Do we have any guarantee that memoryTotal &gt; memoryAvailable ?</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>