[153/163] mm/page_alloc: fallbacks at most has 3 elements
diff mbox series

Message ID 20200807062558.ui4uGHaCT%akpm@linux-foundation.org
State New
Headers show
Series
  • [001/163] mm/memory.c: avoid access flag update TLB flush for retried page fault
Related show

Commit Message

Andrew Morton Aug. 7, 2020, 6:25 a.m. UTC
From: Wei Yang <richard.weiyang@linux.alibaba.com>
Subject: 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.

Link: http://lkml.kernel.org/r/20200625231022.18784-1-richard.weiyang@linux.alibaba.com
Signed-off-by: Wei Yang <richard.weiyang@linux.alibaba.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/page_alloc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

--- a/mm/page_alloc.c~mm-page_alloc-fallbacks-at-most-has-3-elements
+++ a/mm/page_alloc.c
@@ -2268,7 +2268,7 @@  struct page *__rmqueue_smallest(struct z
  * This array describes the order lists are fallen back to when
  * the free lists for the desirable migrate type are depleted
  */
-static int fallbacks[MIGRATE_TYPES][4] = {
+static int fallbacks[MIGRATE_TYPES][3] = {
 	[MIGRATE_UNMOVABLE]   = { MIGRATE_RECLAIMABLE, MIGRATE_MOVABLE,   MIGRATE_TYPES },
 	[MIGRATE_MOVABLE]     = { MIGRATE_RECLAIMABLE, MIGRATE_UNMOVABLE, MIGRATE_TYPES },
 	[MIGRATE_RECLAIMABLE] = { MIGRATE_UNMOVABLE,   MIGRATE_MOVABLE,   MIGRATE_TYPES },