History

mm/page_alloc: fallbacks at most has 3 elements

MIGRAGE_TYPES is used to be the mark of end and there are at most 3 elements for the one dimension array. Reduce to 3 to save little memory.

Wei Yang committed 6 years ago

Commit da415661 parent 9e15afa1 file · +1 −1Browse files

Unified · Split

mm/page_alloc.c+1−1
@@ -2268,7 +2268,7 @@ struct page *__rmqueue_smallest(struct zone *zone, unsigned int order, · 2267 unmodified lines
22682268 * This array describes the order lists are fallen back to when
22692269 * the free lists for the desirable migrate type are depleted
22702270 */
2271−static int fallbacks[MIGRATE_TYPES][4] = {
2271+static int fallbacks[MIGRATE_TYPES][3] = {
22722272 [MIGRATE_UNMOVABLE] = { MIGRATE_RECLAIMABLE, MIGRATE_MOVABLE, MIGRATE_TYPES },
22732273 [MIGRATE_MOVABLE] = { MIGRATE_RECLAIMABLE, MIGRATE_UNMOVABLE, MIGRATE_TYPES },
22742274 [MIGRATE_RECLAIMABLE] = { MIGRATE_UNMOVABLE, MIGRATE_MOVABLE, MIGRATE_TYPES },

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