Commit f0e7554
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@main1 parent ea79572 commit f0e7554
2 files changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
| 412 | + | |
412 | 413 | | |
413 | 414 | | |
414 | 415 | | |
415 | 416 | | |
416 | 417 | | |
417 | 418 | | |
| 419 | + | |
| 420 | + | |
418 | 421 | | |
419 | 422 | | |
420 | 423 | | |
| |||
464 | 467 | | |
465 | 468 | | |
466 | 469 | | |
| 470 | + | |
467 | 471 | | |
468 | 472 | | |
469 | 473 | | |
| |||
475 | 479 | | |
476 | 480 | | |
477 | 481 | | |
478 | | - | |
| 482 | + | |
| 483 | + | |
479 | 484 | | |
480 | 485 | | |
481 | 486 | | |
482 | 487 | | |
483 | | - | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
484 | 494 | | |
485 | 495 | | |
486 | 496 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
0 commit comments