Re: [PATCH] mm/page_alloc: try oom if reclaim is unable to make forward progress

2021-03-26 Thread Aaron Tomlin
On Fri 2021-03-26 16:36 +0100, Michal Hocko wrote: > We should be focusing on the compaction retry logic and see whether we > can have some "run away" scenarios there. Fair enough. > Seeing so many retries without compaction bailing out sounds like a bug > in that retry logic. Agreed - I will co

Re: [PATCH] mm/page_alloc: try oom if reclaim is unable to make forward progress

2021-03-26 Thread Michal Hocko
On Fri 26-03-21 11:22:54, Aaron Tomlin wrote: [...] > > Both reclaim and compaction maintain their own retries counters as they > > are targeting a different operation. Although the compaction really > > depends on the reclaim to do some progress. > > Yes. Looking at should_compact_retry() if the

Re: [PATCH] mm/page_alloc: try oom if reclaim is unable to make forward progress

2021-03-26 Thread Aaron Tomlin
Hi Michal, On Fri 2021-03-26 09:16 +0100, Michal Hocko wrote: > The oom killer is never triggered for costly allocation request. Yes - I agree. Looking at __alloc_pages_may_oom() I can see for a costly order allocation request the OOM killer is explicitly not used. If I understand correctly, the

Re: [PATCH] mm/page_alloc: try oom if reclaim is unable to make forward progress

2021-03-26 Thread Michal Hocko
[Cc Vlastimil] On Thu 25-03-21 21:01:59, Aaron Tomlin wrote: > On Mon 2021-03-22 11:47 +0100, Michal Hocko wrote: > > Costly orders already do have heuristics for the retry in place. Could > > you be more specific what kind of problem you see with those? > > If I understand correctly, when the gf

Re: [PATCH] mm/page_alloc: try oom if reclaim is unable to make forward progress

2021-03-25 Thread Aaron Tomlin
On Mon 2021-03-22 11:47 +0100, Michal Hocko wrote: > Costly orders already do have heuristics for the retry in place. Could > you be more specific what kind of problem you see with those? If I understand correctly, when the gfp_mask consists of GFP_KERNEL | __GFP_RETRY_MAYFAIL in particular, an al

Re: [PATCH] mm/page_alloc: try oom if reclaim is unable to make forward progress

2021-03-22 Thread Michal Hocko
On Fri 19-03-21 17:29:01, Aaron Tomlin wrote: > Hi Michal, > > On Thu 2021-03-18 17:16 +0100, Michal Hocko wrote: > > On Mon 15-03-21 16:58:37, Aaron Tomlin wrote: > > > In the situation where direct reclaim is required to make progress for > > > compaction but no_progress_loops is already over th

Re: [PATCH] mm/page_alloc: try oom if reclaim is unable to make forward progress

2021-03-19 Thread Aaron Tomlin
Hi Michal, On Thu 2021-03-18 17:16 +0100, Michal Hocko wrote: > On Mon 15-03-21 16:58:37, Aaron Tomlin wrote: > > In the situation where direct reclaim is required to make progress for > > compaction but no_progress_loops is already over the limit of > > MAX_RECLAIM_RETRIES consider invoking the o

Re: [PATCH] mm/page_alloc: try oom if reclaim is unable to make forward progress

2021-03-18 Thread Michal Hocko
On Mon 15-03-21 16:58:37, Aaron Tomlin wrote: > In the situation where direct reclaim is required to make progress for > compaction but no_progress_loops is already over the limit of > MAX_RECLAIM_RETRIES consider invoking the oom killer. What is the problem you are trying to fix? > > Signed-off

Re: [PATCH] mm/page_alloc: try oom if reclaim is unable to make forward progress

2021-03-15 Thread kernel test robot
Hi Aaron, Thank you for the patch! Yet something to improve: [auto build test ERROR on hnaz-linux-mm/master] url: https://github.com/0day-ci/linux/commits/Aaron-Tomlin/mm-page_alloc-try-oom-if-reclaim-is-unable-to-make-forward-progress/20210316-010203 base: https://github.com/hnaz/linux-mm

Re: [PATCH] mm/page_alloc: try oom if reclaim is unable to make forward progress

2021-03-15 Thread kernel test robot
Hi Aaron, Thank you for the patch! Yet something to improve: [auto build test ERROR on hnaz-linux-mm/master] url: https://github.com/0day-ci/linux/commits/Aaron-Tomlin/mm-page_alloc-try-oom-if-reclaim-is-unable-to-make-forward-progress/20210316-010203 base: https://github.com/hnaz/linux-mm

Re: [PATCH] mm/page_alloc: try oom if reclaim is unable to make forward progress

2021-03-15 Thread kernel test robot
Hi Aaron, Thank you for the patch! Yet something to improve: [auto build test ERROR on hnaz-linux-mm/master] url: https://github.com/0day-ci/linux/commits/Aaron-Tomlin/mm-page_alloc-try-oom-if-reclaim-is-unable-to-make-forward-progress/20210316-010203 base: https://github.com/hnaz/linux-mm

[PATCH] mm/page_alloc: try oom if reclaim is unable to make forward progress

2021-03-15 Thread Aaron Tomlin
In the situation where direct reclaim is required to make progress for compaction but no_progress_loops is already over the limit of MAX_RECLAIM_RETRIES consider invoking the oom killer. Signed-off-by: Aaron Tomlin --- mm/page_alloc.c | 22 ++ 1 file changed, 18 insertions(+)