[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180322153157.10447-6-willy@infradead.org>
Date: Thu, 22 Mar 2018 08:31:54 -0700
From: Matthew Wilcox <willy@...radead.org>
To: Alexander Duyck <alexander.duyck@...il.com>
Cc: Matthew Wilcox <mawilcox@...rosoft.com>, netdev@...r.kernel.org,
linux-mm@...ck.org, Jesper Dangaard Brouer <brouer@...hat.com>,
Eric Dumazet <eric.dumazet@...il.com>
Subject: [PATCH v2 5/8] page_frag_cache: Save memory on small machines
From: Matthew Wilcox <mawilcox@...rosoft.com>
Only allocate a single page if CONFIG_BASE_SMALL is set.
Signed-off-by: Matthew Wilcox <mawilcox@...rosoft.com>
---
include/linux/mm_types.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index a63b138ad1a4..0defff9e3c0e 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -216,7 +216,11 @@ struct page {
#endif
} _struct_page_alignment;
+#if CONFIG_BASE_SMALL
+#define PAGE_FRAG_CACHE_MAX_SIZE PAGE_SIZE
+#else
#define PAGE_FRAG_CACHE_MAX_SIZE __ALIGN_MASK(32768, ~PAGE_MASK)
+#endif
#define PAGE_FRAG_CACHE_MAX_ORDER get_order(PAGE_FRAG_CACHE_MAX_SIZE)
#define PFC_MEMALLOC (1U << 31)
--
2.16.2
Powered by blists - more mailing lists