aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/zcache
AgeCommit message (Collapse)AuthorFilesLines
2011-05-25vmscan: change shrinker API by passing shrink_control structGravatar Ying Han 1-1/+4
Change each shrinker's API by consolidating the existing parameters into shrink_control struct. This will simplify any further features added w/o touching each file of shrinker. [akpm@linux-foundation.org: fix build] [akpm@linux-foundation.org: fix warning] [kosaki.motohiro@jp.fujitsu.com: fix up new shrinker API] [akpm@linux-foundation.org: fix xfs warning] [akpm@linux-foundation.org: update gfs2] Signed-off-by: Ying Han <yinghan@google.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Minchan Kim <minchan.kim@gmail.com> Acked-by: Pavel Emelyanov <xemul@openvz.org> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Mel Gorman <mel@csn.ul.ie> Acked-by: Rik van Riel <riel@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Hugh Dickins <hughd@google.com> Cc: Dave Hansen <dave@linux.vnet.ibm.com> Cc: Steven Whitehouse <swhiteho@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-02-23staging: Allow sharing xvmalloc for zram and zcacheGravatar Nitin Gupta 1-1/+3
Both zram and zcache use xvmalloc allocator. If xvmalloc is compiled separately for both of them, we will get linker error if they are both selected as "built-in". We can also get linker error regarding missing xvmalloc symbols if zram is not built. So, we now compile xvmalloc separately and export its symbols which are then used by both of zram and zcache. Signed-off-by: Nitin Gupta <ngupta@vflare.org> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18staging: zcache: fix memory leakGravatar Vasiliy Kulikov 1-0/+1
obj is not freed if __get_free_page() failed. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09staging: zcache: misc build/configGravatar Dan Magenheimer 2-0/+14
[PATCH V2 3/3] drivers/staging: zcache: misc build/config Makefiles and Kconfigs to build zcache in drivers/staging There is a dependency on xvmalloc.* which in 2.6.37 resides in drivers/staging/zram. Should this move or disappear, some Makefile/Kconfig changes will be required. Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Nitin Gupta <ngupta@vflare.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09staging: zcache: host services and PAM servicesGravatar Dan Magenheimer 1-0/+1657
[PATCH V2 2/3] drivers/staging: zcache: host services and PAM services Zcache provides host services (memory allocation) for tmem, a "shim" to interface cleancache and frontswap to tmem, and two different page-addressable memory implemenations using lzo1x compression. The first, "compression buddies" ("zbud") compresses pairs of pages and supplies a shrinker interface that allows entire pages to be reclaimed. The second is a shim to xvMalloc which is more space-efficient but less receptive to page reclamation. The first is used for ephemeral pools and the second for persistent pools. All ephemeral pools share the same memory, that is, even pages from different pools can share the same page. Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Nitin Gupta <ngupta@vflare.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09staging: zcache: in-kernel tmem codeGravatar Dan Magenheimer 2-0/+905
[PATCH V2 1/3] drivers/staging: zcache: in-kernel tmem code Transcendent memory ("tmem") is a clean API/ABI that provides for an efficient address translation and a set of highly concurrent access methods to copy data between a page-oriented data source (e.g. cleancache or frontswap) and a page-addressable memory ("PAM") data store. Of critical importance, the PAM data store is of unknown (and possibly varying) size so any individual access may succeed or fail as defined by the API/ABI. Tmem exports a basic set of access methods (e.g. put, get, flush, flush object, new pool, and destroy pool) which are normally called from a "host" (e.g. zcache). To be functional, two sets of "ops" must be registered by the host, one to provide "host services" (memory allocation) and one to provide page-addressable memory ("PAM") hooks. Tmem supports one or more "clients", each which can provide a set of "pools" to partition pages. Each pool contains a set of "objects"; each object holds pointers to some number of PAM page descriptors ("pampd"), indexed by an "index" number. This triple <pool id, object id, index> is sometimes referred to as a "handle". Tmem's primary function is to essentially provide address translation of handles into pampds and move data appropriately. As an example, for cleancache, a pool maps to a filesystem, an object maps to a file, and the index is the page offset into the file. And in this patch, zcache is the host and each PAM descriptor points to a compressed page of data. Tmem supports two kinds of pages: "ephemeral" and "persistent". Ephemeral pages may be asynchronously reclaimed "bottoms up" so the data structures and concurrency model must allow for this. For example, each pampd must retain sufficient information to invalidate tmem's handle-to-pampd translation. its containing object so that, on reclaim, all tmem data structures can be made consistent. Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>