| Summary: | [WPE] Linux memory pressure for swap memory | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Donghwa Kim <donghwa> |
| Component: | WPE WebKit | Assignee: | Nobody <webkit-unassigned> |
| Status: | REOPENED --- | ||
| Severity: | Major | CC: | aperez, bugs-noreply, clopez, magomez, psaavedra |
| Priority: | P2 | ||
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
|
Description
Donghwa Kim
2023-01-24 21:42:01 PST
This is my suggetion :
diff --git a/Source/WTF/wtf/linux/MemoryPressureHandlerLinux.cpp b/Source/WTF/wtf/linux/MemoryPressureHandlerLinux.cpp
index fb86ee9d996d..674ff297837c 100644
--- a/Source/WTF/wtf/linux/MemoryPressureHandlerLinux.cpp
+++ b/Source/WTF/wtf/linux/MemoryPressureHandlerLinux.cpp
@@ -248,13 +248,14 @@ MemoryPressureHandler::MemoryUsagePoller::MemoryUsagePoller()
bool critical = false;
bool synchronous = false;
size_t value = 0;
+ size_t value_swap = 0;
if (s_pollMaximumProcessMemoryCriticalLimit) {
- if (readToken(s_processStatus, "VmRSS:", KB, value)) {
- if (value > s_pollMaximumProcessMemoryNonCriticalLimit) {
+ if (readToken(s_processStatus, "VmRSS:", KB, value) && readToken(s_processStatus, "VmSwap:", KB, value_swap)) {
+ if (value + value_swap > s_pollMaximumProcessMemoryNonCriticalLimit) {
underMemoryPressure = true;
- critical = value > s_pollMaximumProcessMemoryCriticalLimit;
- synchronous = value > s_pollMaximumProcessMemoryCriticalLimit * 1.05;
+ critical = value + value_swap > s_pollMaximumProcessMemoryCriticalLimit;
+ synchronous = value + value_swap > s_pollMaximumProcessMemoryCriticalLimit * 1.05;
}
}
}
Sorry. I should report this issue to the WPEWebkit project. I will closed it. (In reply to Donghwa Kim from comment #2) > Sorry. I should report this issue to the WPEWebkit project. > I will closed it. Hi Donghwa! You have reported your bug correctly... this Bugzilla is for all the WebKit ports, including WPE =) Let's reopen this, I am CC'ing a coouple of developers who may have a better idea than me about this topic. While the upstream version of WPE has the same problem, the code Donghwa is referring to belongs to the WebPlatformForEmbedded version of WPE. Here is my WPEWebkit pull request link : https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/1017 |