int *compaction_retries)
{
int max_retries = MAX_COMPACT_RETRIES;
+ int min_priority;
if (!order)
return false;
* all retries or failed at the lower priorities.
*/
check_priority:
- if (*compact_priority > MIN_COMPACT_PRIORITY) {
+ min_priority = (order > PAGE_ALLOC_COSTLY_ORDER) ?
+ MIN_COMPACT_COSTLY_PRIORITY : MIN_COMPACT_PRIORITY;
+ if (*compact_priority > min_priority) {
(*compact_priority)--;
*compaction_retries = 0;
return true;