Re: [PATCH] mm: add the block to the tail of the list in expand()

From: Xishi Qiu
Date: Fri Aug 14 2015 - 03:56:11 EST


On 2015/8/5 22:47, Dave Hansen wrote:

> On 08/05/2015 12:54 AM, Xishi Qiu wrote:
>> I add some debug code like this, but it doesn't trigger the dump_stack().
> ...
>> + if (!list_empty(&area->free_list[migratetype])) {
>> + printk("expand(), the list is not empty\n");
>> + dump_stack();
>> + }
>> +
>
> That will probably not trigger unless you have allocations that are
> falling back and converting other pageblocks from other migratetypes.
>

Hi Dave,

I run some stress test, and trigger the print, it shows that the list
is not empty. The reason is than fallback will find the largest possible
block of pages in the other list,

e.g.
1. we alloc order=2 block, and call __rmqueue_fallback().
2. we find other list current_order=7 is not empty, and the lists(in the
same pageblock) that order from 3~6 are not empty too.
3. then expand() will find the list is not empty.

right?

Thanks,
Xishi Qiu

> .
>



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/