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


Groups > linux.kernel > #1463454

Re: [PATCH v6 10/11] mm, compaction: require only min watermarks for non-costly orders

From Vlastimil Babka <vbabka@suse.cz>
Newsgroups linux.kernel
Subject Re: [PATCH v6 10/11] mm, compaction: require only min watermarks for non-costly orders
Date 2016-08-16 08:40 +0200
Message-ID <s6Gcy-80i-17@gated-at.bofh.it> (permalink)
References <s4GgI-79-119@gated-at.bofh.it> <s4Jez-29X-39@gated-at.bofh.it> <s6FTc-7TO-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 08/16/2016 08:16 AM, Joonsoo Kim wrote:
> On Wed, Aug 10, 2016 at 11:12:25AM +0200, Vlastimil Babka wrote:
>> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
>> index 621e4211ce16..a5c0f914ec00 100644
>> --- a/mm/page_alloc.c
>> +++ b/mm/page_alloc.c
>> @@ -2492,7 +2492,7 @@ int __isolate_free_page(struct page *page, unsigned int order)
>>
>>  	if (!is_migrate_isolate(mt)) {
>>  		/* Obey watermarks as if the page was being allocated */
>> -		watermark = low_wmark_pages(zone) + (1 << order);
>> +		watermark = min_wmark_pages(zone) + (1UL << order);
>
> This '1 << order' also needs some comment. Why can't we use
> compact_gap() in this case?

This is just short-cutting the high-order watermark check to check only 
order-0, because we already know the high-order page exists.
We can't use compact_gap() as that's too high to use for a single 
allocation watermark, since we can be already holding some free pages on 
the list. So it would defeat the gap purpose.

> Thanks.
>

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


Thread

Re: [PATCH v6 10/11] mm, compaction: require only min watermarks for  non-costly orders Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2016-08-16 08:20 +0200
  Re: [PATCH v6 10/11] mm, compaction: require only min watermarks for  non-costly orders Vlastimil Babka <vbabka@suse.cz> - 2016-08-16 08:40 +0200
    Re: [PATCH v6 10/11] mm, compaction: require only min watermarks for  non-costly orders Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2016-08-16 08:50 +0200
      Re: [PATCH v6 10/11] mm, compaction: require only min watermarks for  non-costly orders Vlastimil Babka <vbabka@suse.cz> - 2016-08-18 14:30 +0200

csiph-web