History

mm, compaction: be selective about what pageblocks to clear skip hints

Pageblock hints are cleared when compaction restarts or kswapd makes enough progress that it can sleep but it's over-eager in that the bit is cleared for migration sources with no LRU pages and migration targets with no free pages. As pageblock skip hint flushes are relatively rare and out-of-band with respect to kswapd, this patch makes a few more expensive checks to see if it's appropriate to even clear the bit. Every pageblock that is not cleared will avoid 512 pages being scanned unnecessarily on x86-64. The impact is variable with different workloads showing small differences in latency, success rates and scan rates. This is expected as clearing the hints is not that common but doing a small amount of work out-of-band to avoid a large amount of work in-band later is generally a good thing.

Mel Gorman committed 7 years ago

Commit e332f741 parent 4fca9732 files · +108 −18Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/mmzone.h+2−0
@@ -480,6 +480,8 @@ struct zone { · 479 unmodified lines
480 unsigned long compact_cached_free_pfn;480 unsigned long compact_cached_free_pfn;
481 /* pfn where async and sync compaction migration scanner should start */481 /* pfn where async and sync compaction migration scanner should start */
482 unsigned long compact_cached_migrate_pfn[2];482 unsigned long compact_cached_migrate_pfn[2];
483 unsigned long compact_init_migrate_pfn;
484 unsigned long compact_init_free_pfn;
483#endif485#endif
484 486
485#ifdef CONFIG_COMPACTION487#ifdef CONFIG_COMPACTION

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t