Skip to content

Linux MemoryPressureMonitor (cgroupV1) honors memory.memsw.usage_in_b…#1150

Merged
magomez merged 1 commit intowpe-2.38from
pgorszkowski/linux_MemoryPressureMonitor_cgroupV1_honors_memory.memsw.usage_in_bytes_if_exist
Aug 30, 2023
Merged

Linux MemoryPressureMonitor (cgroupV1) honors memory.memsw.usage_in_b…#1150
magomez merged 1 commit intowpe-2.38from
pgorszkowski/linux_MemoryPressureMonitor_cgroupV1_honors_memory.memsw.usage_in_bytes_if_exist

Conversation

@pgorszkowski-igalia
Copy link
Copy Markdown

…ytes if exist

https://bugs.webkit.org/show_bug.cgi?id=257860

Reviewed by Carlos Alberto Lopez Perez.

For systems still using cgroupV1, in case of the WK processes are associated to a cgroup with memory controller, the MemoryPressureMonitor reads the current used memory from the memory.memsw.usage_in_bytes. It fallback to the memory.usage_in_bytesin case the first choice is not available.

  • Source/WebKit/UIProcess/linux/MemoryPressureMonitor.cpp: (WebKit::CGroupMemoryController::setMemoryControllerPath): (WebKit::CGroupMemoryController::disposeMemoryController): (WebKit::CGroupMemoryController::getMemoryUsageWithCgroup):

Canonical link: https://commits.webkit.org/265527@main

…ytes if exist

https://bugs.webkit.org/show_bug.cgi?id=257860

Reviewed by Carlos Alberto Lopez Perez.

For systems still using cgroupV1, in case of the WK processes are
associated to a cgroup with memory controller, the MemoryPressureMonitor
reads the current used memory from the memory.memsw.usage_in_bytes. It
fallback to the memory.usage_in_bytesin case the first choice is not
available.

* Source/WebKit/UIProcess/linux/MemoryPressureMonitor.cpp:
(WebKit::CGroupMemoryController::setMemoryControllerPath):
(WebKit::CGroupMemoryController::disposeMemoryController):
(WebKit::CGroupMemoryController::getMemoryUsageWithCgroup):

Canonical link: https://commits.webkit.org/265527@main
@pgorszkowski-igalia
Copy link
Copy Markdown
Author

The backport patch from upstream - requested in #1100

@magomez magomez merged commit a19a01e into wpe-2.38 Aug 30, 2023
@magomez magomez deleted the pgorszkowski/linux_MemoryPressureMonitor_cgroupV1_honors_memory.memsw.usage_in_bytes_if_exist branch August 30, 2023 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants