From: Alex Shi Date: Tue, 12 May 2015 06:55:30 +0000 (+0800) Subject: Merge remote-tracking branch 'origin/v3.10/topic/zram' into linux-linaro-lsk X-Git-Tag: firefly_0821_release~3680^2~8^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1f8fdf83fe376cc83e96e942689a6cfac01e9634;p=firefly-linux-kernel-4.4.55.git Merge remote-tracking branch 'origin/v3.10/topic/zram' into linux-linaro-lsk Conflicts: mm/Kconfig mm/Makefile --- 1f8fdf83fe376cc83e96e942689a6cfac01e9634 diff --cc mm/Kconfig index b2d1aed56439,ac85efdeab45..7c13c134f646 --- a/mm/Kconfig +++ b/mm/Kconfig @@@ -478,29 -478,34 +478,61 @@@ config FRONTSWA If unsure, say Y to enable frontswap. +config GENERIC_EARLY_IOREMAP + bool + +config CMA + bool "Contiguous Memory Allocator" + depends on HAVE_MEMBLOCK + select MIGRATION + select MEMORY_ISOLATION + help + This enables the Contiguous Memory Allocator which allows other + subsystems to allocate big physically-contiguous blocks of memory. + CMA reserves a region of memory and allows only movable pages to + be allocated from it. This way, the kernel can use the memory for + pagecache and when a subsystem requests for contiguous area, the + allocated pages are migrated away to serve the contiguous request. + + If unsure, say "n". + +config CMA_DEBUG + bool "CMA debug messages (DEVELOPMENT)" + depends on DEBUG_KERNEL && CMA + help + Turns on debug messages in CMA. This produces KERN_DEBUG + messages for every CMA call as well as various messages while + processing calls such as dma_alloc_from_contiguous(). + This option does not affect warning and error messages. ++ + config ZPOOL + tristate "Common API for compressed memory storage" + default n + help + Compressed memory storage API. This allows using either zbud or + zsmalloc. + + config ZSMALLOC + bool "Memory allocator for compressed pages" + depends on MMU + default n + help + zsmalloc is a slab-based memory allocator designed to store + compressed RAM pages. zsmalloc uses virtual memory mapping + in order to reduce fragmentation. However, this results in a + non-standard allocator interface where a handle, not a pointer, is + returned by an alloc(). This handle must be mapped in order to + access the allocated space. + + config PGTABLE_MAPPING + bool "Use page table mapping to access object in zsmalloc" + depends on ZSMALLOC + help + By default, zsmalloc uses a copy-based object mapping method to + access allocations that span two pages. However, if a particular + architecture (ex, ARM) performs VM mapping faster than copying, + then you should select this. This causes zsmalloc to use page table + mapping rather than copying for object mapping. + + You can check speed with zsmalloc benchmark[1]. + [1] https://github.com/spartacus06/zsmalloc diff --cc mm/Makefile index 89244cb96221,fa2e7df37b85..0fa6442b4d4c --- a/mm/Makefile +++ b/mm/Makefile @@@ -58,4 -58,5 +58,6 @@@ obj-$(CONFIG_DEBUG_KMEMLEAK) += kmemlea obj-$(CONFIG_DEBUG_KMEMLEAK_TEST) += kmemleak-test.o obj-$(CONFIG_CLEANCACHE) += cleancache.o obj-$(CONFIG_MEMORY_ISOLATION) += page_isolation.o +obj-$(CONFIG_GENERIC_EARLY_IOREMAP) += early_ioremap.o + obj-$(CONFIG_ZPOOL) += zpool.o + obj-$(CONFIG_ZSMALLOC) += zsmalloc.o