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


Groups > linux.kernel > #1360924

Re: Suspicious error for CMA stress test

From Vlastimil Babka <vbabka@suse.cz>
Newsgroups linux.kernel
Subject Re: Suspicious error for CMA stress test
Date 2016-03-18 22:00 +0100
Message-ID <re9EZ-8dX-1@gated-at.bofh.it> (permalink)
References (11 earlier) <rdCpJ-5uU-21@gated-at.bofh.it> <rdIls-MU-23@gated-at.bofh.it> <rdIv7-Qo-3@gated-at.bofh.it> <re3pU-6Yy-13@gated-at.bofh.it> <re3SW-7Bh-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 03/18/2016 03:42 PM, Lucas Stach wrote:
> Am Freitag, den 18.03.2016, 15:10 +0100 schrieb Vlastimil Babka:
>> On 03/17/2016 04:52 PM, Joonsoo Kim wrote:
>> > 2016-03-18 0:43 GMT+09:00 Vlastimil Babka <vbabka@suse.cz>:
>>
>> OK, here it is. Hanjun can you please retest this, as I'm not sure if you had
>> the same code due to the followup one-liner patches in the thread. Lucas, see if
>> it helps with your issue as well. Laura and Joonsoo, please also test and review
>> and check changelog if my perception of the problem is accurate :)
>>
>
> This doesn't help for my case, as it is still trying to merge pages in
> isolated ranges. It even tries extra hard at doing so.
>
> With concurrent isolation and frees going on this may lead to the start
> page of the range to be isolated merging into an higher order buddy page
> if it isn't already pageblock aligned, leading both test_pages_isolated
> and isolate_freepages to fail on an otherwise perfectly fine range.
>
> What I am arguing is that if a page is freed into an isolated range we
> should not try merge it with it's buddies at all, by setting max_order =
> order. If the range is isolated because want to isolate freepages from
> it, the work to do the merging is wasted, as isolate_freepages will
> split higher order pages into order-0 pages again.
>
> If we already finished isolating freepages and are in the process of
> undoing the isolation, we don't strictly need to do the merging in
> __free_one_page, but can defer it to unset_migratetype_isolate, allowing
> to simplify those code paths by disallowing any merging of isolated
> pages at all.

Oh, I think understand now. Yeah, skipping merging for pages in isolated 
pageblocks might be a rather elegant solution. But still, we would have to check 
buddy's migratetype at order >= pageblock_order like my patch does, which is 
annoying. Because even without isolated merging, the buddy might have already 
had order>=pageblock_order when it was isolated.

So what if isolation also split existing buddies in the pageblock immediately 
when it sets the MIGRATETYPE_ISOLATE on the pageblock? Then we would have it 
guaranteed that there's no isolated buddy - a buddy candidate at order >= 
pageblock_order either has a smaller order (so it's not a buddy) or is not 
MIGRATE_ISOLATE so it's safe to merge with.

Does that make sense?

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


Thread

Re: Suspicious error for CMA stress test Vlastimil Babka <vbabka@suse.cz> - 2016-03-18 15:20 +0100
  Re: Suspicious error for CMA stress test Lucas Stach <l.stach@pengutronix.de> - 2016-03-18 15:50 +0100
    Re: Suspicious error for CMA stress test Vlastimil Babka <vbabka@suse.cz> - 2016-03-18 22:00 +0100
      Re: Suspicious error for CMA stress test Lucas Stach <l.stach@pengutronix.de> - 2016-03-22 15:50 +0100
  Re: Suspicious error for CMA stress test Hanjun Guo <guohanjun@huawei.com> - 2016-03-19 08:30 +0100
    Re: Suspicious error for CMA stress test Vlastimil Babka <vbabka@suse.cz> - 2016-03-19 23:20 +0100
  Re: Suspicious error for CMA stress test Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2016-03-23 05:50 +0100
    Re: Suspicious error for CMA stress test Vlastimil Babka <vbabka@suse.cz> - 2016-03-23 09:30 +0100
      Re: Suspicious error for CMA stress test Joonsoo Kim <js1304@gmail.com> - 2016-03-23 09:40 +0100

csiph-web