Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1410261

Re: [RFC 12/13] mm, compaction: more reliably increase direct compaction priority

From Vlastimil Babka <vbabka@suse.cz>
Newsgroups linux.kernel
Subject Re: [RFC 12/13] mm, compaction: more reliably increase direct compaction priority
Date 2016-05-31 14:30 +0200
Message-ID <rEQY3-2DM-57@gated-at.bofh.it> (permalink)
References <rxaqR-6fU-5@gated-at.bofh.it> <rxaqS-6fU-31@gated-at.bofh.it> <rELvk-7hB-57@gated-at.bofh.it> <rEQEH-2x9-47@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 05/31/2016 02:07 PM, Vlastimil Babka wrote:
> On 05/31/2016 08:37 AM, Joonsoo Kim wrote:
>>> @@ -3695,22 +3695,22 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
>>>  	else
>>>  		no_progress_loops++;
>>>
>>> -	if (should_reclaim_retry(gfp_mask, order, ac, alloc_flags,
>>> -				 did_some_progress > 0, no_progress_loops))
>>> -		goto retry;
>>> -
>>> +	should_retry = should_reclaim_retry(gfp_mask, order, ac, alloc_flags,
>>> +				 did_some_progress > 0, no_progress_loops);
>>>  	/*
>>>  	 * It doesn't make any sense to retry for the compaction if the order-0
>>>  	 * reclaim is not able to make any progress because the current
>>>  	 * implementation of the compaction depends on the sufficient amount
>>>  	 * of free memory (see __compaction_suitable)
>>>  	 */
>>> -	if (did_some_progress > 0 &&
>>> -			should_compact_retry(ac, order, alloc_flags,
>>> +	if (did_some_progress > 0)
>>> +		should_retry |= should_compact_retry(ac, order, alloc_flags,
>>>  				compact_result, &compact_priority,
>>> -				compaction_retries))
>>> +				compaction_retries);
>>> +	if (should_retry)
>>>  		goto retry;
>>
>> Hmm... it looks odd that we check should_compact_retry() when
>> did_some_progress > 0. If system is full of anonymous memory and we
>> don't have swap, we can't reclaim anything but we can compact.
>
> Right, thanks.

Hmm on the other hand, should_compact_retry will assume (in 
compaction_zonelist_suitable()) that reclaimable memory is actually 
reclaimable. If there's nothing to tell us that it actually isn't, if we 
drop the reclaim progress requirement. That's risking an infinite loop?

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [RFC 12/13] mm, compaction: more reliably increase direct  compaction priority Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2016-05-31 08:40 +0200
  Re: [RFC 12/13] mm, compaction: more reliably increase direct  compaction priority Vlastimil Babka <vbabka@suse.cz> - 2016-05-31 14:10 +0200
    Re: [RFC 12/13] mm, compaction: more reliably increase direct  compaction priority Vlastimil Babka <vbabka@suse.cz> - 2016-05-31 14:30 +0200
      Re: [RFC 12/13] mm, compaction: more reliably increase direct  compaction priority Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2016-06-02 04:50 +0200

csiph-web