Possible mem cgroup bug in kernels between 4.18.0 and 5.3-rc1.
Quoted 19 lines · On Fri, 2 Aug 2019 21:40:29 +0800 Michal Hocko wrote:
Quoted 2 lines · Hillf Danton
On Fri, 2 Aug 2019 16:18:40 +0800 Michal Hocko wrote:
[...]
Quoted 4 lines
Quoted 3 lines
Huh, what? You are effectively saying that we should fail the charge when the requested
nr_pageswould fit in. This doesn't make much sense to me. What are you trying to achive here?Quoted 9 lines
The report looks like the result of a tight loop.
I want to break it and make the end result ofdo_page_faultunsuccessful ifnr_retriesrounds of page reclaiming fail to get work done. What made me a bit over stretched is how to determine if the chargee is a memhog in memcg's vocabulary.
What I prefer here is thatdo_page_faultsucceeds, even if the chargee exhausts its memory quota/budget granted, as long as more thannr_pagescan be reclaimed _within_nr_retriesrounds. IOW the deadline for memhog isnr_retries, and no more.
Quoted 5 lines
No, this really doesn't really make sense because it leads to pre-mature charge failures. The charge path is funadamentally not different from the page allocator path. We do try to reclaim and retry the allocation. We keep retrying for ever for non-costly order requests in both cases (modulo some corner cases like oom victims etc.).
You are right. It is hard to produce a cure for all corner cases. We can handle them one by one to reduce the chance that a cpuhog comes under memory pressure.
Hillf