summaryrefslogtreecommitdiffstats
path: root/drivers/staging/android/Kconfig
diff options
context:
space:
mode:
authorRobert Love <rlove@google.com>2011-12-20 16:49:48 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2011-12-21 13:38:28 -0800
commit11980c2ac4ccfad21a5f8ee9e12059f1e687bb40 (patch)
tree7ed82c18ec7aef19acbf20cd8aa41eeb8dd20558 /drivers/staging/android/Kconfig
parentb6aba85c35baa7d08b7a601b30589bcae607d9e0 (diff)
downloadlinux-11980c2ac4ccfad21a5f8ee9e12059f1e687bb40.tar.bz2
ashmem: Anonymous shared memory subsystem
The anonymous shared memory (ashmem) subsystem provides a Unix-y,file-based shared memory interface to user-space. It works like anonymous memory (e.g. mmapping fd=0) except if you share the file descriptor via the usual means, you will share the mapping. The shared memory can be accessed via both mmap or file I/O. The backing store is a simple shmem file. Additionally, ashmem introduces the concept of page pinning. Pinned pages (the default) behave like any anonymous memory. Unpinned pages are available to the kernel for eviction during VM pressure. When repinning the pages, the return value instructs user-space as to any eviction. In this manner, user-space processes may implement caching and similar resource management that efficiently integrates with kernel memory management. Signed-off-by: Robert Love <rlove@google.com> ashmem: Don't install fault handler for private mmaps. Ashmem is used to create named private heaps. If this heap is backed by a tmpfs file it will allocate two pages for every page touched. In 2.6.27, the extra page would later be freed, but 2.6.29 does not scan anonymous pages when running without swap so the memory is not freed while the file is referenced. This change changes the behavior of private ashmem mmaps to match /dev/zero instead tmpfs. Signed-off-by: Arve Hjønnevåg <arve@android.com> ashmem: Add common prefix to name reported in /proc/pid/maps Signed-off-by: Arve Hjønnevåg <arve@android.com> ashmem: don't require a page aligned size This makes ashmem more similar to shmem and mmap, by not requiring the specified size to be page aligned, instead rounding it internally as needed. Signed-off-by: Marco Nelissen <marcone@android.com> [jstultz: Improved commit subject and included patch description from rlove. Also moved ashmem files to staging dir, and reworked code to avoid touching mm/shmem.c while we're in staging.] CC: Brian Swetland <swetland@google.com> CC: Colin Cross <ccross@android.com> CC: Arve Hjønnevåg <arve@android.com> CC: Dima Zavin <dima@android.com> CC: Robert Love <rlove@google.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/android/Kconfig')
-rw-r--r--drivers/staging/android/Kconfig9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/staging/android/Kconfig b/drivers/staging/android/Kconfig
index 6094fd604ac8..becf711117ef 100644
--- a/drivers/staging/android/Kconfig
+++ b/drivers/staging/android/Kconfig
@@ -12,6 +12,15 @@ config ANDROID_BINDER_IPC
bool "Android Binder IPC Driver"
default n
+config ASHMEM
+ bool "Enable the Anonymous Shared Memory Subsystem"
+ default n
+ depends on SHMEM || TINY_SHMEM
+ help
+ The ashmem subsystem is a new shared memory allocator, similar to
+ POSIX SHM but with different behavior and sporting a simpler
+ file-based API.
+
config ANDROID_LOGGER
tristate "Android log driver"
default n