Merge remote-tracking branch 'origin/v3.10/topic/zram' into linux-linaro-lsk
authorAlex Shi <alex.shi@linaro.org>
Tue, 12 May 2015 06:55:30 +0000 (14:55 +0800)
committerAlex Shi <alex.shi@linaro.org>
Tue, 12 May 2015 06:55:30 +0000 (14:55 +0800)
 Conflicts:
mm/Kconfig
mm/Makefile

1  2 
include/linux/cpu.h
lib/Makefile
mm/Kconfig
mm/Makefile

Simple merge
diff --cc lib/Makefile
Simple merge
diff --cc mm/Kconfig
index b2d1aed56439f98b74fedb9b3e81c9cedb947b1e,ac85efdeab4547306e764bf280361869f9226357..7c13c134f646e1a5eed45fbb3aade97a38ade583
@@@ -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 89244cb96221a3cb78d51b07b0fbc45c041dd091,fa2e7df37b85ba46317887d1ef1f97e011c8f76d..0fa6442b4d4cf5719eaf57ce5c1f33ca39f22d1d
@@@ -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