[webkit-changes] [WebKit/WebKit] cb12dc: Linux MemoryPressureMonitor (cgroupV1) honors memo...

Pablo Saavedra Rodiño noreply at github.com
Mon Jun 26 15:06:43 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cb12dc2f4fd8ffcdeefa28e090e3098bfa9e1779
      https://github.com/WebKit/WebKit/commit/cb12dc2f4fd8ffcdeefa28e090e3098bfa9e1779
  Author: Pablo Saavedra <psaavedra at igalia.com>
  Date:   2023-06-26 (Mon, 26 Jun 2023)

  Changed paths:
    M Source/WebKit/UIProcess/linux/MemoryPressureMonitor.cpp
    M Source/WebKit/UIProcess/linux/MemoryPressureMonitor.h

  Log Message:
  -----------
  Linux MemoryPressureMonitor (cgroupV1) honors memory.memsw.usage_in_bytes 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




More information about the webkit-changes mailing list