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

From: Xishi Qiu
Date: Wed Aug 05 2015 - 03:55:02 EST


On 2015/8/4 22:27, Dave Hansen wrote:

> On 08/03/2015 06:13 PM, Xishi Qiu wrote:
>> How did you do the experiment?
>
> I just stuck in some counters in expand() that looked to see whether the
> list was empty or not when the page is added and then printed them out
> occasionally.
>

Hi Dave,

I add some debug code like this, but it doesn't trigger the dump_stack().

--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -834,6 +834,12 @@ static inline void expand(struct zone *zone, struct page *page,
continue;
}
#endif
+
+ if (!list_empty(&area->free_list[migratetype])) {
+ printk("expand(), the list is not empty\n");
+ dump_stack();
+ }
+
list_add(&page[size].lru, &area->free_list[migratetype]);
area->nr_free++;
set_page_order(&page[size], high);


> It will be interesting to see the results both on a freshly-booted
> system and one that's reached relatively steady-state and is moving
> around a minimal number of pageblocks between the different types.
>
> In any case, the end result here needs to be some indication that the
> patch either helps ease fragmentation or helps performance.
>
> .
>



--
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/