Commit cd5f2e4
ck: memcg: Point wb to root memcg/blkcg when offlining to avoid zombie
fix #32630110
After turning off the memcg kmem charging, we still suffer
from various zombie memcg problems on production environment
because of its non-zero reference count from both page caches
and per-memcg writeback related structure(bdi_writeback takes
a reference).
After we reclaimed all the page caches of the zombie memcg,
it still can't be dropped due to its bdi_writeback.
bdi_writeback is further referenced by the inodes of files,
so the memcg can't be truely released until the inodes are
destroyed afterwards which is quite unlikely in short term.
When memcg is offlining, change it's bdi_writeback to root,
and call css_put to formally release it. We've tested on
product environment, it yields pretty good effect.
Ditto for wb_blkcg_offline().
Reviewed-by: Yang Shi <[email protected]>
Reviewed-by: Gavin Shan <[email protected]>
Signed-off-by: Xunlei Pang <[email protected]>
Signed-off-by: Joseph Qi <[email protected]>
Acked-by: Caspar Zhang <[email protected]>
Signed-off-by: Hao Xu <[email protected]>
Acked-by: Joseph Qi <[email protected]>1 parent bed50b9 commit cd5f2e4
1 file changed
+18
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
872 | 872 | | |
873 | 873 | | |
874 | 874 | | |
875 | | - | |
| 875 | + | |
| 876 | + | |
876 | 877 | | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
877 | 885 | | |
878 | 886 | | |
879 | 887 | | |
| |||
889 | 897 | | |
890 | 898 | | |
891 | 899 | | |
892 | | - | |
| 900 | + | |
| 901 | + | |
893 | 902 | | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
894 | 910 | | |
895 | 911 | | |
896 | 912 | | |
| |||
0 commit comments