Re: [PATCH] mm: get rid of unnecessary pageblock scanning in setup_zone_migrate_reserve

From: Yasuaki Ishimatsu
Date: Fri Nov 01 2013 - 05:01:14 EST


Hi Mel and Kosaki,

Thank you for posting patches.

I tested your patches. And following table shows time of onlining
a memory section.

Amount of memory | 128GB | 192GB | 256GB|
------------------------------------------------
linux-3.12-rc7 | 24.3 | 30.2 | 45.6 |
Kosaki's first patch | 8.3 | 8.3 | 8.6 |
Mel + Kosaki's nit pick | 10.9 | 19.2 | 31.3 |
------------------------------------------------
(millisecond)

128GB : 4 nodes and each node has 32GB of memory
192GB : 6 nodes and each node has 32GB of memory
256GB : 8 nodes and each node has 32GB of memory

In my result, Mel's patch does not seem to fix the problem since time
is increasing with increasing amount of memory.

Thanks,
Yasuaki Ishimatsu

(2013/11/01 2:14), KOSAKI Motohiro wrote:
Nit. I would like to add following hunk. This is just nit because moving
reserve pageblock is extreme rare.

if (block_migratetype == MIGRATE_RESERVE) {
+ found++;
set_pageblock_migratetype(page, MIGRATE_MOVABLE);
move_freepages_block(zone, page, MIGRATE_MOVABLE);
}

I don't really see the advantage but if you think it is necessary then I
do not object either.

For example, a zone has five pageblock b1,b2,b3,b4,b5 and b1 has MIGRATE_RESERVE.
When hotremove b1 and hotadd again, your code need to scan all of blocks. But
mine only need to scan b1 and b2. I mean that's a hotplug specific optimization.




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