lkml.org 
[lkml]   [2021]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RESEND 0/8] hugetlb: add demote/split page functionality
On Fri 10-09-21 17:11:05, Mike Kravetz wrote:
[...]
> @@ -5064,8 +5068,18 @@ bool gfp_pfmemalloc_allowed(gfp_t gfp_mask)
> if (did_some_progress > 0 &&
> should_compact_retry(ac, order, alloc_flags,
> compact_result, &compact_priority,
> - &compaction_retries))
> + &compaction_retries)) {
> + /*
> + * In one pathological case, pages can be stolen immediately
> + * after reclaimed. It looks like we are making progress, and
> + * compaction_retries is not incremented. This could cause
> + * an indefinite number of retries. Cap the number of retries
> + * for costly orders.
> + */
> + if (max_tries && tries > max_tries)
> + goto nopage;
> goto retry;
> + }

I do not think this is a good approach. We do not want to play with
retries numbers. If we want to go with a minimal change for now then the
compaction feedback mechanism should track the number of reclaimed pages
to satisfy watermarks and if that grows beyond reasonable (proportionaly
to the request size) then simply give up rather than keep trying again
and again.

--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2021-09-13 17:51    [W:0.147 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site