summaryrefslogtreecommitdiffstats
path: root/drivers/staging/zcache
Commit message (Collapse)AuthorAgeFilesLines
* staging: zcache: introduce zero filled pages handlerWanpeng Li2013-03-191-0/+26
| | | | | | | | Introduce zero-filled pages handler to capture and handle zero pages. Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* zcache/TODO: Update on two items.Konrad Rzeszutek Wilk2013-03-191-5/+1Star
| | | | | | | | | | | | Two of them (zcache DebugFS cleanup) and the module loading capability are now in linux-next for v3.10. Also Bob Liu is full-time going to help on knocking these items off the list. CC: bob.liu@oracle.com Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge 3.9-rc3 into staging-nextGreg Kroah-Hartman2013-03-181-15/+10Star
|\ | | | | | | | | | | | | This resolves the merge error due to removing the ccg staging driver, and picks up the other staging driver fixes that went into 3.9-rc3. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * zcache: convert to idr_alloc()Tejun Heo2013-03-131-15/+10Star
| | | | | | | | | | | | | | | | | | | | | | | | | | idr_get_new*() and friends are about to be deprecated. Convert to the new idr_alloc() interface. Only compile tested. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Dan Magenheimer <dan.magenheimer@oracle.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | staging: zcache: using strlcpy instead of strncpyChen Gang2013-03-111-1/+2
| | | | | | | | | | | | | | for NUL terminated string, need alway set '\0' in the end. Signed-off-by: Chen Gang <gang.chen@asianux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: zcache/debug: compiler failure on PPC64 and revert commit.Konrad Rzeszutek Wilk2013-03-082-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On PPC64 we get this: In file included from drivers/staging/zcache/debug.c:2: drivers/staging/zcache/debug.h: In function 'dec_zcache_obj_count': drivers/staging/zcache/debug.h:16: error: implicit declaration of function 'BUG_ON' This simple patch adds the appropiate header file to finish the compile and reverts "staging: zcache: disable ZCACHE_DEBUG due to build error" (5db5a20a50cfd078c78b13a988f237cca81aedc5) Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: zcache: disable ZCACHE_DEBUG due to build errorStephen Rothwell2013-03-061-0/+1
| | | | | | | | | | | | | | | | | | In file included from drivers/staging/zcache/debug.c:2:0: drivers/staging/zcache/debug.h: In function 'dec_zcache_obj_count': drivers/staging/zcache/debug.h:16:2: error: implicit declaration of function 'BUG_ON' [-Werror=implicit-function-declaration] Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | zcache/debug: Coalesce all debug under CONFIG_ZCACHE_DEBUGKonrad Rzeszutek Wilk2013-03-053-4/+12
| | | | | | | | | | | | | | | | and also define this extra attribute in the Kconfig entry. Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | zcache: Module license is defined twice.Konrad Rzeszutek Wilk2013-03-051-2/+0Star
| | | | | | | | | | | | | | | | The other (same license) is at the end of the file. Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | zcache: Move the last of the debugfs counters outKonrad Rzeszutek Wilk2013-03-052-66/+89
| | | | | | | | | | | | | | | | | | We now have in zcache-main only the counters that are are not debugfs related. Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | zcache/debug: Use an array to initialize/use debugfs attributes.Konrad Rzeszutek Wilk2013-03-051-112/+51Star
| | | | | | | | | | | | | | | | | | It makes it neater and also allows us to piggyback on that in the zcache_dump function. Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | zcache: Move debugfs code out of zcache-main.c file.Konrad Rzeszutek Wilk2013-03-054-256/+328
| | | | | | | | | | | | | | | | | | | | | | | | Note that at this point there is no CONFIG_ZCACHE_DEBUG option in the Kconfig. So in effect all of the counters are nop until that option gets re-introduced in: zcache/debug: Coalesce all debug under CONFIG_ZCACHE_DEBUG Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> [v1: Fixed conflicts due to rebase] Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | zcache: Make the debug code use pr_debugKonrad Rzeszutek Wilk2013-03-051-44/+41Star
| | | | | | | | | | | | | | | | | | | | | | | | as if you are debugging this driver you would be using 'debug' on the command line anyhow - and this would dump the debug data on the proper loglevel. While at it also remove the unconditional #define ZCACHE_DEBUG. Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | zcache: The last of the atomic reads has now an accessory function.Konrad Rzeszutek Wilk2013-03-051-4/+9
| | | | | | | | | | | | | | | | | | And now we can move the code ([inc|dec]_zcache_[*]) to their own file with a header to make them nops or feed in debugfs. Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | zcache: Provide accessory functions for counter decrease.Konrad Rzeszutek Wilk2013-03-051-39/+57
| | | | | | | | | | | | | | | | | | | | | | This way we can have all wrapped with these functions and can disable/enable this with CONFIG_DEBUG_FS. Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> [v2: Rebase on top of staging/zcache: Fix/improve zcache writeback code, tie to a config option] [v3: Rebase on top of zcache: Fix compile warnings due to usage of debugfs_create_size_t] Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | zcache: Provide accessory functions for counter increaseKonrad Rzeszutek Wilk2013-03-051-36/+73
| | | | | | | | | | | | | | | | | | | | | | | | This is the first step in moving the debugfs code out of the main file in-to another file. And also allow the code to run without CONFIG_DEBUG_FS defined. Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> [v2: Rebase on top staging/zcache: Fix/improve zcache writeback code, tie to a config option] [v3: Rebase on top of zcache: Fix compile warnings due to usage of debugfs_create_size_t] Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | zcache: s/int/bool/ on the various options.Konrad Rzeszutek Wilk2013-03-051-15/+15
|/ | | | | | | | | | | There are so many, but this allows us to at least have them right in as bool. Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> [v1: Rebase on ramster->zcache move] [v2: Rebase on staging/zcache: Fix/improve zcache writeback code, tie to a config option] Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mm: rename page struct field helpersMel Gorman2013-02-241-1/+1
| | | | | | | | | | | | | | | | | The function names page_xchg_last_nid(), page_last_nid() and reset_page_last_nid() were judged to be inconsistent so rename them to a struct_field_op style pattern. As it looked jarring to have reset_page_mapcount() and page_nid_reset_last() beside each other in memmap_init_zone(), this patch also renames reset_page_mapcount() to page_mapcount_reset(). There are others like init_page_count() but as it is used throughout the arch code a rename would likely cause more conflicts than it is worth. [akpm@linux-foundation.org: fix zcache] Signed-off-by: Mel Gorman <mgorman@suse.de> Suggested-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* staging/zache checkpatch ERROR: spaces prohibited around thatRobert Berger2013-02-181-2/+2
| | | | | | | | zbud.c:106: ERROR: spaces prohibited around that ':' (ctx:VxW) zbud.c:107: ERROR: spaces prohibited around that ':' (ctx:VxW) Signed-off-by: Robert Berger <rber.git@ReliableEmbeddedSystems.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* zcache/zbud: Fix __init mismatchKonrad Rzeszutek Wilk2013-02-151-1/+1
| | | | | | | | | | | | | | | | | We get: WARNING: drivers/staging/zcache/zcache.o(.text+0x13a1): Section mismatch in reference from the function zcache_init() to the function .init.text:zbud_init() The function zcache_init() references the function __init zbud_init(). This is often because zcache_init lacks a __init annotation or the annotation of zbud_init is wrong. And this fixes it. Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* zbud: Fix compile warnings due to usage of debugfs_create_size_tKonrad Rzeszutek Wilk2013-02-151-16/+16
| | | | | | | | | | | | | . drivers/staging/zcache/zbud.c:336: warning: passing argument 4 of ‘debugfs_create_size_t’ from incompatible pointer type include/linux/debugfs.h:80: note: expected ‘size_t *’ but argument is of type ‘long unsigned int *’ .. which is b/c we end up using 'unsigned' or 'unsigned long' instead of 'ssize_t'. So lets fix this up and use the proper type. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ramster: Fix compile warnings due to usage of debugfs_create_size_tKonrad Rzeszutek Wilk2013-02-151-17/+17
| | | | | | | | | We get tons of "note: expected ‘size_t *’ but argument is of type ‘long int *’" warnings. This fixes it. Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* zcache: Fix compile warnings due to usage of debugfs_create_size_tKonrad Rzeszutek Wilk2013-02-151-80/+81
| | | | | | | | | | | | | | | | | When we compile we get tons of: include/linux/debugfs.h:80:16: note: expected ‘size_t *’ but argument is of type ‘long int *’ drivers/staging/zcache/zcache-main.c:279:2: warning: passing argument 4 of ‘debugfs_create_size_t’ from incompatible pointer type [enabled by d efault] which is b/c we end up using 'unsigned' or 'unsigned long' instead of 'ssize_t'. So lets fix this up and use the proper type. [v2: Rebased directly on staging] Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: zcache: add TODO fileDan Magenheimer2013-02-131-0/+69
| | | | | | | Add zcache TODO file Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/zcache: Fix/improve zcache writeback code, tie to a config optionDan Magenheimer2013-02-112-65/+284
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was observed by Andrea Arcangeli in 2011 that zcache can get "full" and there must be some way for compressed swap pages to be (uncompressed and then) sent through to the backing swap disk. A prototype of this functionality, called "unuse", was added in 2012 as part of a major update to zcache (aka "zcache2"), but was left unfinished due to the unfortunate temporary fork of zcache. This earlier version of the code had an unresolved memory leak and was anyway dependent on not-yet-upstream frontswap and mm changes. The code was meanwhile adapted by Seth Jennings for similar functionality in zswap (which he calls "flush"). Seth also made some clever simplifications which are herein ported back to zcache. As a result of those simplifications, the frontswap changes are no longer necessary, but a slightly different (and simpler) set of mm changes are still required [1]. The memory leak is also fixed. Due to feedback from akpm in a zswap thread, this functionality in zcache has now been renamed from "unuse" to "writeback". Although this zcache writeback code now works, there are open questions as how best to handle the policy that drives it. As a result, this patch also ties writeback to a new config option. And, since the code still depends on not-yet-upstreamed mm patches, to avoid build problems, the config option added by this patch temporarily depends on "BROKEN"; this config dependency can be removed in trees that contain the necessary mm patches. [1] https://lkml.org/lkml/2013/1/29/540/ https://lkml.org/lkml/2013/1/29/539/ Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: Remove unnecessary OOM messagesJoe Perches2013-02-111-6/+3Star
| | | | | | | | | | | | | | | | | alloc failures already get standardized OOM messages and a dump_stack. For the affected mallocs around these OOM messages: Converted kzallocs with multiplies to kcalloc. Converted kmallocs with multiplies to kmalloc_array. Converted a kmalloc/strlen/strncpy to kstrdup. Moved a spin_lock below a removed OOM message and removed a now unnecessary spin_unlock. Neatened alignment and whitespace. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: zcache: remove unnecessary braces in zcache-main.cRyo Munakata2013-01-301-3/+2Star
| | | | | | | | This fixes a checkpatch.pl issue of 'braces {} are not necessary for single statement blocks' Signed-off-by: Ryo Munakata <ryomnktml@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: zcache: fix ppc64 and other arches where PAGE_SIZE!=4KDan Magenheimer2013-01-251-2/+5
| | | | | | | | Replace raw constant 12 with PAGE_SHIFT to fix non-x86 arches and provoke build failure if PAGE_SHIFT is too big Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: zcache: fix uninitialized variable compile warningDan Magenheimer2013-01-181-1/+1
| | | | | | | | | [V2: no code changes, patchset now generated via git format-patch -M] Fix unitialized variable in zcache which generates warning during build Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: zcache: adjustments to config/build files due to renamingDan Magenheimer2013-01-182-12/+7Star
| | | | | | | | | [V2: no code changes, patchset now generated via git format-patch -M] In staging/zcache, adjust config/build due to ramster->zcache renaming Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: zcache: rename ramster to zcacheDan Magenheimer2013-01-1822-0/+10481
| | | | | | | | | | | | | | | | | | | | | | | | | [V2: no code changes, patchset now generated via git format-patch -M] In staging, rename ramster to zcache The original zcache in staging was a "demo" version, and this new zcache is a significant rewrite. While certain disagreements were being resolved, both "old zcache" and "new zcache" needed to reside in the staging tree simultaneously. In order to minimize code change and churn, the newer version of zcache was temporarily merged into the "ramster" staging driver which, prior to that, had at one time heavily leveraged the older version of zcache. So, recently, "new zcache" resided in the ramster directory. Got that? No? Sorry, temporary political compromises are rarely pretty. The older version of zcache is no longer being maintained and has now been removed from the staging tree. So now the newer version of zcache can rightfully reclaim sole possession of the name "zcache". FYI, this [PATCH 2/5] is simply a "git mv" generated by "git format-patch -M". Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: zcache: delete itGreg Kroah-Hartman2013-01-165-3070/+0Star
| | | | | | | | | Dan Magenheimer says that it is now safe to delete zcache, so quick, before he changes his mind, drop the thing on the floor and run screaming away. Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge 3.6-rc6 into staging-nextGreg Kroah-Hartman2012-09-171-4/+3Star
|\ | | | | | | | | | | | | This pulls in the staging tree fixes in 3.6-rc6 into our branch to resolve the merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: zcache: fix cleancache race condition with shrinkerSeth Jennings2012-09-051-4/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a race condition that results in memory corruption when using cleancache. The race exists between the zcache shrinker handler, shrink_zcache_memory() and cleancache_get_page(). In most cases, the shrinker will both evict a zbpg from its buddy list and flush it from tmem before a cleancache_get_page() occurs on that page. A subsequent cleancache_get_page() will fail in the tmem layer. In the rare case that two occur together and the cleancache_get_page() path gets through the tmem layer before the shrinker path can flush tmem, zbud_decompress() does a check to see if the zbpg is a "zombie", i.e. not on a buddy list, which means the shrinker is in the process of reclaiming it. If the zbpg is a zombie, zbud_decompress() returns -EINVAL. However, this return code is being ignored by the caller, zcache_pampd_get_data_and_free(), which results in the caller of cleancache_get_page() thinking that the page has been properly retrieved when it has not. This patch modifies zcache_pampd_get_data_and_free() to convey the failure up the stack so that the caller of cleancache_get_page() knows the page retrieval failed. This needs to be applied to stable trees as well. zcache-main.c was named zcache.c before v3.1, so I'm not sure how you want to handle trees earlier than that. Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com> Cc: stable <stable@vger.kernel.org> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Reviewed-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: zcache: fix spelling of commentMarcus Karlsson2012-09-051-1/+1
|/ | | | | | | | | Fix spelling in tmem.c: Transcedent -> Transcendent Signed-off-by: Marcus Karlsson <mk@acc.umu.se> Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: zsmalloc: add mapping modesSeth Jennings2012-07-091-3/+3
| | | | | | | | | | This patch improves mapping performance in zsmalloc by getting usage information from the user in the form of a "mapping mode" and using it to avoid unnecessary copying for objects that span pages. Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: zcache: cleanup the code between tmem_obj_init and tmem_obj_findXiao Guangrong2012-07-091-30/+33
| | | | | | | | | tmem_obj_find and insertion tmem-obj have the some logic, we can integrate the code Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: zcache: introduce get_zcache_clientXiao Guangrong2012-07-091-23/+23
| | | | | | | | | Introduce get_zcache_client to remove the common code Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com> Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: zcache: cleanup zcache_do_preload and zcache_put_pageXiao Guangrong2012-07-091-21/+16Star
| | | | | | | | | Cleanup the code for zcache_do_preload and zcache_put_page Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com> Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: zcache: optimize zcache_do_preloadXiao Guangrong2012-07-091-12/+9Star
| | | | | | | | | | zcache_do_preload is called in zcache_put_page where IRQ is disabled, so, need not care preempt Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com> Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: zcache: cleanup zbud_initXiao Guangrong2012-07-091-4/+2Star
| | | | | | | | | Need not set global parameters to 0 Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com> Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: zcache: mark zbud_init/zcache_comp_init as __initXiao Guangrong2012-07-091-2/+2
| | | | | | | | | | These functions are called only when system is initializing, so mark __init for them to free memory Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com> Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: zcache: remove unnecessary config option dependenceXiao Guangrong2012-07-091-5/+2Star
| | | | | | | | | | | | zcache is enabled only if one of CONFIG_CLEANCACHE and CONFIG_FRONTSWAP is enabled, see the Kconfig: depends on (CLEANCACHE || FRONTSWAP) && CRYPTO=y && X86 So, we can remove the check in the source code Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com> Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: zcache: fix a compile warningXiao Guangrong2012-07-091-0/+2
| | | | | | | | | | | Fix: drivers/staging/zcache/zcache-main.c: In function ‘zcache_comp_op’: drivers/staging/zcache/zcache-main.c:112:2: warning: ‘ret’ may be used uninitial Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: zcache: fix refcount leakXiao Guangrong2012-07-091-1/+2
| | | | | | | | | | In zcache_get_pool_by_id, the refcount of zcache_host is not increased, but it is always decreased in zcache_put_pool Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com> Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: zram/zcache: swtich Kconfig dependency from X86 to ZSMALLOCSeth Jennings2012-06-251-4/+1Star
| | | | | | | | | | This patch switches zcache and zram dependency to ZSMALLOC rather than X86. There is no net change since ZSMALLOC depends on X86, however, this prevent further changes to these files as zsmalloc dependencies change. Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge 3.5-rc4 into staging-nextGreg Kroah-Hartman2012-06-251-5/+5
|\ | | | | | | | | | | | | This picks up the staging changes made in 3.5-rc4 so that everyone can sync up properly. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Merge tag 'stable/frontswap.v16-tag' of ↵Linus Torvalds2012-06-041-5/+5
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/konrad/mm Pull frontswap feature from Konrad Rzeszutek Wilk: "Frontswap provides a "transcendent memory" interface for swap pages. In some environments, dramatic performance savings may be obtained because swapped pages are saved in RAM (or a RAM-like device) instead of a swap disk. This tag provides the basic infrastructure along with some changes to the existing backends." Fix up trivial conflict in mm/Makefile due to removal of swap token code changing a line next to the new frontswap entry. This pull request came in before the merge window even opened, it got delayed to after the merge window by me just wanting to make sure it had actual users. Apparently IBM is using this on their embedded side, and Jan Beulich says that it's already made available for SLES and OpenSUSE users. Also acked by Rik van Riel, and Konrad points to other people liking it too. So in it goes. By Dan Magenheimer (4) and Konrad Rzeszutek Wilk (2) via Konrad Rzeszutek Wilk * tag 'stable/frontswap.v16-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/mm: frontswap: s/put_page/store/g s/get_page/load MAINTAINER: Add myself for the frontswap API mm: frontswap: config and doc files mm: frontswap: core frontswap functionality mm: frontswap: core swap subsystem hooks and headers mm: frontswap: add frontswap header file
| | * frontswap: s/put_page/store/g s/get_page/loadKonrad Rzeszutek Wilk2012-05-151-5/+5
| | | | | | | | | | | | | | | | | | | | | Sounds so much more natural. Suggested-by: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* | | staging: zcache: don't limit number of pools per clientSasha Levin2012-06-151-17/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the amount of pools each client can use is limited to 16, this is and arbitrary limit which isn't really required by current implementation. This places and arbitrary limit on the number of mounted filesystems that can use cleancache. This patch removes that limit and uses IDR to do sparse mapping of pools in each client. Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>