Skip to content

Commit da41566

Browse files
weiyang-linuxtorvalds
authored andcommitted
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. Signed-off-by: Wei Yang <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
1 parent 9e15afa commit da41566

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/page_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2268,7 +2268,7 @@ struct page *__rmqueue_smallest(struct zone *zone, unsigned int order,
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 },

0 commit comments

Comments
 (0)