<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:svillar@igalia.com" title="Sergio Villar Senin <svillar@igalia.com>"> <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@igalia.com" title="Sergio Villar Senin <svillar@igalia.com>"> <span class="fn">Sergio Villar Senin</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=283624&action=diff" name="attach_283624" title="Try to fix builds">attachment 283624</a> <a href="attachment.cgi?id=283624&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&action=review">https://bugs.webkit.org/attachment.cgi?id=283624&action=review</a>
<span class="quote">> Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp:196
> +bool MemoryPressureHandler::tryEnsureEventFD()</span >
tryEnsure seems a bit weird name to me.
<span class="quote">> Source/WebKit2/NetworkProcess/NetworkProcess.cpp:196
> +void NetworkProcess::initializeNetworkProcess(NetworkProcessCreationParameters&& parameters)</span >
Seems unrelated
<span class="quote">> Source/WebKit2/PluginProcess/PluginProcess.cpp:142
> + 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">> Source/WebKit2/UIProcess/linux/MemoryPressureMonitor.cpp:47
> +static const size_t notSet = static_cast<size_t>(-1);</span >
Instead of notSet, consider making lowWatermarkPages() and calculateMemoryAvailable() return an Optional<size_t>.
<span class="quote">> Source/WebKit2/UIProcess/linux/MemoryPressureMonitor.cpp:189
> + // 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">> Source/WebKit2/UIProcess/linux/MemoryPressureMonitor.cpp:195
> + return ((memoryTotal - memoryAvailable) * 100) / memoryTotal;</span >
Do we have any guarantee that memoryTotal is not 0?
Do we have any guarantee that memoryTotal > 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>