Commit 9c479db
committed
mm: scrape LRU pages for offlined memcgs
jira KERNEL-172
feature Add ability to scrape LRU pages from offlined memcgs
commit-author Yu Zhao <[email protected]>
commit-source v1-0001-mm-scrape-LRU-pages-for-offlined-memcgs.patch
commit-source-path Provided by Google Engineering
upstream-diff A few tweaks to the original patch were necessary:
* Removed unused nid variable from scrape_offlined_memcgs
* Switched extra2 to 8 (otherwise 'echo 8 > /proc/sys/vm/drop_caches'
would be rejected)
* Renamed nr_pages_to_scrape to offlined_memcg_nr_pages in the
!CONFIG_MEMCG case to match the CONFIG_MEMCG case
* Added 'return 0' to scrape_offlined_memcgs in the
!CONFIG_MEMCG case
For offlined memcgs, kmem (slab) is reparented so that it does not hold
refcnts which would in turn prevent those memcgs from being released.
However, reparenting does not apply to LRU pages (pagecache), and
therefore they need to be scraped as well for offlined memcgs.
"echo 8 > /proc/sys/vm/drop_caches" was introduced for this reason. And
unlike "echo 1", it does not have performance impact on online memcgs in
terms of zapping pagecache.
Signed-off-by: Yu Zhao <[email protected]>
Signed-off-by: Brett Mastbergen <[email protected]>1 parent ab07cdc commit 9c479db
File tree
6 files changed
+94
-1
lines changed- Documentation/sysctl
- fs
- include/linux
- kernel
- mm
6 files changed
+94
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
| 229 | + | |
228 | 230 | | |
229 | 231 | | |
230 | 232 | | |
| |||
249 | 251 | | |
250 | 252 | | |
251 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
252 | 262 | | |
253 | 263 | | |
254 | 264 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
69 | 89 | | |
70 | 90 | | |
71 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| |||
1150 | 1152 | | |
1151 | 1153 | | |
1152 | 1154 | | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
1153 | 1164 | | |
1154 | 1165 | | |
1155 | 1166 | | |
| |||
1526 | 1537 | | |
1527 | 1538 | | |
1528 | 1539 | | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
1529 | 1551 | | |
1530 | 1552 | | |
1531 | 1553 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
| |||
1483 | 1484 | | |
1484 | 1485 | | |
1485 | 1486 | | |
1486 | | - | |
| 1487 | + | |
1487 | 1488 | | |
1488 | 1489 | | |
1489 | 1490 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5594 | 5594 | | |
5595 | 5595 | | |
5596 | 5596 | | |
| 5597 | + | |
| 5598 | + | |
5597 | 5599 | | |
5598 | 5600 | | |
5599 | 5601 | | |
| |||
5621 | 5623 | | |
5622 | 5624 | | |
5623 | 5625 | | |
| 5626 | + | |
| 5627 | + | |
5624 | 5628 | | |
5625 | 5629 | | |
5626 | 5630 | | |
5627 | 5631 | | |
5628 | 5632 | | |
5629 | 5633 | | |
5630 | 5634 | | |
| 5635 | + | |
| 5636 | + | |
5631 | 5637 | | |
5632 | 5638 | | |
5633 | 5639 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
126 | 129 | | |
127 | 130 | | |
128 | 131 | | |
| |||
3034 | 3037 | | |
3035 | 3038 | | |
3036 | 3039 | | |
| 3040 | + | |
| 3041 | + | |
| 3042 | + | |
3037 | 3043 | | |
3038 | 3044 | | |
3039 | 3045 | | |
| |||
4736 | 4742 | | |
4737 | 4743 | | |
4738 | 4744 | | |
| 4745 | + | |
| 4746 | + | |
| 4747 | + | |
| 4748 | + | |
| 4749 | + | |
| 4750 | + | |
| 4751 | + | |
| 4752 | + | |
| 4753 | + | |
| 4754 | + | |
| 4755 | + | |
| 4756 | + | |
| 4757 | + | |
| 4758 | + | |
| 4759 | + | |
| 4760 | + | |
| 4761 | + | |
| 4762 | + | |
| 4763 | + | |
| 4764 | + | |
| 4765 | + | |
| 4766 | + | |
| 4767 | + | |
| 4768 | + | |
| 4769 | + | |
| 4770 | + | |
| 4771 | + | |
| 4772 | + | |
0 commit comments